yashsingh1/xdaforums huggingface dataset:
[Magisk] Zackptg5:
It's finally here, AML v1.7, what v1.6 should have been. There's a whole slew of changes (mostly bug fixes) that should fix all of the issues people were having and some old bugs I've missed for I don't know how long. I HIGHLY encourage everyone to uninstall their previous version of aml along with all audio mods. Then reinstall them all with this aml update.

Here's the full changelog:

Added support for mixer_gains, audio_device, and sapa_feature xml files

Added RUNONCE option for custom AML scripts - allows them to only be run once instead of for each audio cfg file. Use this if your mod doesn't have cfg patches

Added COUNT variable. Can be used by custom AML scripts to determine how many times script has been run. Use this if your mod has cfg patches and other audio file patches

Fixed old bug with uninstall file restoration

Fixed bugs with boot script

Removed need to specify file with patch_cfgs function - make sure you update your aml.sh script for this

Added ainur squaresound

I also updated the OP with all of the new information - mainly geared towards devs who want to add their mod to aml so check it out! :)
[Magisk] sandaljrpit:
Work fine with Ainur Sauron.

Samsung A7 2016 ( Stock Rom Nougat )

Thanks

:)
[Magisk] shazore:
Can anyone confirm on s8 oreo (s9 rom port)
[Magisk] Ger$$on:
Dolby oreo crashing on RR 6.1.0, with latest AML and ACP
[Magisk] Zackptg5:
Run through the troubleshooting section on the OP, it outlines what to do
[Magisk] hxq88:
Im on oreo touchwiz, device s7 edge, installed Audio compatibility mod, Sony music, viper4android fx and AML, but v4a got "processing: no status" issue after intall AML. V4a worked without AML. And AML worked very well on nougat touchwiz, only buggy on oreo.
[Magisk] Zackptg5:
Interesting. Samsung always does weird stuff with their audio setup. It seems that aml didn't remove the sa3d effect for some reason so I'll need to look into why that's happening. In the mean time, replace the audio_effects file in aml/vendor/etc with this one (remove the '.txt' from the end of it)

Another thing is that their deep_buffer setup is weird. It appears they route it through primary-out. So you can actually get rid of ACP as it doesn't work for this setup (another thing I'll be looking into).

Since the only audio mods you have installed is ACP and V4A, you don't need aml by the way since ACP modifies policy files and V4A modifies config files (so they don't conflict/share files).

Does V4A work for you in streaming apps like spotify and tune-in radio? Just curious since I haven't seen a setup like this before

Thanks for the proper bug report! :victory: (Everybody else take note)
[Magisk] hxq88:
Thank for your support, after replace audio_effects file it worked, AML + v4a now working together, and i can install multi audio mods.

I will recheck ACP, follow your guide and report asap in ACP thread.
[Magisk] Zackptg5:
[MENTION=4315557]hxq88[/MENTION] and everyone else:

Updated aml to v1.7.1. Changelog: Bug fix with osp_detect - should patch all cfgs now
[Magisk] Achu Gowda:
[MENTION=6037748]Zackptg5[/MENTION]

After updating to 1.7.1 ... as soon as I call to someone it'll get disconnected Ina fraction of seconds...but if when reverted back to 1.7 prob doesn't exist..

Op5 xxx rom RZ kernel
[Magisk] Zackptg5:
If you look at the commit history on the repo and see the changes, you'd see why that doesn't make sense. For op5, there should be no difference between 1.7 and 1.7.1. nonetheless, can you send me your aml folder? You may want to compare them yourself with v1.7 and v1.7.1 installed to see if there's any difference
[Magisk] ctakah27:
So can I use AML if I use audio mods but not through Magisk?
[Magisk] Zackptg5:
Nope. AML is magisk only and that's because you only need it for magisk. If using anything else, there's only 1 set of system audio files that all mods share so there's no need for aml
[Magisk] Zackptg5:
AML has been updated to v1.7.2! Changelog: Updated patches for IceWizard, now deletes osp stuff rather than comments it out (to keep it consistent with the rest of the installer)
[Magisk] Lughnasadh:
Got a message saying there was an error in script while patching IceSound and that I should uninstall IceSound , uninstall AML and then reinstall AML. I'm in the middle of doing some backups and updating rom so can't get you any files at the moment, but will be able to later on, if needed.

