• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE][Android 11][Viper4Android] Viper4Android on Android 11 with Selinux Enforcing

Search This thread

asyran

New member
Jul 3, 2021
2
0
Maybe this post will help someone lost like i was... :

(I have a OnePlus 7 Pro, Android 11, and Magisk v23.)

- V4A was "Abnormal"
- With the "Permissive SELinux mod" -> No SIM Cards !

Then, I just installed the V4A FX from Magisk repo.
-> Nothing else ! (No Audio Compatibility Patch, Audio Modification Library, or other mods.)

Launch V4A -> Install Drivers -> Reboot.

With a Root Explorer, find this file :

/data/adb/modules/ViPER4AndroidFX/post-fs-data.sh

add these lines in the file :

magiskpolicy --live 'allow audioserver audioserver_tmpfs file { read write execute }'
magiskpolicy --live 'allow audioserver system_file file { execmod }'
magiskpolicy --live 'allow mediaserver mediaserver_tmpfs file { read write execute }'
magiskpolicy --live 'allow mediaserver system_file file { execmod }'
magiskpolicy --live 'allow audioserver unlabeled file { read write execute open getattr }'
magiskpolicy --live 'allow hal_audio_default hal_audio_default process { execmem }'
magiskpolicy --live 'allow hal_audio_default hal_audio_default_tmpfs file { execute }'
magiskpolicy --live 'allow hal_audio_default audio_data_file dir { search }'
magiskpolicy --live 'allow app app_data_file file { execute_no_trans }'
magiskpolicy --live 'allow mtk_hal_audio mtk_hal_audio_tmpfs file { execute }'

Reboot -> V4A Settings -> Legacy Mode !

Fully working V4A on Enforced Android 11 :)
Hi. How do you set SELinux back to enforcing? My device is Oneplus 7T. I tried SELinux switch app, it does turn back to enforcing but still no sim card and reverts back to permissive on next reboot. Thank you.
 

Madfr59

Member
Jun 14, 2019
8
8
Hi. How do you set SELinux back to enforcing? My device is Oneplus 7T. I tried SELinux switch app, it does turn back to enforcing but still no sim card and reverts back to permissive on next reboot. Thank you.
Uninstall Magisk from his manager app. Manually download the latest firmware, and do a local update. You will loose every Root functions... But you have your sim cards !
Now you can re-root your device like a brand new
 
Last edited:

asyran

New member
Jul 3, 2021
2
0
Uninstall Magisk from his manager app. Manually download the latest firmware, and do a local update. You will loose every Root functions... But you have your sim cards !
Now you can re-root your device like a brand new
Thank you for the fast response. I'm only gonna lose root functions but other data and files (pictures, videos etc) will remain right?
 

vasillek

Senior Member
Jun 4, 2010
222
50
Zlín
so... tried many solutions, nothing, but this one works
But... just checked and my selinux is set to permissive... not sure if it's caused by this version of v4a or something else. Using a11 pixyos 4.0.10 on onclite...

UPDATE: yes it set my selinux to permissive... rolled back

then i tried last chance what Balim alid and Drigo wrote... FINALLY IT WORKS and selinux enforcing... thanks!
 
Last edited:

observingman

Senior Member
Mar 24, 2013
159
20
ViPER4Android 2.7.1.6
Install this archive and nothing else is needed in addition.
For android 10 / 11.
Mmmmmmh... I've been scratching my head tooo many days, about why a specific payment banking app was not working rooting my phone, and I think (I'm still not sure 100%) that this module is the reason, because it enforces selinux permissive mode and banking app detects it. For the first time, I'm testing with no issues my banking app for many hours, without this module...
 

d3viou5

Senior Member
Jun 4, 2007
174
27
I removed all viper related and audio mods from magisk. Uninstalled viper app.
Before step 1, I installed Audio Modification Library in magisk.
Did all steps mentioned above. However viper 2.7.1.6 app would force close.
So I uninstalled it, installed 2.7.2.1 again and turned on "Legacy Mode" in Viper 2.7.2.1 Settings. BOOM!
It showed NEON enabled and status Normal.
Can confirm its working on my OP 8T custom rom, Android 11, Magisk 23!
BTW its a super mod! Thanks to all the devs :) and for the above instructions!

Hope this helps someone.
Can you confirm that SELinux is enforcing? I have not been able to do this on the OnePlus 8 Pro with enforcing. I originally used the zip in the start of this thread, and even when uninstalling it through Magisk it left SELinux in permissive and I couldn't change it back even with SElinux mode changer. It works, but as much as I love V4A having a permissive kernel freaks me out.
 

Drigio

Member
Jan 9, 2015
9
6
Can you confirm that SELinux is enforcing? I have not been able to do this on the OnePlus 8 Pro with enforcing. I originally used the zip in the start of this thread, and even when uninstalling it through Magisk it left SELinux in permissive and I couldn't change it back even with SElinux mode changer. It works, but as much as I love V4A having a permissive kernel freaks me out.
Yes I have my SELinux set to enforcing.
 

