Viper4Android has had trouble with SELinux enforcing mode introduced on Lollipop, and so far we’ve been trying to run it under the permissive mode by changing the SELinux policy, but thanks to maximumentropy over at XDA, you can now use Viper4Android without changing SELinux from enforcing to permissive.
The fix involves pushing a few ADB commands to the device on which you want to run Viper4Android and also make sure you’ve SuperSU as your superuser management app for it to work. Check out the original post by the user below:
This requires that you are using SuperSU on your system, as it provides both the su.d startup directory support and the supolicy binary. Execute these commands in a terminal on your Android device to create the startup script. It should execute at boot time, starting with your next reboot.
If case you’re scared of ADB commands, then thankfully we also have a recovery flashable zip for the same.
[ADB method] How to apply Viper4Android SELinux fix
- Setup ADB and Fastboot on your PC.
- Enable USB debugging on your device from developer options and connect it to the PC with a USB cable.
- Open a command prompt window on the PC and issue the following commands:
su mount -o rw,remount /system cd /system/su.d echo '#! /system/bin/sh' > 50viper.sh echo '/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"' >> 50viper.sh chown root.root 50viper.sh chmod 755 50viper.sh cd / mount -o ro,remount /system exit
- Reboot your device.
[Recovery Flashable zip] Viper4Android SELinux fix
For folks who prefer to stay away from ADB or just don’t have access to PC. Here’s recovery flashable zip file to apply the fix.
[icon name=”download” class=”” unprefixed_class=””] Download Viper4Android SELinux Policy fixTo install, just boot into a custom recovery (TWRP, preferably), flash the zip file and reboot. Nothing else.
via XDA
[…] Viper4Android for a number of devices. However, only recently we posted of a working method to get Viper4Android working on Lollipop with enforcing mode, and it seems the method also works on Galaxy S6 […]
Works on S4!!
Works on S4!!
All I ever wanted to run on my droid was Viper4android. Been rooted for a while struggling with SE enforcing mode. Thanks so much for this fix!
I have a verizon galaxy s4.
All I ever wanted to run on my droid was Viper4android. Been rooted for a while struggling with SE enforcing mode. Thanks so much for this fix!
I have a verizon galaxy s4.
Hi and thanks for this quick guide.
I have a couple of questions though:
– what happens if one day a new viper4android version ships without the selinux problem and I install it? Will it conflict with this change?
– would at that point be enough to just delete the 50viper.sh bash script ?
– is there something like an automated way to keep track of all small changes like this one and revert them at anytime?
Thanks!
post your question here joyn in the thread quoting: http://forum.xda-developers.com/showpost.php?p=61242973&postcount=18854
Hi and thanks for this quick guide.
I have a couple of questions though:
– what happens if one day a new viper4android version ships without the selinux problem and I install it? Will it conflict with this change?
– would at that point be enough to just delete the 50viper.sh bash script ?
– is there something like an automated way to keep track of all small changes like this one and revert them at anytime?
Thanks!
post your question here joyn in the thread quoting: http://forum.xda-developers.com/showpost.php?p=61242973&postcount=18854
[…] It has only been a couple of days since Marshmallow released for Nexus 5, but some of you may already be missing the sound boost from Viper4Android on Lollipop. […]
[…] mother of all the sound MODs available for Android devices. However, getting it installed can be tricky on Lollipop and Marshmallow running devices, and even more tricky on the Nexus 6P and 5X […]
thx work on S5 g900h lollipop
thx work on S5 g900h lollipop
[…] TWRP and root as per jcadduono’s thread then visit this link, have a read then downloading the file from the Dropbox link provided. Install the latest […]
Tq… Worked on S5 g900f lollipop 5.0
Tq… Worked on S5 g900f lollipop 5.0
I don’t have /system/su.d. I check SuperSu and it says I am running SuperSu in systemless root mode. It isn’t possible to do a system install in through SuperSu. How do I get around this?
I had the same problem. I’m not familiar with SuperSU but I guess the ‘systemless’ part involves to not modify the /system partition. I found that the su configuration folder and the supolicy executable are both located in /su on my phone (a Honor 5C running Android 6.0). I could make it work by adapting the original commands:
su
mount -o rw,remount /su
cd /su/su.d
echo ‘#! /system/bin/sh’ > 50viper.sh
echo ‘/su/bin/supolicy –live “allow mediaserver mediaserver_tmpfs:file { read write execute };”‘ >> 50viper.sh
chown root.root 50viper.sh
chmod 755 50viper.sh
cd /
mount -o ro,remount /su
exit
BTW for the OP: since the commands are invoked as root I’m pretty sure the chown command isn’t necessary. And thanks a lot for this workaround!
I don’t have /system/su.d. I check SuperSu and it says I am running SuperSu in systemless root mode. It isn’t possible to do a system install in through SuperSu. How do I get around this?
I had the same problem. I’m not familiar with SuperSU but I guess the ‘systemless’ part involves to not modify the /system partition. I found that the su configuration folder and the supolicy executable are both located in /su on my phone (a Honor 5C running Android 6.0). I could make it work by adapting the original commands:
su
mount -o rw,remount /su
cd /su/su.d
echo ‘#! /system/bin/sh’ > 50viper.sh
echo ‘/su/bin/supolicy –live “allow mediaserver mediaserver_tmpfs:file { read write execute };”‘ >> 50viper.sh
chown root.root 50viper.sh
chmod 755 50viper.sh
cd /
mount -o ro,remount /su
exit
BTW for the OP: since the commands are invoked as root I’m pretty sure the chown command isn’t necessary. And thanks a lot for this workaround!
Works using TWRP 3.0.2.0 on my Sprint Galaxy Note 4 running stock rooted Android 6.0.1 (N910PVPS4DPD1) and now the Driver Status finally shows NORMAL instead of Abnormal!
Works using TWRP 3.0.2.0 on my Sprint Galaxy Note 4 running stock rooted Android 6.0.1 (N910PVPS4DPD1) and now the Driver Status finally shows NORMAL instead of Abnormal!
Works on HTC 10 also! I used audio_effect.conf from Samsung. Rename the original file from Htc: htc_audio_effect.conf to htc_audio_effect.bak in case you want to go back. Rename the Samsung file to htc_audio_effect.conf Reboot the device and have fun!
Works on HTC 10 also! I used audio_effect.conf from Samsung. Rename the original file from Htc: htc_audio_effect.conf to htc_audio_effect.bak in case you want to go back. Rename the Samsung file to htc_audio_effect.conf Reboot the device and have fun!
I installed viper4android selinux policy fix.zip on galaxy s4 i9505 lollipop 5.0.1. But selinux mode did not change to permissive.selinux mode still to enforcing mode.
Please help me to fix this issue
I installed viper4android selinux policy fix.zip on galaxy s4 i9505 lollipop 5.0.1. But selinux mode did not change to permissive.selinux mode still to enforcing mode.
Please help me to fix this issue
Can i use this zip for miui 7.5 running on marshmallow … my device is xiaomi mi3…thanks in advance
It might not work. Why not use the ADB method, instead.
Can i use this zip for miui 7.5 running on marshmallow … my device is xiaomi mi3…thanks in advance
It might not work. Why not use the ADB method, instead.
Can i use this zip for miui 7.5 running on marshmallow … my device is xiaomi mi3…thanks in advance
Can i use this zip for miui 7.5 running on marshmallow … my device is xiaomi mi3…thanks in advance
Works on Samsung Note 4 N910C rooted stock rom Marshmallow 6.0.1 with Busybox installed. MUST flash viper4android selinux policy fix.zip with TWRP recovery version 3.0.2.0, flash with CWM recovery WILL NOT work
Works on Samsung Note 4 N910C rooted stock rom Marshmallow 6.0.1 with Busybox installed. MUST flash viper4android selinux policy fix.zip with TWRP recovery version 3.0.2.0, flash with CWM recovery WILL NOT work
Works on Samsung Note 4 N910C rooted stock rom Marshmallow 6.0.1 with Busybox installed. MUST flash viper4android selinux policy fix.zip with TWRP recovery version 3.0.2.0, flash with CWM recovery WILL NOT work
Works on Samsung Note 4 N910C rooted stock rom Marshmallow 6.0.1 with Busybox installed. MUST flash viper4android selinux policy fix.zip with TWRP recovery version 3.0.2.0, flash with CWM recovery WILL NOT work
[…] soon came a workaround to use ViPER4Android on Lollipop while still running SELinux in enforcing mode (to ensure device security). The trick worked on […]
[…] soon came a workaround to use ViPER4Android on Lollipop while still running SELinux in enforcing mode (to ensure device security). The trick worked on […]
I tried the adb method on a Samsung Galaxy S4 active and it only works sometimes. How do I reverse it?
I tried the adb method on a Samsung Galaxy S4 active and it only works sometimes. How do I reverse it?
I tried the adb method on a Samsung Galaxy S4 active and it only works sometimes. How do I reverse it?
I tried the adb method on a Samsung Galaxy S4 active and it only works sometimes. How do I reverse it?
Samsung a5 2016 6.0.1 failed “custom binary blocked by frp”
Samsung a5 2016 6.0.1 failed “custom binary blocked by frp”
Samsung a5 2016 6.0.1 failed “custom binary blocked by frp”
Samsung a5 2016 6.0.1 failed “custom binary blocked by frp”
The su command was not working on my windows pc.
so i tried several things.
Then this is what i did.
Opened terminal from the adb folder.
then typed adb devices to see if my device is connected the right way.
after this i typed adb shell to make the connection.
and after these steps i can use the commands as told in the discription above.
I am using cm13 snapshot
The su command was not working on my windows pc.
so i tried several things.
Then this is what i did.
Opened terminal from the adb folder.
then typed adb devices to see if my device is connected the right way.
after this i typed adb shell to make the connection.
and after these steps i can use the commands as told in the discription above.
I am using cm13 snapshot
The su command was not working on my windows pc.
so i tried several things.
Then this is what i did.
Opened terminal from the adb folder.
then typed adb devices to see if my device is connected the right way.
after this i typed adb shell to make the connection.
and after these steps i can use the commands as told in the discription above.
I am using cm13 snapshot
The su command was not working on my windows pc.
so i tried several things.
Then this is what i did.
Opened terminal from the adb folder.
then typed adb devices to see if my device is connected the right way.
after this i typed adb shell to make the connection.
and after these steps i can use the commands as told in the discription above.
I am using cm13 snapshot
Correction!! It does not work!!
Correction!! It does not work!!
Correction!! It does not work!!
Correction!! It does not work!!