EDIT: Using IceSound 7.1
[Magisk] Zackptg5:
That's an icewizard issue, not an aml one. It likely needs updated for the aml update
[Magisk] Lughnasadh:
Ah, ok. Thanks.
[Magisk] fresholli:
After in installed v. 1.7.2 Viper processing goes to no and the tip with the Exitbutton is not helping
[Magisk] RagingHarry:
Working just fine here after exiting viper once, processing is a yes
[Magisk] saccentekennedy:
Does anyone have ANY idea why this mod together with V4A and Ainur Sauron would conflict with some Magisk modules on a OnePlus 5T which correct camera libs for GCam? It's not just me but a few people on the OP5t Gcam thread. We're all on OP5T Open Beta 11 (which added Treble support).

Once we disable AML and Ainur Sauron, the camera mods work again. Keep them, and all camera apps FC.

It's really odd. How can a sound mod interfere with a cam mod? Any ideas?
[Magisk] Zackptg5:
It's not aml but the audio mods individually. For reasons unknown, many of them don't play well with treble. Once a stable treble rom comes out, I'll look more into it. There's some stuff on it in the last several pages of the unity v4a thread
[Magisk] christoophat:
Hello, as part of installing Oreo & sound mods on my Axon7, when I try to flash this zip I always get ERROR:1 failed. Redownloaded it in case it was corrupted, but same results. Any clues? thank you!
[Magisk] riccetto80:
Hi, this addon for magisk sound good! GG!

i installed it in magisk, rebooted, then installed ainur saurun from magisk repo, rebooted, then installed and jamesdsp rebooted, but then unistalled because kept crash the jamesdsp app.

Then installed viper xwifi, rebooted, then installed busybox too form kagisk repo because asked me to do so, rebooted.

viper xwifi dont crash, and im able to open it and use it.

now the big question, how i can check ainur sauron is really working? viper for android seems to work and in certain condition seems to made a difference with my telephone speakers (not so big of a difference i was expecting, but still seems to work

).

ainur i dont know if is really working, how i can check it?

thank you.
[Magisk] fresholli:
I revert back to 1.7.1 because 1.7.2 is not working. Viper always says processing is no. The older one is good and working.
[Magisk] Zackptg5:
V1.7.2 works fine. Uninstall and reinstall aml and audio mods if needbe. Also that's a common viper issue. Just force close the app and reopen it
[Magisk] fresholli:
I have done it multiple times. Unistall and reinstall and close and reopen the Viper app isn't working for me. Everytime when i open any musicapp processing in Viper says no. I, am using latest Tugapower ROM with boeffla kernel.
[Magisk] christoophat:
Same with Magisk for me, have to revert back to 16.0 in order to be able to install audio mods (Sauron, Viper, etc)
[Magisk] chikimonke:
Uninstalled AML, Sauron and Viper. Installed latest Viper, Sauron and Latest AML, Viper won't process now. Exit Viper through the menu, and even clear it from Recents, still won't process. Everything else reads normal for the driver though, just "No" for processing.
[Magisk] Lughnasadh:
AML 1.7.2 and V4A is working for me on Magisk 16.0. To jump start V4A, remember to toggle off power>exit through 3 dot menu>open V4A>toggle power back on.
[Magisk] chikimonke:
Just tried that, still no processing.

Edit: huh, tried again and it suddenly worked. The one difference, I toggled the Notification setting because it now keeps disappearing from the notification drawer and toggleing the option seems to be the only way to bring it back.
[Magisk] 煉獄阿飄:
I want to port DSP+ to magisk ver.

How to write the amp.sh scripts?

I writed the scripts already but it didn't work correctly

patch_cfgs -l cm $LIBDIR/libcyanogen-dsp.so
patch_cfgs -e compression f27317f4-c984-4de6-9a90-545759495bf2 cm
patch_cfgs -e bassboost 42b5cbf5-4dd8-4e79-a5fb-cceb2cb54e13 cm
patch_cfgs -e virtualizer 7c6cc5f8-6f34-4449-a282-bed84f1a5b5a cm
patch_cfgs -e equalizer 58bc9000-0d7f-462e-90d2-035eddd8b434 cm

I check audio_effects.conf at system/etc

Library patch no problem but effect doesn't

It only patch compression effect .

What wrong in the this scripts?

我從使用 Tapatalk 的 SM-N950F 發送
[Magisk] Zackptg5:
If you can pm me the mod, I can take a look at it for you :)
[Magisk] jcmm11:
[MENTION=6037748]Zackptg5[/MENTION]

So I have a patch file that I used to use to modify mixer_paths.xml. I'd like to apply it via AML but not sure exactly how (it adds the earphone speaker as an output speaker). I'm attaching the patch file. Normally I would apply the patch "patch -p0 -i <patch-file>"

Thanks
[Magisk] Zackptg5:
Can you post an external link for the file? XDA is giving me an Error 500 on my pc and flat out not working on my phone

Edit: nevermind, finally got it to download :/

Okay, looked it over real quick. So what you need to do is follow the instructions at the bottom of the OP to add a mod to aml yourself :)

You can ignore all of the patch_cfgs stuff since your patching mixers. The key steps for you would be to:

Create a .aml.sh file that gets saved to the root directory of your mod ($MODPATH/$MODNAME/.aml.sh)

Add your patch commands to the file. This is the tricky part. I recommend this:

RUNONCE=true
for FILE in ${FILES}; do
NAME=$(echo "$FILE" | sed "s|$MOD|system|")
case $NAME in
*mixer_paths*.xml) patch -p0 -i $MODPATH/$NAME
#add other patches here;;
esac
done

The variables you see there are taken care of by aml so the only thing you need to change in the above code is the insertion of your patches
[Magisk] jcmm11:
Thanks. The patch_cfgs stuff is exactly what was confusing me. I'll give this a try later after I get home and will let you know what happens
[Magisk] Zackptg5:
So just a quick PSA for everyone. I'm aware that there's an issue where with IceWizard, aml will say that there's an error in the script. The cause has been identified and will be fixed in the next build. There's nothing actually wrong with the script, aml is just printed that in error so there's no actual bugs in IceWizard (so everything is working fine) :)
[Magisk] jcmm11:
So I've been playing around with this and ran into some issues. First a question - when I apply the patches I want to apply to /system/etc/mixer_paths.xml, correct? Not to a copy somewhere? Just making sure.

On to the problems. I stored the patch file in /sbin/.core/img/misc-files/system/etc/patch.mixer_paths.xml. Placed .aml.sh in /sbin/.core/img/misc-files/

$FILE returns a value of /dev/tmp/magisk_img/misc-files/system/etc/patch.mixer_paths.xml

$NAME returns system/etc/patch.mixer_paths.xml

When I go to apply the patch, using $MODPATH/$NAME, it returns an error:

'/dev/tmp/magisk_img/aml/system/etc/patch.mixer_paths.xml': No such file or directory

So should I actually be using $FILE here rather than $MODPATH/$NAME ? In which case I can simplify the script to

RUNONCE=true
for FILE in ${FILES}
do
case $FILE in
*mixer_paths*.xml)
patch -p0 -i $FILE >/data/local/patch.log 2>/data/local/patch-error.log
;;
esac
done

(Yes, I could cheat. Place my modified version of the entire file into /system/etc (not systemlessly) and let AML modify that version. Don't want to ?? )
[Magisk] Zackptg5:
Oh, I see what happened. I misunderstood how the patch command worked. $MODPATH/$NAME is the file that you're patching. So if I'm understanding this command right, it should be:

RUNONCE=true
for FILE in ${FILES}; do
NAME=$(echo "$FILE" | sed "s|$MOD|system|")
case $NAME in
*mixer_paths*.xml) patch -p0 -i $MOUNTPATH/misc-files/system/etc/patch.mixer_paths.xml $MODPATH/$NAME
#add other patches here;;
esac
done