GoogleMeGirl

New member
Mar 7, 2016
2
0
29
It needs to be installed through magisk, not through recovery.
I'm using the most recent Magisk App 23.0 (23000) and when I go to Install from storage, the zip is greyed out and I can't select it. Any idea why this is happening?

EDIT: Ok nevermind just figured it out haha. I installed a new file explorer (CX File Explorer) and when using that the zip was no longer greyed out.
 

hug0o

New member
Dec 25, 2021
1
0
for mojito , redmi note 10 user , with pe+ 11 rom ,
1.first disable musicfx app in system ,
2.install busybox magisk , reboot ,
3. install audio modification library , reboot
4. install viper in magisk ver 2.7.2 , then install driver then reboot
5. remove viper app , install viper 2.7.1.6 by Baim alif
, app will be force close as Drigio mentioned, then reinstall viper 2.7.2 app , walla it is working now
Works with galaxy tab S7 ! A11, Magisk 23. Thank you !
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    ViPER4Android 2.7.1.6
    Install this archive and nothing else is needed in addition.
    For android 10 / 11.
    5
    Maybe this post will help someone lost like i was... :

    (I have a OnePlus 7 Pro, Android 11, and Magisk v23.)

    - V4A was "Abnormal"
    - With the "Permissive SELinux mod" -> No SIM Cards !

    Then, I just installed the V4A FX from Magisk repo.
    -> Nothing else ! (No Audio Compatibility Patch, Audio Modification Library, or other mods.)

    Launch V4A -> Install Drivers -> Reboot.

    With a Root Explorer, find this file :

    /data/adb/modules/ViPER4AndroidFX/post-fs-data.sh

    add these lines in the file :

    magiskpolicy --live 'allow audioserver audioserver_tmpfs file { read write execute }'
    magiskpolicy --live 'allow audioserver system_file file { execmod }'
    magiskpolicy --live 'allow mediaserver mediaserver_tmpfs file { read write execute }'
    magiskpolicy --live 'allow mediaserver system_file file { execmod }'
    magiskpolicy --live 'allow audioserver unlabeled file { read write execute open getattr }'
    magiskpolicy --live 'allow hal_audio_default hal_audio_default process { execmem }'
    magiskpolicy --live 'allow hal_audio_default hal_audio_default_tmpfs file { execute }'
    magiskpolicy --live 'allow hal_audio_default audio_data_file dir { search }'
    magiskpolicy --live 'allow app app_data_file file { execute_no_trans }'
    magiskpolicy --live 'allow mtk_hal_audio mtk_hal_audio_tmpfs file { execute }'

    Reboot -> V4A Settings -> Legacy Mode !

    Fully working V4A on Enforced Android 11 :)
    4
    another way.... enforcing Android 11 (R)
    1.install busy box (magisk module)
    2.reboot
    3.install viper 2.7.2.1 apk - self reboot
    4. uninstall viper application
    5. install viper 2.7.1.6 apk
    6. enjoy
    I removed all viper related and audio mods from magisk. Uninstalled viper app.
    Before step 1, I installed Audio Modification Library in magisk.
    Did all steps mentioned above. However viper 2.7.1.6 app would force close.
    So I uninstalled it, installed 2.7.2.1 again and turned on "Legacy Mode" in Viper 2.7.2.1 Settings. BOOM!
    It showed NEON enabled and status Normal.
    Can confirm its working on my OP 8T custom rom, Android 11, Magisk 23!
    BTW its a super mod! Thanks to all the devs :) and for the above instructions!

    Hope this helps someone.
    3
    First of all, I found this solution on Youtube. I spent hours finding a solution through forums because I like reading. I finally gave in and watched a Youtube tutorial. So this guide is for everyone who prefers reading like me.

    1. Install Magisk 21.0. As of writing this is not the latest build (21.1). 21.1 does not seem to work with V4A on Android 11.
    2. On Magisk Manager, install the module Audio Modification Library. Reboot.
    3. On Magisk Manager, install Viper4Android. Reboot.
    4. On Viper4Android, a prompt to install drivers will appear. Proceed and install. Device will automatically reboot.
    5. On Viper4Android, go to settings and turn on Legacy mode. Driver status now should be Normal and audio format supported.

    I am using Poco X3 NFC and Arrow OS. But the solution apparently works on other phones with Android 11.

    Credits to munchy. Video can be found here:
    .
    2
    another way.... enforcing Android 11 (R)
    1.install busy box (magisk module)
    2.reboot
    3.install viper 2.7.2.1 apk - self reboot
    4. uninstall viper application
    5. install viper 2.7.1.6 apk
    6. enjoy