FORUMS
Remove All Ads from XDA
H10 Turbo

[AINUR AUDIO] [Audiophile] | SAURON MK II.II [update 19.06]

982 posts
Thanks Meter: 3,142
 
Post Reply Email Thread


[AINUR AUDIO] (named after John R.R Tolkien mythology) mod was conceived on 12th January 2016 at Russian 4pda forum, with an idea to create the ultimate universal tuning solution, that can help people get more from their devices in terms of audio capabilities. Ever since that time we have been aiming at achieving new heights & providing you with a set of different mods (now archived): Pandora as universal SW optimizer, Nero as coloration fx remover, Kronos & Atlant as specific variety of device dependent mods with heavy tuning for different qualcomm cpu's. This allowed us to experiment & to find limitations of what can be tuned in terms of software & hardware within different smartphone configurations.
We were also first to successfully implement hex disassembling method for proper effects porting. Further hex investigations showed that other audio "mods" contained nothing but huge amounts of bloat files, that needlessly took up massive amounts of space on system partitions. Our disagreement with the developers of said mods at times resembled a genuine "war". The discovery of our disassembling method, proper implementation of basic mods & port addons (along with quite a bit of patience) brought you our best solution yet, to help optimize sound on your android device and reach the desired high level of quality, regardless of device manufacturer or cpu.

To go further we now starting a new era of audio mods with a brand new SAURON modification to bring you best sound ever in the audio modding history.

From Mordor
With love





Press:
Head-Fi


Contact & Socials
Official website
Telegram chat (brace yourselves - memes ahead!)
VK group
Facebook group
Discord group
Reddit discussion


ADDITIONAL INFO:
Android audio mods mythbusted
FAQ


[Ainur Audio] team
@UltraM8 /Makarojke@4pda, @stake263, @red_naxella /LaKardo@4pda, @SashaSmile, @doma999, @Mostafa Wael, @Zackptg5, @defcomg, @ahrion, @AlienCreature7, @LazerL0rd, @james3460297, @Skrem339


Like our work?
Support us!
Paypal


News
New years greetings & Sauron MK II launch
Sauron MK III preparations. Seeking community help!
The Following 291 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
 
 
29th August 2016, 02:48 PM |#2  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
Ainur SAURON MK II.II
Quote:

Named after almighty & all-seeing evil character from Lord of the Rings mythology - SAURON, this mod automatically detects your device specs, and performs all of the possible audio tuning within it's badass installer. You can sit back and enjoy incredible sound




Basic features:
- Android 2.3+ ready (up to android P)
- Unity installer by @ahrion and @Zackptg5
- Qualcomm/Exynos/MTK/Kirin/Rockchip/Spreadtum cpu's support
- X86 & ARM 32/64 bit support
- Android SFX libs tunings (musicfx & audiofx apps might no longer work)
- Cherry picked setprops
- Automatic su.d/init.d/addon.d detection for scripts
- Supported roots: Magisk 15.0+ /SuperSu/CMsu/PHH/LosSU/No root
- AML addons ready
- OTA surviving

Advanced features:
- Qualcomm codec mixer tunings
- Htc u11/u11+, m9, 10, m8 speaker amps patches and additions
- OnePlus 5/5T speaker amps patches and additions
- Forced Hexagon DTS Headphone:X module processing, mixer controls & custom config
- * DAC powered devices mixer edits:
- LG v20/30/30+/g6
- LeEco x800/x900
- Nubia z11/z9/z9m
- Axon 7 (moved to custom kernel)
- Lenovo vibe X3

* Parameters forcing for DACs is achieved with mixer additions, thus either framework, or service apps can reset some values back to stock. Sorry, but it seems like device manufacturers doesen't want us to mess with these thing. There is a solution, but unfortunately it won't happen till probably next major version.