Which would patch the aml mixer using your patch file correct? I've never heard of the patch binary before you brought it up here lol.

The main thing is that $FILE loops through all of the audio files in your mod. We want then to patch the aml file with the same name which is what $MODPATH/$NAME is.

The mountpath will need changed to be sbin stuff if not in bootmode but you get the idea

So I'm thinking that you want your regular mixer_paths.xml file in your mod directory, and you want to rename the patch to something else like "patchfile" or something aml won't pick up as an audio file.
[Magisk] jcmm11:
I think I got it. For the record 'patch' is pretty much the standard method of patching files in 'nix. Works in conjunction with 'diff'. Of course the Android version has differences from a full featured version, and in this case I'll have to use the busybox version since I want to specify the file to be patched on the command line. (Patch normally gets the file to be patched from within the patch file).

So you're saying that $MODPATH/$NAME is pointing to aml's current version of (in this case) mixer_paths.xml - assuming it finds a file with that name in my mod, and it thinks that the file in my mod contains the patches that are going to be applied to that file, correct?

If all that is correct I can rename the patch file to mixer_paths.xml and then the patch command would become:

busybox patch $MODPATH/$NAME $FILE

That should work, since the file command will be picking up the patch file. I could place a real mixer_paths.xml file instead and use a differently named patch file, but is that necessary?
[Magisk] Zackptg5:
So it's easier to explain if I give background to what aml is doing at the time the .aml.sh script is called :)

So if you want to briefly follow along here: https://github.com/Zackptg5/Audio-M...ter/META-INF/com/google/android/update-binary

At line 320, the FILES variable is set to all audio cfg/pol/mixer files in your mod. Then it runs some funky stuff before finally calling your .aml.sh script at line 336.

So how the loop in the code snippet works:

First, it sets RUNONCE=true so your script only runs once rather than once for every audio file detected

Then it loops through each FILE in your mod

The name variable removes the magisk/temp install directory from the FILE name so it goes from something like /sbin/.core/img/yourmod/system/etc/mixer_paths.xml

to /system/etc/mixer_paths.xml

So the NAME variable is just equal to whatever audio file in your mod the loop is on

Since the FILES are just the cfg/pol/mix files, those files are already located in the aml MODPATH.

So if during an iteration of the loop, $FILE=/sbin/.core/img/yourmod/system/etc/mixer_paths.xml, then $MODPATH/$NAME = /sbin/.core/img/aml/system/etc/mixer_paths.xml

(MODPATH is always equal to the aml mod directory)

I see I had the file order backwards in the patch command, whoops. Looks like your command will do what you want it to, I was just hoping to give you some better background to what's going on behind the scenes ;). But now you see why it'd be best if you name the patch something that won't show up as an audio file in aml. Here's the code:

"*audio_effects*.conf" -o -name "*audio_effects*.xml" -o -name "*audio_*policy*.conf" -o -name "*audio_*policy*.xml" -o -name "*mixer_paths*.xml" -o -name "*mixer_gains*.xml" -o -name "*audio_device*.xml" -o -name "*sapa_feature*.xml"

Otherwise, it'll try to patch a file in aml that doesn't exist and will throw an error.

So in summary, you'll need a the mixer_paths.xml file(s) that you want to patch in your mod directory where they would normally be found and you need the patch file named something that won't match the above.

