yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] BlueJeans:
Thanks for the explanation.

I didn't install AML, I only installed viper from magisk, opened the app to install drivers, rebooted, status was abnormal as expected. So I moved the script to the modules folder, and rebooted, this made viper work however it had set selinux to permissive. So I opened the script again and added "setenforce 1" at the end and it works now in legacy mode while selinux is enforcing :D

This is what my current script looks like

#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}

setenforce 0

# This script will be executed in late_start service mode
# More info in the main Magisk thread

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

setenforce 1

Please let me know if you know of a less hacky implementation.

Thanks

EDIT: Attached the file in case anyone needs viper on Android 11 while keeping selinux as enforcing.

1. install Viper from Magisk

2. Open the app, install drivers reboot

3. Go to data/adb/modules/viper4androidfx and replace post-fs-data.sh with the one attached.

4. Reboot and then switch viper to legacy mode

5. Profit

EDIT 2: Can anyone make viper 2.7.1.6 compatible with Android 11? I'm using 2.7.2.1 but I don't know what the dev has changed in this version but the "field surround" feature sounds so bad in this. 2.7.1.6 straight up crashes on Android 11 so can't really go back to it.
[Android Apps and Games] hachamacha:
Thanks - To me, that still functionally does the same thing as without the final setenforce 1. (but maybe not under all startup timing & context circumstances.

I'll give this a quick test in Linux. There's way too many layers of functionality in selinux that I don't understand to give advice on better implementations. I think if it works for you and doesn't cause unintended side-effects, it's a good enough implementation. - -

If I knew more about the actual changes between Android & plain-old-linux I'd spend more time on it. All I wound up doing was testing setting selinux in a shell script in linux and as expected by me anyway, it works only for the duration of the shell script. If you ran the script in the orginal context (. scriptname.sh) then entities after the script runs are able to see changes you made in the script. (e.g. export SELINUX=enforcing, etc)
[Android Apps and Games] Lord Sithek:
I made 2.7.6.1 work on A11, signing the apk with PLATFORM key in MixPlorer. First you have to install 2.7.2.1 and install driver, then uninstall original apk and install the singed one
[Android Apps and Games] BlueJeans:
Tried it, it isn't force closing with platform signed key in MixPlorer but the app is opening blank white screen and gets stuck like that. Any suggestions?
[Android Apps and Games] gfrank227:
OK, so I'm running V4A in legacy mode on my Moto G8 Plus running android 10. It works in legacy mode with SeLenux set to permissive. However, sometimes after not listening to music for awhile, it stops processing.

In order to get it to start processing again, I need to first force a stop on the v4a process. Then i go back into the app, toggle off the master power, then toggle legacy mode off and back on again, and then turn the master power back on.

Does anybody know why this happens and how to stop it from happening?

Thanks.
[Android Apps and Games] BlueJeans:
Same thing happened on oxygenOS. Turn off battery optimization feature for viper.
[Android Apps and Games] gfrank227:
Ok I tried it. I was optimistic for awhile. Seemed to keep working all afternoon. Then I felt stupid because that's pretty obvious. But it happened again just now. Not sure. Will keep an eye on it. Could it be running into RAM shortage problems during high usage times and being forced out of the RAM memory?
[Android Apps and Games] hachamacha:
It's inexplicable but for the first time, Viper doesn't do that for me with V11 stable & 11.0.0.2 stable, it just stays running all the time. My info and Viper version info is up here in this prior post https://xdaforums.com/t/app-all-root-solutions-6-0-viper4android-fx-2-7.3774651/post-84932443

I've got no idea why, but since other than 11, the big Viper change for me is all the selinux commands in the post-*.sh file that're being run. (see link)
[Android Apps and Games] GrayNerd2045:
I have a problem with V4A on my Redmi 7. Tried to flash this on Magisk repo and then ask to install the driver, it doesn't work. Any some possible fix or something? Android 11 on PixysOS 4.0.5.
[Android Apps and Games] gfrank227:
Try Installing audio modification library first. Then install V4A and install drivers and reboot. Then disable AML and reboot. Then go back in to V4A. Should reinstall drivers again. This has worked for others on Android 11 according to this thread. Worth a try. Also did you try toggling legacy mode?

As for myself, I'm running android 10 and trying to figure out a way to keep it from clearing out of memory when using other apps.
[Android Apps and Games] GrayNerd2045:
Yes. I tried to downgrade Magisk to 21.0 and it works. And updating to latest Magisk again no problem. Also yes, turned on legacy mode, it does work fine.
[Android Apps and Games] Manu23l:
I am on LineageOS 18.1 on a Moto X4.

Should V4A work for call audio as well?

It works well with media of any kind and with data-calls (such as skype or whatsapp), but not for the dialer app. The "Driver status" tells me "Processing: No" when in a call.

This is unfortunate because I installed it to lower the call volume, which is high enough that it hurts.
[Android Apps and Games] phongkill2002:
NWill it work in tandem with nlsound v2.3?
[Android Apps and Games] paul_cherma:
I was able to get viper working on s21 ultra but I can't load presets or even create presets. Any way I could fix that?
[Android Apps and Games] observingman:
Yesss ! Worked for me on mi mix 2 and crdroid with android 11.... Thanks !
[Android Apps and Games] observingman:
By the way... Do you know why that works ?
[Android Apps and Games] gfrank227:
No idea. I got the idea from someone else's post. I'm just very happy to get it working.

Glad to hear it worked. Happy to help.
[Android Apps and Games] purgy:
I just wanted to say thanks so much for this, works perfectly on 11 (pixel 3a) without all the hassle that I'm used to going through to get viper working. Flash, reboot, grant root and done.

Edit- seems to leave se Linux as permissive
[Android Apps and Games] DiamondJohn:
if you search, you will see that I have modified one of the scripts, to switch to enforcing, after a short delay. I now run enforcing, after a minute or two after boot.

As for root, its only required for first boot (if that). I have disabled root for Viper, and its working fine on mine. It does appear to attempt to use root on boot, as now (if I do not switch off the toast) I get a toast telling me Viper was denied root. But it still works.
[Android Apps and Games] observingman:
Seems to work on crdroid with android 11 and mi mix 2... but the fact that it has to set OFF the enforcing SELinux, worries me somehow.I have ROOT disabled for viper and still works.
[Android Apps and Games] observingman:
1 hour later it stopped working, so now I'm using that mysterious viper4android 11 file...
[Android Apps and Games] purgy:
Thanks, I found that script, its currently set to wait 3 minutes before setting enforcing, I'll try to lower that a bit. Thanks again
[Android Apps and Games] DiamondJohn:
I was originally planning to try lower and lower values (half it each time), but never got around to it. Let me know how you go with the lowest value that reliably works. When you get a value, i'll edit my original post to include a link to your new results/adjustment post.

But, finding the actual SElinux rule that is blocking Viper from initializing, and adding it to the policy, would be even better. I have a app (TeMeFI) that can generate the SELinux allows, based on the denials logged in a logcat.
[Android Apps and Games] _mysiak_:
You mean these SElinux rules..? :) Viper team already identified and prepared them, they just need to be applied slightly differently in recent Magisk versions. For example this way. ;)

