I recently upgraded my MX4 to flyme 5 and tried to install viper4android.
It led to a loop of installing drivers; this is due to selinux being set to ‘enforcing’ (I think).
The solution I used is from this page
You have to download the zip file and manually copy the ‘su.d’ folder to /system/
then follow the instructions.
Worked for me anyway