The only other thing that I forgot to mention is that aml copies the .aml.sh script to it's own folder where it contains all mod patching scripts so not entirely sure how you'll need to hardcode the location of the patch script somehow so the aml script can find it after being moved
[Magisk] Gereld The Cat:
So I've tried getting Viper to work on the latest update and I've looked at the comments in this forum, but nothing has fixed it. I would revert back to 1.7.1, but I don't have the zip file for it anymore. Is this a bug, or is there a way Viper can be fixed?
[Magisk] themrmotivator:
You do now:good:
[Magisk] Zackptg5:
You'll need to post more details (files I'll need are in the troubleshooting section of the op). Considering there's been over 1000 downloads and only a handful report a problem, it's probably not a bug but something wonky on your device
[Magisk] Gereld The Cat:
I updated ACL, Viper, and AML, at the same time, all in that order. The last version of ACL working was 1.4.5, for AML it was 1.7.1, and for Viper it was 1.6.9. After finding out that Viper was not processing after updating, I reinstalled the current versions of both Viper and AML but it didn't fix anything. I also tried exiting the Viper app using the 3 dot menu multiple times.

Audio Mods Installed:

Ainur Sauron - MK II.II (19.6.2018)

Audio Compatibility Patch - 1.4.6

Audio Modification Library - 1.7.2

ViPER4Android - 1.7
[Magisk] Zackptg5:
Hmm, or there's a bug with xml files and it wasn't reported much cause most devices still use conf files :/

Uninstall aml and v4a should work. The problem is that music_helper wasn't removed in your vendor/etc/audio_effects.xml

Thanks for the full bug report! I'll look into what the issue is
[Magisk] Gereld The Cat:
Will my audio mods still work properly if I uninstall AML?
[Magisk] Zackptg5:
Nope. For now, edit the vendor/etc/audio_effects.xml file in the aml folder and delete the music_helper line under postprocessing (towards the bottom of the file). Then all will work
[Magisk] jcmm11:
Success ✌️ Just for the record here's the script I ended up with (for now ? )

RUNONCE=true
Patchfile=$(echo "$MOD" |sed -r 's|(.+img).*|\1|')'/scripts/mix.patch'
Patchlog='/data/local/patch.log'
Patcherr='/data/local/patch-error.log'
#
for FILE in ${FILES}
do
NAME=$(echo "$FILE" |sed "s|$MOD|system|")
case $NAME in
*mixer_paths*.xml)
busybox patch $MODPATH/$NAME $Patchfile >$Patchlog 2>$Patcherr
;;
esac
done

Edit: changed Patchfile definition to get it to work in both TWRP and Magisk Manager.
[Magisk] Zackptg5:
Nice! Good to hear ?
[Magisk] Zackptg5:
[MENTION=4931201]煉獄阿飄[/MENTION] and everyone else:

AML v1.8 is here! You know it's a major update if I skip the 1.7.3 and jump straight to 1.8 :)

There's a hefty changelog of bug fixes and a new feature added as well:

Fix icewizard always showing error

Add capability to replace libraries and effects with patch_cfgs function (-r)

Change pre_processing patch_cfgs option to -q

Fix bug with proxy effects

Fix bugs with osp with xml files

Fix bug with squaresound

Big note for anyone with their own .aml.sh file in their mod: The pre_processing patch flag has been changed from "-r" to "-q". I won't change the flags like this again but it just made since this time around.

The "-r" flag is now to tell aml that rather than add your patch only if it doesn't already exist, to add your patch and replace any existing ones with yours. This will almost never need to be done for the typical audio mod (none of the ones officially supported by aml do this) but it's there for that rare circumstance none the less ( [MENTION=4931201]煉獄阿飄[/MENTION]).

Anyone who had issues with v1.7.2 should find all of there problems solved with v1.8 and the weird icewizard thing has been fixed too :)
[Magisk] fresholli:
Feedback for the Dev: Now 1.8 works perfecly with Viper and sauron.:)
[Magisk] kunalxda:
Zack please make aml supersu compatible
[Magisk] Zackptg5:
There's no point in using aml with SuperSU since it doesn't have magisk mount. Sbin can be used similarly for a few folders like etc, but rarely for complete mods plus it's no magisk mount. Long story short, aml is only needed for magisk due to the nature of magisk mounting and systemless mods. If you're on supersu, mods should be installed to system anyways and so they all use the same files
[Magisk] 煉獄阿飄:
Finally I have a free time to test.

Result is perfect, replace feature works without any issue. It's a best magisk mod, that takes easy to install multiple sound mod at same time.[emoji106][emoji106]

我從使用 Tapatalk 的 SM-N950F 發送
[Magisk] Creater0822:
With Xiaomi Mi A1 running LineageOS 15.1-20180512-NIGHTLY-tissot I just can't get Viper4Android FX working with ZTE Axon 7 Oreo Dolby Atmos by guitardedhero. When I enable the Dolby Atmos module, the V4A driver is installed, but not processing . Viper4Android FX does work perfectly fine together with Viper4Android XHIFI though.
[Magisk] Zackptg5:
This is has been brought up multiple times in both threads. Due to Dolby using output_session_processing, it breaks pretty much every other audio mod
[Magisk] ISoreo:
Hi my device can run all of these module i've install 3 module V4A , Dolby Atmos , Ainur Saron from Magisk and all of these modules are work fine i think may be try to Change SELinux permission or try to flash this in attachment, finally i sure dolby can process with V4A (V4A XHiFi i don't recommend) . if can't process you should to find V4A supolicy fix and V4A universal fix and flash them in recovery it should be process i hope
[Magisk] Creater0822:
Yeah, I too have another phone (running Marshmallow) which was capable to run V4A FX flawlessly along with Dolby Atmos Classic (Lenovo A7000 [6.5])

Thanks for the recommendations as well!!
[Magisk] Zackptg5:
This is specific to guitardedheros Dolby Atmos oreo. Other dolbys work fine with v4a
[Magisk] Lownita:
If I want to use two different mods together, such as v4a and ainur, I need to install AML. If I'm only using v4a, I don't need to. Am I getting this right?
[Magisk] DanGLES3:
Yes,AML is only if you use multiple audio mods,if you just use one then AML is not needed
[Magisk] Lughnasadh:
Yes :good:
[Magisk] BadToThePhone:
I'm hoping someone here can help me with my LG v20 running nougat with Viper.

I am able to get the speaker and headphone options to process everytime but bluetooth will never stay processed. The only way bluetooth processing will stay on is if I make a Bluetooth call while being connected to a Bluetooth device. There is an app that I can run that simulates a phone call while connected to Bluetooth in order for Bluetooth to stay on processing. This is the only way I have gotten it to work. I've even tried changing selinux to permissive and that didn't work.

I've done lots of reading, research and testing. I've tested every version of Viper with and without this mod that I could find on Xda and magisk and I can't get it to work right. Maybe someone has an idea?

Any help would be really appreciated.
[Magisk] Creater0822:
Is there a Dolby Atmos supporting Oreo that doesn't conflict with V4A?
[Magisk] Zackptg5:
No. There is a Dolby digital plus though. I don't have the link for it but if you search around xda (probably on the Dolby Atmos Oreo thread), you'll find it
[Magisk] Creater0822:
Thanks a lot!!

I've found a compatible Dolby Digital Plus from this link: https://xdaforums.com/mi-mix/themes/app-dolby-digital-plus-unity-t3819989

With that I've got working together: V4A FX, V4A XHIFI (not really using this one honestly), Dolby Digital Plus, Ainur Sauron with James DSP and Audio Compatibility Patch.
[Magisk] Lownita:
Any suggestions for a Dolby Atmos module which would work on OnePlus 6? How about this one? https://androidfilehost.com/?fid=5862345805528062427
[Magisk] ISoreo:
Try it yourself but i recommend Dolby Atmos Classic (Lenovo A7000) because this mod fully work!! for all devices
[Magisk] Abhishek phenom:
Sorry for this question but I am a noob here and I am facing a little problem. Actually what the problem is that whenever I flash a custom ROM no audio but the calls and messages come out of my phone and videos play in a slow manner it pauses and then plays with no audio out but after flashing this module everything works just fine (n yeah before flashing this module I could play the video fine in MX player with sw decoder). Now the problem comes is that my audio and video plays pretty fine after but now if I flash another audio mods such as Dolby and all they all do not work and when I uninstall this module, other mods work but audio doesn't come. Please someone help.