https://xdaforums.com/t/app-all-roo...android-fx-2-7.3774651/page-249#post-84121895
[Android Apps and Games] DiamondJohn:
The Magisk module I currently use has explicit allows, but from memory (I upgraded to A11 end of last year, so its getting on in time since I originally tried it), if it does not boot up permissive, it fails to run. This implies something is missing.
[Android Apps and Games] _mysiak_:
Viper works just fine with SElinux enforcing and those Magiskpolicy rules properly applied on A10 and A11 (confirmed on MIUI and many other phones with the latest Viper version).
[Android Apps and Games] DiamondJohn:
those allows are exactly the same allows created using the viper for A11 zip I posted somewhere in this thread, and working for manhy others,. The bug difference, is that the sepolicy changtes are made using the (I think) newer srepolicy.rule file, and are specifically contained within the Viper module itse;lf, and not associated with the magisk install itself. So, disabling or removing the viper module will disable or remove the sepolicy changes as well. Its encapsulated within the viper module itself.

However, I am pretty sure I tried removing the permissive switch script completely, and it broke viper. I am running a Pixel 4a with the latest A11, and its running the ViperFX version, as posters just above have found, it also works for them (ie its not just me). And its a pretty simple inslstall using a Magisk module.
[Android Apps and Games] _mysiak_:
I am not going into this debate with you again. You were wondering what SElinux rules need to be created so I just provided the info. If you feel the need to reinvent the wheel, I don't really mind.. :)
[Android Apps and Games] purgy:
After applying those changes am I ok to then just setenforce 1 in terminal and delete permissive.sh?
[Android Apps and Games] _mysiak_:
Yes. You can try it before making "permanent" changes - remove permissive script, reboot your phone, start Viper. It should state abnormal status. Now run Magiskpolicy commands (from terminal emulator/ADB/script/..) and open Viper again. Toggle legacy/compatibility mode to force refresh of driver and Viper should start working.
[Android Apps and Games] DiamondJohn:
It wasnt a debate.. I was informing you (as I have done previously) or others who read these posts (as its not just about you) that those exact rules are aleady covered in the magisk installation zip, automatically. There is no reinvention of the wheel, and the same thing could be said about instigating those exact rules, and if anything, why do it manually when the wheel is already neatly packaged in a zip, that the most basic of users can install without the risk of typos, file permissions, placement etc etc. You can see many posts referencing that this zip has worked for multiple users (Actually, I have not read of a single users explicitly saying it has not worked for them in A11). I did not create the zip. I have attributed it to the creator.

https://xdaforums.com/t/app-officia...ew-features-7-0-support.2191223/post-84908237

There was no debate, I simply stated some of the other advantages over creating the script manually in the shared scripting path. There is no need to take it personally if someone highlights an alternative way, with alternative benefits.
[Android Apps and Games] DiamondJohn:
EDITY: actually, as I walked away I realied the following.

Half the posts on XDA are about how to do something to make your phone better, and the other half are about how to do it better. Thats the concept of XDA.

So stating the virtues of one method over another is well within the above.
[Android Apps and Games] DiamondJohn:
I spent a few minutes on it last night, and cut my time / delay down to 90 seconds (ie half), and for the last 3 reboots, viper has worked every time. I'll just let it be for a while to check it reliably works.

I also checked if there were any SE Linux denials on boot, and I didn't find any. One single boot, and possibly the denial happens before the logcat is commenced. further investigation required. But no rush. see above.

Also, the other thing I did, I moved the "permissive.sh" script out of the Magisk shared/global service..d area, and renamed it to service.sh and moved it into the actual Viper module itself. That way it is encapsulated in the module, so if I ever disable or uninstall it (not that i ever would), there will be no undying remnants of viper within magisk. Not that it matters, but I explicitly run my wait and set enforce asynchronously (ie non-blocking). From my understanding all service.d (or service.sh) scripts are already non blocking; ie its not required to explicitly run it thus, it already is.
[Android Apps and Games] purgy:
Yeah I've gotten it down to 2 minutes, good to know it can be pushed down further.

If this other method works without enabling enforcing at all it would be preferable, if only to stop lsposed from complaining that selinux is permissive, when getenforce verifies that it is in fact enforcing.
[Android Apps and Games] DiamondJohn:
Well, Ive gone 90s, its your turn to go 45s ;) Whenever testing/finding boundary conditions, always go halves as a starting point, then half a step up to the value that did work. I think its called Newtons Method

Its a timing thing, Remember, I tested without permissive a few months ago. Maybe I was wrong or remember it wrongly. Also, maybe inserting a short delay before it is set to permissive, may let the other module initialise as enforcing, before Viper takes advantage of it being permissive. I don't need it, so your on your own on that one.
[Android Apps and Games] vibrantliker:
Anyone know how to get around the com.pittvandewitt.viperfx folder being write protected after updating to latest firmware? (Samsung 21+ Ultra AUE1)

so I can add my own presets, kernels, etc?
[Android Apps and Games] vibrantliker:
+1
[Android Apps and Games] wasim9283:
Can you please help me with full steps,,, I'm on

s20 plus
[Android Apps and Games] vibrantliker:
try this:

Install in order

Viper4androidFX via Magisk

Reboot

Audio Modification Library via magisk

Reboot

Push the file to data/adb/modules/ViPER4Android/ that i have uploaded and set permission 644

(it should now be data/adb/modules/ViPER4Android/post-fs-data.sh)

Reboot

Open viper, set to legacy mode, then check if status is now normal
[Android Apps and Games] vibrantliker:
Anyone??
[Android Apps and Games] purgy:
Doesn't work for me unfortunately, has the location that the script needs to be changed again with magisk 23?

I also tried the install aml, install viper, activate driver, reboot, disable aml etc etc trick, but no go with that either.

For now I guess I'll just live with the brief period of permissive.
[Android Apps and Games] DiamondJohn:
I have posted an adjusted script somewhere on here, that automatically switches to enforcing,currently after 90s of being permissive.
[Android Apps and Games] purgy:
Yep I'm currently using that, set to 100 seconds for the moment.
[Android Apps and Games] _mysiak_:
I have moved to JamesDSP, but I just tried if these instructions still work..and yes, on my phone I am still able to use Viper with those magiskpolicy commands (even if applied from terminal emulator). No other audio module is active and I don't need aml either. I'm on Magisk 23 and MIUI 12.
[Android Apps and Games] RheinPirat:
Is anyone runnig V4A on a MIUI 12.5.x (A11)? Everytime I try to install the driver (tried many diff. methods), the driver wont install at all.
[Android Apps and Games] Elcosomalo:
Does anybody here have an instruction manual or something to learn what does every option do in the app? I don't know who designed it but it has some high horse sindrome or something to call the settings things like "Channel displacement" to the good old channel balance....

I've seen things like the compressor have settings named like "inflection point" which I don't have the most remote idea of what is does.

I cannot find information on the web on what the options do; all I find here in XDA is how to make the app work on X phone model.

I need to set it up to be some kind of auto-volume so different youtube videos stay at the same volume and also compress them so quieter parts can be heard and louder parts don't freak me out (mostly voices and loud piano songs in the same videos, voices very quiet and piano very loud).
[Android Apps and Games] Lord Sithek:
Viper came into existance many years ago and it has been abandoned by the original devs. That's why its unofficial right now. @Team_DeWitt put much effort to bring it to the newer Android versions and it's really great. As far as I remember, since 2.7.6.x version it has short descriptions when you long press on a feature name. There is a guide with more information prepared by the original dev team, but it was created long time ago and some features are not present right now or named differently. Im attaching it
[Android Apps and Games] Elcosomalo:
Thanks Lord Sithek! being honest, the information is not very useful but it is much more that what I could find. I think we should ask @@Team_DeWitt to make some kind of instructions document.
[Android Apps and Games] Elcosomalo:
@Team_DeWitt:

Please make an instruction manual detailing what do the options in the app do. Its impossible to understand what they do and for worse, some of the options have really weird names.

Please explain what the main settings AND subsettings do in this app.
[Android Apps and Games] DiamondJohn:
Terms like "inflection point" are actually used in digital music production. Viper is an advanced application and as such requries advanced understanding. Sure, some terms are not common to you or me, but its a biug world out there, and sometiomes to use something, the onus is on us to do the personal research.
[Android Apps and Games] _mysiak_:
This can be probably answered mainly/only by the original devs who provided closed source audio driver. Most of the functions have correct names - at least in English, not sure if/how are they translated to other languages. For some exotic settings you'll need to try them for yourself (or avoid using "unknown" features).
[Android Apps and Games] iamMG:
Posting this here in case someone needs it. I was able to make Viper4Android v2.7.2.1 work on my OnePlus 7 Pro running on OxygenOS (OOS) 10.3.8 (Android 10), with Magisk 23.