User determined features:
You can set these features with sauron_useroptions (UO) file, by placing it to the root of the internal storage. Installer will place the file there during the install, if it's not there already. After resetting values you have to reinstall Sauron each time you want to try/set something new. Some of the stuff there can break sound completely - there is no fix for that, you have to reset stuff back & don't use some of the features that breaks normal use of your device.
I've commented pretty every single thing there with all the info I know by this moment, make sure not to bother me with questions like "wut is dat XXXX feature for, dude?" please

- Universal install for Fmas effect
- Qualcomm shoebox & audiosphere effects
- Qualcomm codec bitsize, impedance and discretization forcing
- Compander remover
- Aptx/hd libs, props & hexagon cappi libs install
- Reverb effects for PCM conversions



Quote:

!! IMPORTANT !!

Some minor, but annoying bugs might occur after flashing, before writing "dat does nut work !1!!11!", make sure you:
1) Tried mod with any other possible ROM for your device
2) Tried another possible rooting method (yep SuperSu is still the most stable yet)

If you end up with bootloop, regardless of root solution & ROM, than you have to make adb logs, during the bootloop and send it to me. We'll have a look into finding possible fix.

We recommend using TWRP for flashing (Flashfire & magisk manager app flashing is supported though)
FIRST INSTALL - CLEAN ONLY

SuperSu users - make sure there is no scripts left from any previous installations in /su ! Better to dirtyflash ROM & Reflash SuperSu, before installing/updating the mod

VERY IMPORTANT !
Study sauron_useroptions carefully - some combinations could lead to huge sound problems (as it's mentioned in the file), that WON'T be determined as issues.


Installation
Download latest SAURON MK II.II (19.06)
To uninstall the mod - simply flash the zip for the second time


Like our work? Support further development

Participate in little survey!

Users wanted to extend features!
Guys you can help in future development by providing us with useful data. There are 2 ways to do that:
1) You can use this archive. Create folder named SauronDump in internal, or external sdcard, unzip files from archive into it & run saurondump.sh script as root with Fx file explorer app.
The cons of this method is that you'll still have to make mixer dumps by hands (on how to - described in the second method below)
2) You can follow steps, guided here

When you got all the files & everything - pack them into ZIP archive, name it as devicemodel_cpumodel, depending on your device name/brand and your cpu number. (Example: Xiaomi Redmi Note 2 Prime_mt6795.zip.) and post zips HERE


Changelog:
Code:
MK II.II 19.06
- AML update & fix

MK II.II 13.06
- AML/Unity update

MK II.II 02.05
- UO detection critical fixes

MK II.II 01.05
- unity update
- various fixes
- UO updated

MK II.II 18.04
- installer fixes

MK II.II 15.04
- unity update
- minor edits & fixes


MK II.II 24.03
- audioserver fixes
- better Treble (Oreo & P) compatibility
- removed policy patches for better AML compatibility

MK II.II 22.03
- Op3/t & Op5/t fixes
- Minor Oreo edits
- Various minor edits

MK II.II 17.03
- Various fixes & edits

MK II.II 11.03
- Android P support
- Various fixes & edits
- Axon7 patches moved to kernel by Skrem339
- Sfx libs changes
- Htc m7-m9 rt5501 & 5506 jack amplifier patches (libs hex patched by UltraM8)
- Htc u11/u11+ speaker amp patches (beware, it blows :) )
- Pixel devices experimental amp patches (sailfish, marlin, taimen, walleye)
- Qualcomm RX HPH edits for HiFi mode
- Oreo aptx/hd, ldac added by LazerL0rd
- Fmas edits
- UO file edited
- Axon7 patches moved to kernel by Skrem339

MK II.I 26.02
- Unity 1.3 update
- Various fixes
- New UO 

MK II.I 20.02
- Critical installer fixes
- Completely reworked core libs

MK II.I 07.02-08.02
- Unity installer
- Critical bug fixes

MK II.I 06.02
- SFX libs install logic patches
- Minor bug fixes

MK II 13.01
- aml 2.9
- got rid of hw dolby

