yashsingh1/xdaforums huggingface dataset:
[Magisk] Didgeridoohan:
If you use only V4A you don't need AML. The sound mods are now separated and you only need AML is you use several Unity modules at the same time, V4A + Dolby, etc.

Uninstall both AML and V4A and only install V4A, from the Magisk repo. That should hopefully work. If it doesn't, take a look in the OP for troubleshooting steps.
[Magisk] deepu458:
Hi Buddy, thx for trying to help us here. Even me in the same boat with same device and OS configuration. I tried uninstalling AML, Universal Deep Buffer _ removal. and then rebooted to install Latest v4a mod and still the same I/o Error.

Attached is the magisk log that i got while installing the mod on Oreo 8.1
[Magisk] return.of.octobot:
I ran through the process again, but like I said I had originally installed only V4A and received the same result, trying to install AML was just a Hail Mary. Upon second attempt installing only V4A, it's the same deal. App reports driver needs to be reinstated, followed by an I/O error. I'm throwing up a new Magisk Log from this attempt but I'm not sure it's a whole lot different than the first other than we're looking exclusively at V4A.

I'm assuming we're dealing with an sepolicy related issue here, which may be a bit over my head to diagnose, but I'll take a stab at it.

I'm just a bit vexed here because I know older versions of this module w/ AML worked on this device so at this point I'm not sure if a ROM update or a module update is the culprit.

Am I understanding you right? You're also using the PH-1 on 8.1B1? That'd make me feel a whole lot better just knowing I've got someone else to bounce ideas off of.
[Magisk] deepu458:
Yes i to have the same device and OB 8.1 from essential yesterday. In regards to the issue its having issue with old module as well. All this issue is just because of Oreo 8.1. I had installed the latest on OB3 and never had any issue. I think these Devs(masters) can figure out a little bit to help us.

even i too think this issue is with Sepolicy.
[Magisk] carlese:
Hi guys, I installed this module on my op5 (xXx rom) but it works only 1 time (first boot) then nothing.. I tried to reboot, enable and disable, reinstall but nothing changes.. What can I do?
[Magisk] return.of.octobot:
So, just for the record, I tried running both this and ShadySquirrels V4A modules with the device in permissive mode and it changed nothing, both modules failed in the same way we've already established. I'm wondering now whether it's actually an SELinux issue or if it has something to do with device encryption? I'm really just taking a stab in the dark at this point.
[Magisk] Didgeridoohan:
Deleted... Weird double post.
[Magisk] Didgeridoohan:
[MENTION=6474612]return.of.octobot[/MENTION] [MENTION=6409421]deepu458[/MENTION]

Sounds like there's a very specific issue with your device/ROM. Those can be tough... Took quite a lot of experimenting before [MENTION=6037748]Zackptg5[/MENTION] could figure out a similar issue on OnePlus 3/3T Oreo.

The interesting thing with your issue is that the app asks to "reinstall" the driver. That sounds like it detects the driver, but there's something wrong with it. That's probably a hint towards what's going on, but I'm not the one to figure that one out...
[Magisk] return.of.octobot:
That's right, I posted a larger snippet/complete logcat a few posts back but there were a few lines that jumped out at me, including:

02-15 13:10:08.261 2795 9441 I ViPER4Android: Android audio effect engine reports the v4a driver is not usable

I'm happy to assist with the diagnostics, I know my way around Android well enough to perform debugging tasks. I'd really just need someone well-versed enough with the module/V4A itself to work with and give me an idea of where to begin.
[Magisk] Zackptg5:
Does sound like selinux. Can you send a full logcat after trying to open v4a?

Have you tried opening v4a app, clicking 3 dot menu, select exit, and reopen v4a?
[Magisk] joedajoester:
It fixed it thank you!
[Magisk] MrBrady:
Is there a way to download older versions of this module when Viper and AML were all in one zip?
[Magisk] OSheden:
Please I can't get it working. I tried several things but I still have the abnormal status.

I think I attached all required information and here is my ViPER4Android folder.

OnePlus 3T - Latest build of OmniROM 8.1.0 - Stock kernel Enforcing - No AudioFX app in system folder - ext4 set for /data partition - encrypted - Magisk v15.3

Thank you!!
[Magisk] Didgeridoohan:
Try removing this part of the SEINJECT command in service.sh and reboot:

#pixel
[Magisk] OSheden:
I have removed both lines starting by #pixel and rebooted. No changes.
[Magisk] Didgeridoohan:
There are actually three places with that text in the service.sh file, and your post makes me think you missed the first one. Which happens to be the important one in your case... :laugh:

I should have been clearer... I meant the first, really long SEINJECT command. Towards the end of it there's a couple of policies commented out with "#pixel". The other two "#pixel"s, that I suspect you removed, are for non-Magisk installations.
[Magisk] Zackptg5:
Hmm, I don't even see v4a in the logcat. Can you reboot, open v4a, the take a full logcat and send it? Also, can you send your audio_effect files?

So you don't want to remove the lines with "pixel" in them, you want to literally remove all instances of "#pixel" (should be 3 of them) from the script. Your logs are showing that you need that done for v4a to work (next v4a version will address this)
[Magisk] OSheden:
Ok :) I don't know what I do wrong because it doesn't work. Here is a diff checker before/after: https://www.diffchecker.com/Sk7XEA8R

Is it correct?
[Magisk] Zackptg5:
Nope, use this, you'll see what I mean
[Magisk] OSheden:
This what? Did you forget the attachment?
[Magisk] Didgeridoohan:
Don't remove everything after "#pixel"... Just "#pixel", nothing more, nothing less.
[Magisk] Zackptg5:
Oh ya, whoops. Just replace contents of service.sh script with this:

#!/system/bin/sh
MODPATH=${0%/*}
SEINJECT=magiskpolicy
MAGISK=true
ROOT=""
SYS=/system
VEN=/system/vendor
LIBDIR=/system/vendor
MODID=ViPER4AndroidFX
if [ -d /system/priv-app ]; then SOURCE=priv_app; else SOURCE=system_app; fi

if [ "$SEINJECT" != "/sbin/sepolicy-inject" ]; then
$SEINJECT --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"
else
$SEINJECT -s audioserver -t audioserver_tmpfs -c file -p read,write,execute -l
$SEINJECT -s audioserver -t system_file -c file -p execmod -l
$SEINJECT -s mediaserver -t mediaserver_tmpfs -c file -p read,write,execute -l
$SEINJECT -s mediaserver -t system_file -c file -p execmod -l
$SEINJECT -s audioserver -t unlabeled -c file -p read,write,execute,open,getattr -l
$SEINJECT -s hal_audio_default -t hal_audio_default -c process -p execmem -l
$SEINJECT -s hal_audio_default -t hal_audio_default_tmpfs -c file -p execmem -l
$SEINJECT -s hal_audio_default -t audio_data_file -c dir -p search -l
fi
am start -a android.intent.action.MAIN -n com.pittvandewitt.viperfx/.main.StartActivity
killall com.pittvandewitt.viperfx
killall audioserver
[Magisk] OSheden:
Gotcha! (finally :p) Thanks a lot for your support! V4A is back thanks to your work and answers.
[Magisk] Hadookie:
Same issues here. Essential, 8.1b, Magisk 15.4
[Magisk] deepu458:
Hi, i do have the same issue with the latest version of V4A and same Device with same configuration (Essential Ph-1 - Oreo 8.1 - V4A 1.3.2 - Magisk 15.4)

As u mentioned earlier please find the attached logs that i can generate in regards to this issue.

PS: Forgot to mention one thing. While trying to figure out this issue yesterday i had installed Universal_Deep Buffer removal & this module in magisk. And then after rebooting tried to install AML from ur other thread and surprisingly it only saw the Universal Deep Buffer mod but not V4A mod. If needed tht i can attach that log too. Added teh Universal deep Buffer Install log and see it wont see the V4A mod.
[Magisk] return.of.octobot:
Absolutely, I think I may have been having trouble capturing the full log output but the one I'm attaching now should have remedied that. It's going to be the full readout from boot, to opening V4A a couple of times, to powering off.

I'm also uploading my audio_effects.conf and audio_effects.xml as requested. Wasn't sure if you wanted them pre or post V4A installation so I've included both (labeled stock/v4a respectively).
[Magisk] Zackptg5:
Well there's a ton of denials, can you try setting selinux to permissive and seeing if it works? That'll tell me if it's definitely selinux issue or not
[Magisk] deepu458:
I tried that from Viper settings-> developer mode-> set selinux to permissive but nothing helped for me. and i see my friend had submitted a log and the same audio_effects files just above ur post. We both have same configuration.

Try if that log can help you to identify the issue.
[Magisk] Zackptg5:
Unfortunately, the effects files are all patched properly. What I mean is to have a boot script or an app at boot set selinux to permissive so it's already permissive by the time zygote starts. Copy this post-fs-data script to the magisk/v4a directory and reboot and see if anything changes. Also, can you send me a full logcat after reboot with this script in place?
[Magisk] deepu458:
I tried replacing the file inside the magisk/viper4android folder. But that didnt helped me here. After reboot it still throws the same error For log i need some time as im away from machine and will take some time for me to pull the log. Just a small information for this device after this 8.1 upgrade on of my friend who does aptx magisk mod has changed his code to place his stuff under System/Lib before upgrade it was under vendor/lib. Will that anyway help this scenario identification.
[Magisk] Zackptg5:
Interesting. With Oreo (devices with audio_effects.xml), the lib typically needed placed on vendor. You can try moving the libs to system in the magisk mod directory and then changing their paths in the audio effect files to system and see if it works
[Magisk] return.of.octobot:
As my fellow PH-1 user noted, booting permissive via the post-fs script in magisk/v4a elicits the same results as far as the error goes. However, as requested I'm attaching a full log of the permissive attempt. Thanks for the assistance, whether we get to the bottom of this or not.
[Magisk] Zackptg5:
Can you try the suggestion in my last post?
[Magisk] Zackptg5:
Actually, I had a reason discovery/development in the aml thread which might be the problem here. Can you guys instead try this test build and let me know if it works? If not, can you send me your audio_effects file from the v4a folder?
[Magisk] NiTrOwow:
I really don't know to be honest. I haven't looked at the code. I checked the logs and did not got any wiser. So what I did was, uninstall V4A and the audio mod driver. When I installed any audio mod on my device, apps that mount system failed with resource in use or busy. Don't know why I am back to stock without audio mods and it all works fine now.
[Magisk] yyz71:
Confirmed working on my Pixel 2 alongside Dolby good job :good:
[Magisk] Zackptg5:
Sweet! I'll update all builds soonish

---------- Post added at 19:45 ---------- Previous post was at 19:13 ----------

v4a has been updated to v1.4! Changelog: Add file backup on system installs, Fine tune unity prop logic, Update util_functions with magisk 15.4 stuff, Fix music_helper/sa3d removal in xml files
[Magisk] return.of.octobot:
Unfortunately the song remains the same, doesn't appear to be any behavioral change, but I'll throw up my audio_effects files post v4a-test installation.

I did attempt to do what I thought you were describing, which was move the vendor/lib/soundfx directory to system/lib/soundfx @ magisk/v4a. Then I edited audio_effects.conf to read

libraries {
v4a_fx { #ViPER4AndroidFX
path /system/lib/soundfx/libv4a_fx_ics.so
} #ViPER4AndroidFX
# This is a proxy library that will be an abstraction for
# the HW and SW effects

Also didn't help my case any, but I'm also not sure if I interpreted the instructions correctly.
[Magisk] AlexxAnders:
Hello there! I can't get Viper4Android to install it's driver:( Everytime I reboot it keeps saying that I need to install the driver... I use a Huawei Mate 10 Pro. A few pages back there was another user (@aDarkBox) who has the same phone and the same problems. I followed your progress, hoping you could find a solution. Unfortunately not. Btw, I never could get V4A to run on any of my devices:eek:
[Magisk] BIGWORM:
Sorta copied over from Omni 8.1 thread.

[MENTION=1925116]zackp[/MENTION]tg6, I'm having an issue with V4A running with an LDAC headset trying to process on 8.1, specifically, Sony WI-1000X. davey confirmed V4A A processes on Nougat 7.1, but does not with 8.1. I've already modified the services.sh within V4A Magisk folder itself, and it processes with the phone speaker and wired headphones. Do you want me to pull logs while I'm trying to get it to process through LDAC?
[Magisk] Zackptg5:
Ya, typical logcat should be enough, although if it's not selinux related, I'm not sure exactly what else it would be. Some other users reported switching kernels helps although I don't know what kernels they were using.
[Magisk] exodius48:
[MENTION=5357345]ahrion[/MENTION] [MENTION=6037748]Zackptg5[/MENTION] Can you move installation of v4a into /data/app instead of /system? Because of it won't process any IRS/convolver if installed into system.
[Magisk] 0kk0:
Just wanna letting know that i fixed this issue... so if anyone is wondering how...

add:

am start -a android.intent.action.MAIN -n <ACTIVITY>/.activity.ViPER4Android
killall <ACTIVITY>
killall audioserver

in post-fs-data.sh

This way it activates v4a automatically, without the need to open the app and toggle / disable and enable v4a master power switch. :silly:

Works for me on oneplus 5T :)
[Magisk] BIGWORM:
Alright, well if you wanted to take a look, anyway.
[Magisk] Zackptg5:
Well I'm not sure what the problem is/are. The only possibly unusual things with v4a i noticed was:

02-18 10:01:18.165 I/ViPER4Android_v2(1253): ViPER4Android disabled, reason [SR out of range]

which occurred after a lot of bt_a2dp related stuff ran and:

02-18 10:03:30.165 I/ViPER4Android(4000): LoadIrs, FileNotFoundException, msg = /storage/emulated/0/ViPER4Android/Kernel (Is a directory)mIrsPathName = /storage/emulated/0/ViPER4Android/Kernel/

Which kept occuring when v4a was initializing although I don't think the 2nd here is a problem. But yeah, I have no idea. Sorry man. I have heard that omni does some funky stuff on the kernel level so maybe you could try a different kernel (if there's any that work with it)?
[Magisk] BIGWORM:
Trying Mady's Experience kernel. Getting it to process when I drop the code down to APTX HD through developer optionsFirst log is processing, 2nd is me again trying to process through LDAC.
[Magisk] BIGWORM:
Labs didn't post the second log, lol
[Magisk] qhsusb_bulk:
Hello. I am using this mod with my OP3 running OOS Oreo,SELinux enforcing. No problem for processing, but phone gets too much hot/lags sometimes/drains battery really fast when i listen to music. Also it such spams log that logcat apps are crashing, i used ADB to take logs.

Info: Issue persists on SELinux Permissive with different custom kernels too. Using latest Magisk version(1.4) with latest stable Magisk(15.4) .
[Magisk] exodius48:
This message popup appear this morning, dot it safe?
[Magisk] Badger50:
It's fine. Google play protect doesn't recognize the V4A material app. Hence the message:good:
[Magisk] SpasilliumNexus:
I'm thinking it's more because the app can change the state of SELinux, since Google has been banning apps that change it from the Play Store, and gone as far as terminating dev accounts associated with them.
[Magisk] Kun2210:
Well, with the non-material version of the app you won't get this warning, so probably nothing to do with SELinux.
[Magisk] State.of.mind:
Can anyone Confirm that they have this working on a Pixel 2 Xl? If so, what verisimilitude did you flash?
[Magisk] bbender716:
Which Dolby do you use? Trying to figure out which Dolby to try and get working on my Pixel...
[Magisk] yyz71:
I'm using the latest version
[Magisk] Zackptg5:
That has nothing to do with this mod. Sounds like a rogue app to me. You'll need to investigate that further to find the culprit
[Magisk] bjevers:
Could you explain how to do this? I added this to the Viper zip file in the Magisk folder, but every time I install Viper again through Magisk Manager, it re-downloads the original file again replacing my modified one.
[Magisk] qhsusb_bulk:
Thanks for answer. Yes, you are probably right. I always use my APT-X enabled bluetooth headphone. I tried with a cable headphone now and there isn't any problem! I disabled V4A and tried again connecting BT headphone, phone got crazy again. It is an OS problem. Thank you again! I think clean install time is coming slowly :) .
[Magisk] RashidAlawadi:
I'm having a small issue with V4A:

It was working perfectly fine before I decided to do a factory reset and update to the February 2018 patch on my Pixel 2 XL. The problem I'm having now is when I receive a notification v4a stops processing for a sec and then starts working again. And also randomly it would not process at all unless I reboot. This behavior wasn't happening before I updated.

Note that I have Busybox, Deep buffer remover and audio library modifications modules installed (which was my setup from before).

So I don't understand what went wrong.
[Magisk] KHANrad_SIN:
anyone know a way to automatically switch viper profiles when connecting to different bluetooth devices?
[Magisk] AlexxAnders:
Good evening! Is there any progress with the mod and the Huawei Mate 10?
[Magisk] 0kk0:
This file should be in 'common' directory:

Or edit the file after installation: /magisk/[ViPER4Android directory module name]/post-fs-data.sh

Or you can try my magisk module: View attachment 4425733
[Magisk] aDarkBox:
unfortunately, it still doesn't work. It seems that Huawei may have done some weird things with the audio libraries in EMUI, as the previous huawei phones have needed special versions of V4A to work. I would be happy to help test if anyone wanted to look into it further, though.
[Magisk] Sandrittu:
Hy guys, I have a rom RR android 8.1, magisk 15,4 and busybox. I installed the latest version of V4a, but "processing:NO". What wrong? Thanks in advance
[Magisk] Zackptg5:
This is not a solution. This is already included in the service.sh script. Reason for it being there is that post-fs-data runs before zygote even starts and so you can't really start apps at that stage in the boot process. Also, what do you think <ACTIVITY> is? It's a placeholder in the service.sh that gets filled in with the proper activity name during the install process so what you have there doesn't really do anything since the proper process already occurs later in the boot process (service.sh)
[Magisk] 0kk0:
Sorry dude... relax! This is a solution. Anyway this is a solution for me and my own simple clean v4a(2.3.4.0) magisk module ;)

Just wanted to share my experience and solution...

nevermind :rolleyes:
[Magisk] Zackptg5:
Oh, thought you meant modifying this one. If you're using v4a 2.3.4, you need to replace <ACTIVITY> with com.vipercn.viper4android_v2. the current code you have post kills audioserver only and as I said before, it'd be better placed as a late start service script
[Magisk] gk1984:
Can't get this working on the Essential PH-1 with Oreo 8.1 beta. Anyone have any suggestions? It keeps asking me to install drivers.
[Magisk] Zackptg5:
I'm wondering if it's a similar thing to pixel 2's. Can you try copying system/lib/libstdc++.so to vendor/lib/libstdc++.so

Also, a full logcat would help too :)
[Magisk] gk1984:
Do you want t he .so files pre or post installing this module? And I have to look up how to capture a logcat again... been a while and not often done (I can Google it). But I wouldn't doubt it's mirroring what's happening with the Pixel 2's. The Essential PH-1 is stock Android, started by the father of Android, supports Treble, and uses A/B partitioning. Lots of similarities to how the OS is setup to the Pixel/Nexus line.
[Magisk] b0rnc0nfuz3d:
where is this file?
[Magisk] Zackptg5:
That's for a different mod, this mod takes care of all of that so don't work about it (this mod uses service.sh instead)

---------- Post added at 06:43 PM ---------- Previous post was at 06:42 PM ----------

Post install and move it to the v4a magisk mod directory just in case so you can easily remove it
[Magisk] b0rnc0nfuz3d:
I am currently using ARISE, which I am having issues with, whats the diff between this and arise?

(sorry to sound ignorant, but if this is simpler to use on Oreo and no difference in v4A ill use this)

Thanks
[Magisk] Zackptg5:
Arise contains a ton of libs and other customizations in addition to v4a. This is only v4a. You'll want to dirtyflash your rom to remove arise before flashing this if it was giving you issues
[Magisk] b0rnc0nfuz3d:
oh ok, maybe ill test both and see which sound better, where would that file i was looking for be in the ARISE setup?

do the extra libs make a difference to the sound?

thanks for your help.
[Magisk] JaleBreak:
Latest Version working very well on ZUK Z2 Pro, AEX 5.2 (Oreo), SELinux enforcing...Big Thanks to the developers!!!
[Magisk] gk1984:
Copying the file stopped it nagging to install driver. Haven't tested processing yet.

And attached is a logcat post installation of the module, but before I copied the lib file.

EDIT: Processing is working over headphones (using USB-C adapter). Thanks!
[Magisk] deepu458:
Thanks [MENTION=6037748]Zackptg5[/MENTION] dev fro helping many of us with the same issue. And i would like to thank [MENTION=3443130]gk1984[/MENTION] for doing it the first test.

Yes this technique had fixed the issue with Viper4Android driver problem on Essential 8.1 B1 Stock OS.
[Magisk] Zackptg5:
Nice! I'll have this fix in the next version
[Magisk] Kecoe:
So bro, Can this version run along together with dolby atmos at the same time like that quasar atmos sound mod?
[Magisk] madscribblerz:
I run it with Dolby no problem.
[Magisk] Kecoe:
Could you guide me how to do it? Also with links if you remember them. What rom and stuff you running?
[Magisk] madscribblerz:
Just burn this in twrp. I'm running a pixel 2 xl with a stock rom and custom kernel (ElementalX). I don't think either the rom or kernel matter though.

It works on both Jan & Feb updates, 8.1.

https://xdaforums.com/showthread.php?t=3724096&page=13
[Magisk] Kecoe:
Somehow it is poping up with driver update message :( not working
[Magisk] AssGuard#:
ViPER4Android-FX-v1.4.zip

Can I flash this zip in Nos 8.1 redmi 3sprime
[Magisk] Lightwarrior22:
The sound processing of this version is really bad (2.5.0.5) I had to install another version 2.5.0.4 from the magisk library
[Magisk] AlexxAnders:
[MENTION=1276792]0kk0[/MENTION] Your version doesn't work for me either :p
[Magisk] Zackptg5:
Magisk v16 has been dropped and support for Huawei/Honor Treble devices (Mate 10/10 Pro/View 10) has been added. Try this mod again with the new magisk and see if it works
[Magisk] aDarkBox:
Just tested, magisk v16 does not make v1.4 of this mod work on Huawei mate 10 :( the v4a app still does not show up, and upon extracting/installing still requests the driver to be reinstalled on every boot up while having no effect on processing
[Magisk] trackloading:
The app is still not showing on my Huawei Mate 10 Pro?? :-/
[Magisk] Zackptg5:
Can you both post your magisk/v4a folders? Do you have a /vendor/app folder on your devices?
[Magisk] aDarkBox:
I've attached my v4a folder.

I have a /vendor/app folder on my device, but it only contains the unifiedhostsblocker folder of another mod that I have installed.