I followed the steps given in this thread on Reddit, which I am reiterating and rewording below (credits to @CR7Raees):

Currently, I've just tried it out on my phone's speakers, but I am pretty sure it would also work with my headphones. Will report back and edit below.

Edit: Yup. Working gorgeously with my XM3.
[Android Apps and Games] ProfHastings:
Hi everyone! I'm having trouble downloading the latest APK as the download link given in the first post is redirecting me to a generic XDA Labs update message. So where can I find the actual APK? Thanks!

PS: I really hope the old rootless driver installation without magisk is still working. I'm reading more and more messages focusing on magisk, but I'd like to stear clear of that so as not to upset banking apps and so forth...
[Android Apps and Games] shadowstep:
Here you go:
[Android Apps and Games] Elcosomalo:
That is the problem right there: how do we know what the options do if we are not sound ingineers and there is no information available on what the options do?

Everybody here in XDA talks about "beginners" and "experts" but no experts seem to be coming to this places since nobody knows what those "advanced" options do. :unsure:
[Android Apps and Games] Choqolate Puma:
Hey guys, i've a problem with v4a, when i got a notification, the v4a stops working during the notification sound, when it ends, normally like 1sec, it works again, it's annoying.

Any ideas?
[Android Apps and Games] DiamondJohn:
The old non magisk way is definitely root. It modified your system partition to install the required drivers.
[Android Apps and Games] DiamondJohn:
This is not the place to cover the basics of sound engineering. There are thousands of articles on the web already that cover that. This thread would be bloated beyond belief if it contained all that info. XDA is a developer forum not a beginners support site; especially for a free app. A simple web search and read would give you the info on using apps such as Viper. If ypou drive a car, you should learn how to drive first, not expect the sale people to teach you.
[Android Apps and Games] Donopatay:
I don't know if this is the right place to ask this but does anyone have an idea why my phone's camera stops working only when I install Viper4Android?

Been trying to search the internet for a long time trying to find for a fix this. My device is a "Xiaomi Redmi 6A" on an Android 11 custom rom.
[Android Apps and Games] gfrank227:
I just tried this on Moto G8 Plus running Android 10 and driver 2.5.0.4. It worked as intended, and now i can use V4A with SeLinux set to enforcing. Thanks!
[Android Apps and Games] purgy:
I tried again, and it does work with no need to set selinux to permissive, thanks so much!. It probably did work the first time I tried it, the issue is I can't get it to play nice with Poweramp, but it is working on YouTube etc.

I've tried the disable dvc, enable musicFX in audio settings, but that hasn't had any effect.

Edit- needed audio compatibility / aml mods.
[Android Apps and Games] MarkLev:
Hi, it's not working for me. When I tried to run the script in terminal I got the below error.

$ su
# sh /data/adb/modules/ViPER4AndroidFX/post-fs-data.sh
source type app does not exist
Error in: allow app app_data_file file execute_no_trans

Comment out the line:

# magiskpolicy --live 'allow app app_data_file file { execute_no_trans }'

Error goes away, but still no luck getting it work. Any idea?

My phone is redmi note 8 pro, android 9, rom xiaomi.eu 11
[Android Apps and Games] TheFerhatKing:
Anyone managed to get Viper working with Android Auto? It doesn't let me process via Bluetooth only via speaker where the options are limited. Using the latest version of the app..
[Android Apps and Games] ProfHastings:
I'm sorry, I'm afraid I don't quite get it. I'm talking about the V4A "rootless driver installer" from this page: https://zackptg5.com/android.php

It's a ZIP file which needs to by installed through a custom recovery like TWRP. Of course TWRP has full access to the file system, but as far as I understood, Android itself didn't have to be rooted at all----hence the name. This means that banking apps and so forth were working like a charm----at least in my experience. Please correct me if I'm wrong...
[Android Apps and Games] Cane Phoenix:
Is there a way to disable the permanent notification? It takes space from "real" notifications, in the notification drawer... It might not matter much for people with longer screens (like 21:9 aspect ratio or more, like new phones have), butt mine is shorter (16:9). I need the space.