MK II (beta 1 - stable) 31.12-01.01
- Revamped installer 
- Unity/AML v2.8
- Added UO logic
- Rebased SFX libs
- Removed alsa
- HTC U11/U11+ speaker amplifiers patches 
- HTC m9/m8/10 amplifier drivers additions (possibly reroute headphones path with tfa amp)
- Full Oreo (8.0+) support
- OP5/5T speaker amp drivers additions for tfa9890
- Added Qualcomm Shoebox 3d and Audiosphere audio effect libs, props & mixer controls
- Added Fmas effect libs & props
- Added UO controls for impedance, bitsize & discretization
- Added snap 820/21/35 Speaker boost & voltage edits from Oreo
- Added Hexagon DTS Headphone:X module, mixer switchers & controller config
- Added Hexagon Dolby modules & mixer switcher
- Added Qualcomm BT resampler (idk if it can even work)
- Reworked props + added some new found by hexing
- Set higher value for preallocated DMA memory buffer
- Added kernel modules for QC codec
- Added APTX/HD libs, props & hexagon cappi libs

MK I.IV.II
- Installer critical fixes
- magisk v13 support
- new sfx libs

MK I.IV.I
- Installer critical fixes

MK I.IV
- Installer critical fixes
- Added @osm0sis busybox

MK I.III.I
- Installer fixes

MK I.III
- Installer fixes
- New libs base + SFX patches
- Qualcomm dac patches from older versions
- HTC patches from older versions

MK I.II
- Installer fixes
- SFX patches

MK I - I.I
- New libs base
- Survive Rom dirtyflashing
- Bug fixes
You are not allowed to use any parts of this mod in your own roms & mods!
The Following 239 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
29th August 2016, 02:48 PM |#3  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
[Ainur NARSIL] [DAC & DSP editions]
The Following 117 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
29th August 2016, 02:49 PM |#4  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
[Standalone Addons] ported audio effects
These are standalone ports which can be used with any other mods, including Ainur.

To use multiple Ainur mods/addons magisk users have to install AML module from magisk app

JamesDSP ->
Dolby->
Bang&Olufsen icepower port ->
Arkamys effect port ->
Dirac effect port ->
Fiio's V4A irs convolvers ->
The Following 149 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
29th August 2016, 02:49 PM |#5  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
KERNELS
Audio kernels, packed with various features



Axon7
CAD Project by @Skrem339
This project was created to let you get full control over DAC:
1) /sys/module/snd_soc_ak4490/parameters/oversampling_freq
Sets DAC's oversampling frequency(default 768000(max))

2) /sys/module/snd_soc_ak4490/parameters/selected_filter
Sets DAC's filter:
1 slow
2 short delay sharp
3 sharp
4 short delay slow (default)

3) /sys/module/snd_soc_ak4490/parameters/superslow
Sets state of Supperslow filter:
0 off (default)
1 on

Downloads & Support
The Following 56 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
29th August 2016, 02:49 PM |#6  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
The ugly thruth about effects ported from other devices
Xda's sound mods history goes deep down in ages, but there is one particular myth that stays strongly. This myth is based off idea that we can port some external software effect from one device to another. That is completely wrong & most technologies CAN'T be ported.
Almost a year and a half i got my htc m8 drowned & I bought myself meizu m2 note. This device has the worst audio u can imagine, so i started modding it. The first idea was to use well known mods from android software development section. Still I was really unsatisfied with the audio, so I started "porting" & mixing things on my own. After a while i teamed up with several guys from 4pda, that stated "Dude, u do everything wrong. Most of the stuff u are using is not working". OK. So, instead of believing in their words I googled how to make logs, got myself a proper Disassebler & start discovering on how things are working for real.
It's been a huge drama over this thread between me & Arise team. But they are sitting on the very top of the junkyard & there are plenty of "port" mods in this xda section, where things are even worse. I understand that users & evangelists of these mods will call me idiot & stupid, but several people that asked "hey guys, can u explain me how does *thatparticulartechnology* works?" & those people never had a chance to have clear answers. Have u ever interested why? Because people don't know. They think, they can pull several apk's, libs, jars, etc - and this makes effects to work. Well in some cases like Dolby, previous MaxxAudio builds, Am3D, Arkamys - that will work. But for most others it WON'T EVER (well there is a trick, but no one except one guy can do that).
Now I'm gonna share with you all of my findings:

Beats Audio. It's been a very huge history in putting beats libs & binaries into mod's. The first thing you need to consider - beats are deeply bind in HAL. Original HTC m7 flinger has special beats switchers in it, that control the whole effect. Beats API then is tied to Sense framework & several others files. If we open the original file from the M7 - we see that the effect starts with reference to 16A44 substream, and then goes on distributing to multi-channel substreams. So the only thing u need to do - port flinger from m7 to the desired device. The only way to do that - closed arm porting - that is a very tricky way I still don't understand, but Sun_dream successfully did that several times (last time he ported H/K to m9 from m8). Well, we also can replace the HTC M8 flinger with beats one entirety – it will work, but this trick works only under MM. No way to replace flinger on MM & up. All of those "dummy-binaries" like "beatsbass", "beatsnormal", renamed libraries & other stuff - is just nothing but a trash that never worked properly & never will.
Pictures:
Beats API in flinger lib



Harman/Kardon & Jbl. Another HTC technology that people desperately want to port. H/K switcher stays in flinger just the same as Beats. The only way to fully port that - using closed arm porting, but still u would need Htc device for that. There is no other way.

Harman/Kardon from Huawei. I never examined Huawei's pad flinger, but having "libaudioflinger.huawei.so" libs in "ports" is a real surprise. As u can see it refers to original flinger to set HiFi setup. Not every HAL has those connections, or they are written in another way, so the libs won't work on many devices. Also, note that original MediaPad has Kirin CPU, which is different from Qualcomm, MTK & Exynos - the purpose of having H/K from is highly debatable.
Pictures:
Hifi setup



SRS. From the dark ages of android, SRS was used by HTC to optimise your video experience. From 2015 Sony placed it in their XperiaX & XZ. If htc was using it for video stuff, sony uses it for speaker & virtualizer bundle. The problem behind porting it - the good all flinger & HAL. Yes, SRS is also written in flinger, so no way it will work outside original device.
What surprises more - is edits devs make to srs configs for those devices that originally has it - like Project Yume pushes the eg compressor value to 15000. While the maximum is only 1. Even if this effect works for your device, dear devs change it so deep, that it becomes non working)


DeeHX & LDAC. Sony’s Dseehx optimization works ONLY with proper player (Sony’s default music player & PowerAmp) that has DseeHX API. Even when you port SOMC & try to switch DseeHX you won’t hear any audible changes as this thing is also deeply integrated in the whole framework. If you take a look at Z2/Z3 threads - u can see, that before Sony made DseeHx for Z3, people tried to port it from Z5 & failed. Even when Sony finally made it working on Z3 the cap was 96 upsampling) This thing is very specific & hw dependent, so claiming that you have successfully ported - is ridiculously stupid.
Speaking of Ldac - i didn’t examine it deeply, but my guessing is that it is tied to adtp policy, which can’t be replaced with just your wish.
When you make a port of Sony features - you clearly can hear some noticeable changes to audio - i guess that is work of Xloud &/or Clearphase &/or ClearAudio. I didn’t found anything in logs, when i was playing with files from XZ & X. So let’s call this stuff as “partially working”.


DTS. There are various devices having DTS - vivo, asus, acer - but none of them are truly working. For example vivo stuff relates to huge amount of files in the system which works only on vivo. Asus DTS is seeking for particular app (which devs are deleting, cause it can’t be properly porter and modified) & for special flinger that has “Icepower” switcher in it, or at least has set the “fasttrack” to “false”. I’m waiting for acer jade2 - so i can take a look at it’s implementation of DTS, but as far other phones are very hw & framework dependent, I highly doubt it can be ported.


Audio_effects Configs. Now that is the “greatest” & the funniest part of all. I can imagine that “modders” are lazy enough, they don’t want to use disassembler & google. But writing mad configs - is a real disaster. Devs call this “method” an “engine” - what they basically do is putting a non working effect like “eagle_pipeline” (that is used in DTS effects) & trying to stick to standard proxy lib) The whole config in a typical way is written for soundfx API to take part in rendering the audio - like “preeffect” bundle is setting echo cancellation & controls gain, rewerbwrapper is controlling the amount of reverberations & is typically used for aux setup, etc. That is why most of audio_effects configs looks the same, with small integrations of other effects phone developers put into it, so that their own effect will work. But you can’t load unloadable effect (any of those i wrote above), by mixing it with standard API. HAL would appeal to particular library & particular uuid of the effect & only then, if needed will load standard API to render the sound.


This info i was collecting for last half a year. I might be wrong in several places, but I guess you got the main idea: most of effect technologies rely much on particular frameworks & Hw stuff. I’m not sorry for being rude to several people over this thread & there are several other guys i disrespect even more for trashing the whole AD&H section with their crap (no, not Arise guys, as i said - they are just the top of the junkyard). This whole situation leads me to idea, that 90% of “modders” doesn't know what they really do. What is even worse - other people take their work & use it in their projects, so after a while everyone believes that this stuff is truly working. That huge amount of partially working “mods” are trashing your system partition with up to 200+ mb of useless files! “Modders” make ridiculously stupid mistakes, but users still admire & praise them. I don’t need to soothe my ego that much, I just want to warn users of that rubbish: please, don’t be fooled! Make your own research!
The Following 155 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
29th August 2016, 02:49 PM |#7  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
Ainur FAQ

What happened to pandora, atlant, and nero?
The best of each have been combined into one: SAURON. These are now all deprecated and will no longer be supported.


Are there any pre-requisites?
Yes, busybox is required. Starting with Sauron MK I.III.I, @osm0sis' busybox is bundled with Sauron so you no longer have to worry about it.


What other audio mods are supported alongside ainur audio mods?
Only audio mods using @ahrion's audio modification library (aml). Others may not work, cause weird issues, and/or completely break everything.


Is there any particular order in flashing these audio mods and other aml audio mods?
Not anymore. This was fixed in Sauron MK I.IV


Will these mods survive dirty flashes/OTA updates:
If your rom has addon.d support, yes, so a dirty flash will not remove them. See the Uninstallation section below for proper removal


Supported Root Methods and Corresponding Location of Scripts:
  • Magisk 12 or newer - /magisk/ainur_modname
  • Systemless SuperSu - /su/su.d
  • System SuperSu - /system/su.d
  • Rootless - /etc/init.d *Note that your rom must have init.d support for these scripts to run. With Sauron MK I.IV.II, init.d support will be automatically added if it is not already present.


What if my root method is not supported?
You can try to use init.d override. Create an empty file on the root of your sdcard called 'ainur_initdoverride'. Then flash the installer and it'll install scripts for init.d. Make sure this file is present during the uninstallation too.


What if I use magisk but want it installed to system so my device boots faster?
Use magisk override. Create an empty file on the root of your sdcard called 'ainur_magiskoverride'. Then flash the installer and it'll install the files to system instead of magisk img. Scripts are still installed to magisk img though for magisksu compatibility (won't affect boot time much at all). Make sure this file is present during the uninstallation too.


Things To Do Before First Installation:
  • MAKE A BACKUP
  • If using magisk version < 13, create an empty file on the root of your sdcard/internal storage called 'ainur_propcompatibility'
  • Remove any other audio mods (Clean flash may be necessary here)
  • If using magisk, read the Troubleshooting Section for Magisk here: https://forum.xda-developers.com/app...mless-t3473445 and check that your phone is compatible with magisk: https://github.com/topjohnwu/Magisk/issues. If there's a device support issue open for your phone, then it's probably not supported yet

Installation:
  1. Follow the previous section
  2. CREATE ANY AINUR OVERRIDE/COMPATIBILITY FILES ON SDCARD AS NEEDED ABOVE (KEEP THESE FOR UNINSTALL TOO)
  3. Flash the following in order: Rom, root method, ainur module
  4. If using magisk, disable busybox in magisk manager

Magisk Troubleshooting:

If you're spontaneously losing root/weird magisk stuff happening:
Did you disable busybox in magisk manager? If yes, try the following
  • Go to battery optimization settings and disable battery optimization for magisk manager
  • Disable magisk hide

If you're seeing weird stuff in twrp involving data partition or see 'Error 2' when installing anything involving magisk
  • Boot into twrp
  • Go to Advanced -> terminal
  • Type:
    Code:
    e2fsck -f data/magisk.img
  • Say yes to prompts to repair errors

    **Note that in some rare instances, the magisk img is too corrupt to be recovered. In these cases, you'll need to uninstall/reinstall magisk


Uninstallation:
  • Flash the corresponding uninstaller
  • OR Clean flash rom
    Note: If you're on a rom that doesn't support addon.d (like stock), a dirty flash will work too.

Safety Net:
Safety net will only pass if rootless or using magisk. Here are the steps to pass safety net with magisk:
  • Open magisk manager
  • Go to settings
  • Enable magisk hide and reboot

Still note that Safetynet is a losing battle. See here: https://forum.xda-developers.com/sho...05&postcount=2


UPDATE: Google has made some kind of update to safetynet so it will no longer pass with magiskhide. This is being working on in v13 betas.

Ainur Module Updating:
  • Flash the uninstaller for the version of the module currently installed
  • Flash installer for new version of ainur mod
The Following 52 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
29th August 2016, 04:57 PM |#8  
yung40oz84's Avatar
Senior Member
Thanks Meter: 1,011
 
Donate to Me
More
Does this install any apps like viper4android or just modify system files? Also, will viper work with this mod if not installed?
The Following User Says Thank You to yung40oz84 For This Useful Post: [ View ] Gift yung40oz84 Ad-Free
29th August 2016, 05:19 PM |#9  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
Quote:
Originally Posted by yung40oz84

Does this install any apps like viper4android or just modify system files? Also, will viper work with this mod if not installed?

They will work with v4a & Dolby ports
The Following 7 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
LarappsOfDongle
29th August 2016, 05:43 PM |#10  
Guest
Thanks Meter: 0
 
More
how do unclog system, i dont see how u say arise clog system arise good sound. i try ur mod to see if it has no clog. what is clog about arise? what files make arise clog, how is it mod not clog
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
29th August 2016, 05:56 PM |#11  
UltraM8's Avatar
OP Senior Member
Flag Moscow
Thanks Meter: 3,142
 
Donate to Me
More
Quote:
Originally Posted by RatchetPanda

how do unclog system, i dont see how u say arise clog system arise good sound. i try ur mod to see if it has no clog. what is clog about arise? what files make arise clog, how is it mod not clog

Mad configs, Many "ported" features work only on original devices, as they are tied to flinger, or other libs. Sony features - it's placebo. Samsung features work only on Exynos, and won't on MTK or QC, and vice versa. Dts - won't work anywhere except Huawei or Vivo (where did they came from). Beats & SRS from m7 - work only with m7's flinger (Sony Xperia X Performance also has SRS written in flinger). Arise also has many libs ripped off music playes - those libs won't work outside player apps! The same with other mods. You can look into logs on your own to define what is properly working & what's not.
The Following 2 Users Say Thank You to UltraM8 For This Useful Post: [ View ] Gift UltraM8 Ad-Free
Post Reply Subscribe to Thread

Tags
audiomod, audiophile, soundmod

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes