[Guide] [ROOT Required] Installing Viper4Android on Lollipop

Namelesswonder

Senior Member
Jan 26, 2014
175
206
83
What you will need:
  1. To be on Lollipop WITH root (go here if you need to flash the rooted ROM)
  2. BusyBox to be installed (it should already be installed on the rooted ROM, if not then search the Play Store or use your favorite one)
  3. A copy of Viper4Android v2.3.4.0 (Download from here)
  4. A file browser that can access the /system partition and change permissions (I prefer ES File Explorer but you can use whatever you like)
  5. Titanium Backup (or you can use the application manager in the Settings app)

Firstly, what you will need to do is use your file browser and create a folder called "Viper4Android" in your /system/priv-app/ folder. Set the permission for this folder to rwxr-xr-x or 0755, then paste your Viper4Android APK into the folder you created and set the permission for the APK to rwxrwxrwx or 0777, with root being owner and group for both folder and APK.

Secondly, what you will need to do is browse to /system/etc/ with your file browser and open the file init.qcom.post_boot.sh and at the very bottom of the file paste this:
Code:
/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"
It is imperative that you make sure you are using Unix line endings instead of anything else.

Thirdly, use Titanium Backup or the Application Manager to freeze SoundAlive, as all music apps will attempt to default to it. Also you may want to freeze the Adapt Sound app, as if you enable it will then be used over V4A.

Lastly, reboot your phone and then install the drivers and reboot one last time. I can confirm that it works on Play Music, and that it doesn't work on the stock Music player (however I believe there is a way to get it to work somewhere on the internet).

Problems:

Viper4Android fails at installing!
You are to create it as a system app, so follow the first step.

Viper4Android doesn't appear!
Make sure you followed the first step correctly and set the proper permissions.

Viper4Android still says Abnormal and Unsupported in the status!
Make sure you pasted the command into the init.qcom.post_boot.sh file and that you used Unix line endings, as using DOS or Mac line endings add extra characters that Android will try to parse as actual text.

Viper4Android says that BusyBox isn't installed!
This bug happens sometimes, I found the best way to beat it is to open your BusyBox app and just put it in the background and try the driver installation again.

I enabled everything and my music still sounds the same!
Make sure you freeze SoundAlive and Adapt Sound, as they will be used before Viper4Android, also you may need to put V4A into Compatibility mode to use with certain music players. Also you can't use the stock Music player (but I think there is a way somewhere on the internet).

My phone broke and won't boot!
Then you may want to wait until a recovery flashable zip is made, but at no point are the steps going to brick your phone, you can just boot to Safestrap or flash back.


Notes:
This process can probably be done very easily with a init.d script and a recovery flashable zip, but I currently don't have the time and don't want to risk screwing up someone's phone.
You can use any other Viper4Android mod, as long as it is v2.3.4.0, I prefer this version which looks very nice. You can extract the file from the zip attachment and just follow the steps here.
You do not need to have SELinux set to permissive, as even with using MultiSystem to set it to permissive, it still didn't work until the above command is used.
I haven't tested whether effects like convolver or DDC work, but they should.

Thanks to:
@ihancioglu for the code that allows it to work
@nappent for most of the steps needed to get it running

EXTRA:
Here is an init.d script that will do the bypass for you, however, you must have init.d support. As it stands right now, Walter.White's Lollipop ROM does not have init.d, if you want to enable init.d, you have to add
Code:
/system/etc/init.d/*
to the end of init.qcom.post_boot.sh and create an init.d folder in /system/etc.
Script: https://mega.nz/#!ZpIUCbrb!QONi8bWb1afE47_JnwxgpBcXoKFuPG3mpnyFX4r83G0
 
Last edited:

joshuaburnsjr

Senior Member
Feb 15, 2011
94
23
0
Jackson
What process did you use to be able to write to the root. I can not gain root access even though i have su, busybox, and several other apps with root access. I have tried using ES File explorer with no success. It will not access the root of the device.

---------- Post added at 09:31 PM ---------- Previous post was at 08:35 PM ----------

100% verified and working. Big thanks!!!
 
  • Like
Reactions: Namelesswonder

KTownGT

Senior Member
Aug 23, 2009
496
551
0
Dallas
Works perfectly. Thanks for this work around OP!

Any thoughts on using NuPlayer vs. AwesomePlayer in dev. options?



What process did you use to be able to write to the root. I can not gain root access even though i have su, busybox, and several other apps with root access. I have tried using ES File explorer with no success. It will not access the root of the device.

---------- Post added at 09:31 PM ---------- Previous post was at 08:35 PM ----------

100% verified and working. Big thanks!!!
Root Browser worked for me.
 
  • Like
Reactions: Namelesswonder

Namelesswonder

Senior Member
Jan 26, 2014
175
206
83
Any thoughts on using NuPlayer vs. AwesomePlayer in dev. options?.
I use NuPlayer, but to be honest I haven't seen or heard of any difference. Some guides say that disabling NuPlayer will allow V4A to work, but V4A has worked just perfectly fine with NuPlayer enabled.

Among other things, creating a recovery flashable zip has fallen through. I have come across a problem where I can't modify init.qcom.post_boot.sh from a recovery, be it SafeStrap or FlashFire. I have also discovered something else, init.d support was supposed to be included with Walter.White's Lollipop ROM, but his script encountered the same problem as me, it couldn't append to init.qcom.post_boot.sh. So right now anyone using his ROM does not have init.d setup, luckily, it can be very easily enabled. All you have to do is add
Code:
/system/etc/init.d/*
to the end of init.qcom.post_boot.sh and create an init.d folder in /system/etc and you are good to go. I have attached an init.d script to the main post that can make use of init.d and do the bypass.
 
Last edited:
  • Like
Reactions: KTownGT

KTownGT

Senior Member
Aug 23, 2009
496
551
0
Dallas
I use NuPlayer, but to be honest I haven't seen or heard of any difference. Some guides say that disabling NuPlayer will allow V4A to work, but V4A has worked just perfectly fine with NuPlayer enabled.
Exactly why I asked... lol

Looks like it is only required when setting SELinux to permissive; which doesn't appear to be required. You literally saved me from going back to 4.4.2, just for V4A btw:good:

Among other things, creating a recovery flashable zip has fallen through. I have come across a problem where I can't modify init.qcom.post_boot.sh from a recovery, be it SafeStrap or FlashFire. I have also discovered something else, init.d support was supposed to be included with Walter.White's Lollipop ROM, but his script encountered the same problem as me, it couldn't append to init.qcom.post_boot.sh. So right now anyone using his ROM does not have init.d setup, luckily, it can be very easily enabled. All you have to do is add
Code:
/system/etc/init.d*
to the end of init.qcom.post_boot.sh and create an init.d folder in /system/etc and you are good to go. I have attached an init.d script to the main post that can make use of init.d and do the bypass.
Answers my second question about init.d. :good:

Have been debating whether to stay on Alliance or go back to OTA, seeing as how I don't use the customization settings & need NFC
 
  • Like
Reactions: Namelesswonder

Namelesswonder

Senior Member
Jan 26, 2014
175
206
83
Exactly why I asked... lol

Looks like it is only required when setting SELinux to permissive; which doesn't appear to be required. You literally saved me from going back to 4.4.2, just for V4A btw:good:



Answers my second question about init.d. :good:

Have been debating whether to stay on Alliance or go back to OTA, seeing as how I don't use the customization settings & need NFC
I originally stayed off of Lollipop for a month because I couldn't get V4A to work, but I tried to find a solution after people got it working on the Galaxy S6.

I made this guide because using MultiSystem to set SELinux to permissive did not fix the issue. It was like the policies for SELinux were still being enforced. Also, I made a mistake for the init.d code, it should be
Code:
/system/etc/init.d/*
. Currently stock rooted Lollipop is ok, with Xposed now working and Wanam just recently updated you can make stock usable now.
 
Last edited:
  • Like
Reactions: KTownGT

KTownGT

Senior Member
Aug 23, 2009
496
551
0
Dallas
I originally stayed off of Lollipop for a month because I couldn't get V4A to work, but I tried to find a solution after people got it working on the Galaxy S6.

I made this guide because using MultiSystem to set SELinux to permissive did not fix the issue. It was like the policies for SELinux were still being enforced. Also, I made a mistake for the init.d code, it should be
Code:
/system/etc/init.d/*
. Currently stock rooted Lollipop is ok, with Xposed now working and Wanam just recently updated you can make stock usable now.
Same pretty much. It's painful going from using V4A & a USBDAC to straight LP.
 
  • Like
Reactions: Namelesswonder

SilverStone641

Senior Member
Jul 1, 2009
1,072
57
0
Dallas
Thanks OP! Got it all working and the sound quality has definitely improved. Question though, in past versions I loved adjusting the IRSamples. Is that no longer a thing in this latest version?
 

hllah66

Member
Dec 12, 2013
9
1
0
Viper4android worked again!

What you will need:
  1. To be on Lollipop WITH root (go here if you need to flash the rooted ROM)
  2. BusyBox to be installed (it should already be installed on the rooted ROM, if not then search the Play Store or use your favorite one)
  3. A copy of Viper4Android v2.3.4.0 (Download from here)
  4. A file browser that can access the /system partition and change permissions (I prefer ES File Explorer but you can use whatever you like)
  5. Titanium Backup (or you can use the application manager in the Settings app)

Firstly, what you will need to do is use your file browser and create a folder called "Viper4Android" in your /system/priv-app/ folder. Set the permission for this folder to rwxr-xr-x or 0755, then paste your Viper4Android APK into the folder you created and set the permission for the APK to rwxrwxrwx or 0777, with root being owner and group for both folder and APK.

Secondly, what you will need to do is browse to /system/etc/ with your file browser and open the file init.qcom.post_boot.sh and at the very bottom of the file paste this:
Code:
/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"
It is imperative that you make sure you are using Unix line endings instead of anything else.

Thirdly, use Titanium Backup or the Application Manager to freeze SoundAlive, as all music apps will attempt to default to it. Also you may want to freeze the Adapt Sound app, as if you enable it will then be used over V4A.

Lastly, reboot your phone and then install the drivers and reboot one last time. I can confirm that it works on Play Music, and that it doesn't work on the stock Music player (however I believe there is a way to get it to work somewhere on the internet).

Problems:


You are to create it as a system app, so follow the first step.


Make sure you followed the first step correctly and set the proper permissions.


Make sure you pasted the command into the init.qcom.post_boot.sh file and that you used Unix line endings, as using DOS or Mac line endings add extra characters that Android will try to parse as actual text.


This bug happens sometimes, I found the best way to beat it is to open your BusyBox app and just put it in the background and try the driver installation again.


Make sure you freeze SoundAlive and Adapt Sound, as they will be used before Viper4Android, also you may need to put V4A into Compatibility mode to use with certain music players. Also you can't use the stock Music player (but I think there is a way somewhere on the internet).


Then you may want to wait until a recovery flashable zip is made, but at no point are the steps going to brick your phone, you can just boot to Safestrap or flash back.


Notes:
This process can probably be done very easily with a init.d script and a recovery flashable zip, but I currently don't have the time and don't want to risk screwing up someone's phone.
You can use any other Viper4Android mod, as long as it is v2.3.4.0, I prefer this version which looks very nice. You can extract the file from the zip attachment and just follow the steps here.
You do not need to have SELinux set to permissive, as even with using MultiSystem to set it to permissive, it still didn't work until the above command is used.
I haven't tested whether effects like convolver or DDC work, but they should.

Thanks to:
@ihancioglu for the code that allows it to work
@nappent for most of the steps needed to get it running

EXTRA:
Here is an init.d script that will do the bypass for you, however, you must have init.d support. As it stands right now, Walter.White's Lollipop ROM does not have init.d, if you want to enable init.d, you have to add
Code:
/system/etc/init.d/*
to the end of init.qcom.post_boot.sh and create an init.d folder in /system/etc.
Script: https://mega.nz/#!ZpIUCbrb!QONi8bWb1afE47_JnwxgpBcXoKFuPG3mpnyFX4r83G0
I used link2sd to covert music & video players from system to user apps & viper4android worked greatly!
 

Namelesswonder

Senior Member
Jan 26, 2014
175
206
83
I used link2sd to covert music & video players from system to user apps & viper4android worked greatly!
Good to know that is what you have to do to get V4A working on stock Music and Video Player. I don't know if that would bring up any issue, but nice find.
 
Last edited: