yashsingh1/xdaforums huggingface dataset:
[Magisk] multiwirth:
Hi there,

This is a magisk module compatible with any android device (except x86) running at least android oreo up to latest and greatest Android 11!

It was tested on lineage based roms but should work on all AOSP and some stock roms just fine.

Changelog, Compatibility list and everything else can be found via the download link below at the github page.

Some users already reported compatibility with some stock ROMs so feel free to let me know if it works or not.

If i find the time, i´ll update the compatibility list on github.

Note:

Since Android 10, arm64 devices (everything since 2015 will be arm64) needed updated libs which I didn´t test on oreo and pie so it is possible, android oreo and pie in combination with a more recent device will no longer work.

I didn´t test it so we don´t know until someone is willing to try it out for us!

ARM/armv7 (ooold devices!) will work just fine, the same old libs from oreo still work until android 11.

But now have a great listening experience! ;)

Download here

Credits:

- topjohnwu for magisk

- Qualcomm for aptx

-@torukk for directing me to the right github repo for updated blobs (arm64/android10)

Some Screenshots:

View attachment 5361335View attachment 5361331View attachment 5361333
[Magisk] sinrequilorios:
Very good contribution, is there a possibility that you can make a version compatible with arm64? What happens is that the existing modules are not compatible with Android 10. And the only reason I downgraded Android 9 on my Redmi Note 8 Pro is exactly to be able to use the module that enables aptX support.
[Magisk] multiwirth:
Thanks :)

I was always using "APTX for android oreo and pie" which still works fine on my htc one m9 running android 10 (arm64).

The module has more complexity in it and maybe even unnecessary stuff.

I'll have a look into the libs my oneplus 3t uses (arm64).

In the meantime you can do a backup of your rom, download the module, extract the system/lib/ files to the exact same directory on your device using twrp file manager (system can't be mounted rw anymore in android).

Maybe it works idk.

Btw are you on stock?
[Magisk] sinrequilorios:
Yes, I am currently on MIUI 11, Android 9. I use the module "Bluetooth stack audio bitrate changer for SBC + aptX & aptX-HD enabler" and it works without problems in Android 9 under MIUI 11. But I had upgraded to Android 10 and it stopped working (it totally broke the audio via Bluetooth), so I made a downgrade and it is working again.
[Magisk] multiwirth:
Try the module i mentioned, it will install all the libs for arm64 and should work.

I've checked the libs on my oneplus 3t which has aptx hd out of the box and it looks identical to what this module comes with.

You can find it via magisk manager, search for aptx.

Have a nice day :o
[Magisk] sinrequilorios:
Thanks again for your prompt response, that module I also took the time to test it (when both were in the repo), but it didn't work either, have you recently tried it with any device that is on Android 10? In a 4pda forum nobody manages to make the module work on Android 10. And in the repo of the indicated module they mention that it is incompatible with Android 10. Any additional help I will be eternally grateful, greetings!
[Magisk] multiwirth:
Hmm yes i've Lineage 17.1 on my HTC One M9 and this module installed and it works fine as far as i remember.

I think i haven't actually tested it yet i may do it later when I'm at home.

I could also try extracting the libs from my daily driver.

It's also possible miui doesn't load the libs even if they're present.

I will talk back later when I'm at home.
[Magisk] sinrequilorios:
Thanks for your support, I will be attentive in such case! As for MIUI, in Android 9 / MIUI 11 it works, I don't know if it will be Android 10's problem :(.
[Magisk] multiwirth:
The module does work on my HTC M9, at least it loads the libs and enables aptx-HD.

But Bluetooth keeps crashing so i'm not sure if it's an device specific issue or an issue with Android 10.

It also seems like it loads the libs from /system/lib64/ but same results with crashes.

Logcat doesn't help don't understand the issue.

So i can only offer you to test it on your device.

I've hacked together a magisk zip which will add aptx libs to /system/lib/ /system/lib64/ and vendor/lib64/

Just to make sure that your rom will load the libs at all.

If it works for you, maybe i will make a clean release for it aswell.

Don't have any other arm64 device left for testing and on my oneplus 3t aptx is already included and working fine.
[Magisk] sinrequilorios:
Thank you for your effort. I went back to Android 10 again to test. But I could not make it work, I tried the experimental module that you included here. And it does detect the device as an aptX, but when playing audio it gives an error and the bluetooth fails. I also tried the module that you indicated downloaded from Magisk, but with that module it only detects the device as AAC (as if it were not installed).

Is there a way to manually add the libraries and it works? It does not matter that it is not for a magisk module (that is, it does not matter that it is a little more laborious). Thanks in advance again.
[Magisk] multiwirth:
The issue with android 10 is, you can't mount /system as rw in android anymore due to system-as-root.

But aptx libs are stored in /vendor usually (on arm64).

So i've put together a module with libs from my oneplus3t but jo idea if it will work.

If you have a backup of your rom, extract the contents of the zip and put all the files from /system/vendor/rfsa/adsp/* in /vendor/lib/rfsa/adsp/ to your phone (create folder if it does not exist)

If it does not work, try to to the same thing with the files in /vendor/etc/acdbdata.

Copy file by file, then reboot and try.

For this step begin with the files labeled with bluetooth or bt since there might be existing files you'll have to override and may break other stuff.

And please don't forget to do a backup before you directly write to your partitions!

Good luck ;)
[Magisk] sinrequilorios:
Thanks again for your effort to help me. I checked both directories under "root / vendor", and neither "rfsa / adsp" existed within "lib", nor did "acdbdata" exist within "etc".

I had to create both directories (so no files were replaced), but when I rebooted the device everything I copied through MiXplorer disappeared... as if he had never copied it. I had to add the files via TWRP to keep them that way on reboot. But likewise no change happened, the codec was kept AAC. Then I tried the Magisk module in the repository again, but it stayed in AAC the same way. Finally I tried the experimental module again that you added here. And like the previous time, it was displayed as aptX, but the Bluetooth stopped working.

If it's any use, I'll indicate the similar folders that my device includes:

root/system/vendor/etc

root/system/vendor/lib

root/system/vendor/lib64

root/system/etc

root/system/lib

root/system/lib64

root/vendor/etc

root/vendor/lib

root/vendor/lib64

And also attached the module that I used in Android 9, in case it is of any use. Thank you very much, greetings!
[Magisk] multiwirth:
Bad news :(

I've tested various things on my htc m9 including using the weird libs from my oneplus 3t from what i believe was for aptx but none of them seem to work.

Also the last module you shared comes with various aptx libs in various directories.

The stuff on my oneplus looks like some proprietory stuff and a friend of mine doesn't have any of those files at all (but working aptx in android 10, oneplus6)

So what i guess, it seems like android 10 needs more low level patches to get aptx to work (at least now?) until someone comes up with "generic libs" like we was using previously.

Those generic libs do load on my htc m9 but forces bluetooth to crash (same result on yours)

Seems like they're too old and incompatible and i can't find a source for updated libs.

Maybe i can find a way to talk to the lineageos dev for oneplus3 to find out what he did or what i missed.

Seems like armv7 roms/devices handle this much easier, those old libs do still work perfectly.

Maybe we can get arm64 to use arm 32bit libs but i really don't know how.

Sorry about that, would've been great to fix this but it is a bigger issue as it seems :/
[Magisk] sinrequilorios:
Don't worry, you did what you could and I really appreciate it. In the same way I will be attentive to the subject, to see if you or someone else finds the solution. It would be great! Greetings and thanks for your contributions!
[Magisk] torukk:
Guys, I can confirm that there is definitely some problem with the aptx libraries on 10, I was using the same libraries hacked to my build in 14.1, 15.1, now in 17.1 it seems first that aptx is working, but bluetooth then crash. Its not problem of library paths in 10 or something like that, since these libraries based on its filename were from android sdk21, there are pretty old and was working fine on many old android versions, but for 10, we need some updated binaries. I'll try to find some (that's how I got here).
[Magisk] multiwirth:
Yeah those libs also get loaded on my htc m9 (arm64) but BT crashes, the arm (32 bit) libraries are still working fine on such old devices running android 10.

If i remember right, the most used libs in various aptx ports were extracted from a stock OOS from a oneplus3 device but more recent firmwares on other oneplus devices no longer have the aptx encoders as libs and so it is in LineageOS 17.1 for my oneplus 3t which is aptx(hd) enabled out of the box but doesn't have the libs.

Probably integrated to the bluetooth driver itself.

Anyways if you find anything, i would appreciate it if you can share it with us ;)
[Magisk] torukk:
hey, I've downloaded blobs from google 'blueline' device, these blobs are for 10, and I can confirm that they works in 17.1, there are only 64b libs, in my system both placed to vendor/lib64, from TWRP:

suzuran:/system_root/system/vendor/lib64 # md5sum libaptX*

59d896f337f570eaf54a480261f50ccc libaptXHD_encoder.so

18e6569d5bf4e3b1124e9f95e1b1df4a libaptX_encoder.so

link:

https://github.com/Aqua-devices/vendor_google/tree/x/blueline
[Magisk] multiwirth:
Deleted duplicate-post
[Magisk] multiwirth:
Thanks for sharing, will have a loom on it this evening and maybe update the module to make it also compatible with arm64 after some testing
[Magisk] juanantofb:
Hi, how i can download libs fron GIT?

ÇThanks.
[Magisk] multiwirth:
it´s not a git repository but you can download and extract the .zip to get the "source code".

However "git clone" should make it a git repository while cloning it to your local system.

git clone URL /output/dir/

It´s just simply a packed magisk module, the libs are in zip/system/lib/
[Magisk] multiwirth:
deleted (ignore this)

deleted duplicate
[Magisk] multiwirth:
Updated the module

I just updated the whole module, thanks to [MENTION=6038505]torukk[/MENTION] for pointing me to the right direction https://github.com/Aqua-devices/vendor_google

It´s now compatible with arm64 and android 10 (tested on HTC One M9) however i currently don´t have an arm64 device running pie so can´t tell if it will still work there.

Feel free to try and let me know!

Download
[Magisk] juanantofb:
Hi, ey dev, work fine in my old Xiaomi A1 with LOS 17.1.

Thanks.
[Magisk] multiwirth:
Thanks for the feedback ;)
[Magisk] juanantofb:
Hi, also work fine in a HTC One with LOS 17.1.

Thanks again.
[Magisk] kush1131:
how to port aptx tws+ audio codec to snapdragon 845...

Qualcomm released aptx tws+ codec to connect both truly wireless earbuds simultaneously snapdragon 845 is supported but it is upto the manufacturer to support it. How can we port it? How did you find out what libs to include etcera?
[Magisk] multiwirth:
Well i had a look on older aptx ports and since android oreo it´s loading those libs automatically if present, which is somewhere documented and reported many times from other people.

So it´s just a matter of finding a source of those libs either by extracting them from a aptx enabled rom or getting them elsewhere.

The current libs are from a google stock rom, which was dumped and uploaded on github.

For aptx tws+ it get´s really hard.

Even aptx (hd) got implemented into the bluetooth stack itself on many devices already, google is the only vendor still having binaries like this.

So it´s very hard to find and port aptx tws+ i guess + i don´t have a device which supports it or any rom on hand with it.
[Magisk] zazabichi:
Have someone tried it on Galaxy devices with Android 10 onboard? The only things my Note Ultra 5G lacks is Aptx-HD.
[Magisk] multiwirth:
If you have TWRP and Magisk installed anyways, why not backing it up and try?

Android should load all libs on boot and since android natively supports aptx-libs, it should work as long as samsung didn´t customize their android rom too much.

Also there shouldn´t be anything go wrong when adding some libs to the system.

The worst thing that can happen, your bluetooth will keep crashing.

But then uninstall the module and reboot and you should be fine.
[Magisk] zazabichi:
Thanks for your feedback. Unfortunately there is different a situation for US Samsung users because of the locked bootloaders. As I know bootloader unlock is a paid service and costs USD 150. The only reason I want my device to be rooted is Aptx-HD so there is risk to fail.

P.S.

I have opened a thread. Let's see what happens.

https://xdaforums.com/t/aptx-hd-mod.4199729/
[Magisk] multiwirth:
Oh well that's something.

I don't have experience with US only devices but yeah i heard about non unlockable bootloaders.

That's one of the reasons why i bought a oneplus phone the last time.

No unlock keys, no warranty loss, no eFuse and tons of community based projects.

I wish you good luck, however if something went wrong i guess you can still restore it via odin as usual, i don't know anything about US market devices.
[Magisk] akd06:
I have xoami mi A1 device with pixel experience custom rom based on android 10. Dose this kernel compatible with pixel experience rom? Kindly advice. Thanks.
[Magisk] multiwirth:
Yes it should work
[Magisk] akd06:
How to install the zip?
[Magisk] multiwirth:
You have to install it from Magisk Manager
[Magisk] akd06:
Is it not possible to install with twrp using install option?
[Magisk] multiwirth:
No it's a magisk module and will only work with magisk so install magisk first if you haven't already.

Otherwise unzip the module and manually place the included files into their correct path on your phone and reboot.

Note this will not survive OTAs, so i still recommend using Magisk to survive OTAs and make things a lot easier
[Magisk] akd06:
What is the path, if I do it manually? I don't want to root my phone. I can use only twrp. Kindly help
[Magisk] multiwirth:
Oh this will be a pain without root...

Ok so unzip the files, reboot to twrp and copy the folders inside "system" lib and lib 64 to your phone´s /system/lib+lib64 (if it ask to override, tap yes, it will merge both folders and not override anything.

Do the same with the folder vendor (lib and lib64).

It might be enough to only copy the lib64 folder once to /vendor/lib64 if your device is arm64, otherwise copy lib only.

Probably not neccessary to place files into system and vendor, only one of those.
[Magisk] akd06:
My phone is arm64. There are vendor, sys, system ,etc folder if I access through twrp file manager. I copy the contents of vendor folder in your zip folder to my devices vendor/arm64 folder & similarly for arm64 folder in zip folder to my device system folder. Is that what you saying?
[Magisk] multiwirth:
In case of arm64, you also only need lib64.

The extra files just makes sure that this module is compatible with all devices and arm64 ROMs will simply ignore the lib (32bit) versions of the files while lib64 doesn´t exist at all on armv7 and the files will end in nirvana while installation on such old devices.

So it will be enough to place lib64 from the zip to /vendor/lib64 through TWRP.

Maybe also /system/lib64, this depends on your ROM.
[Magisk] akd06:
Don't it make my phone into bootloop even if put files correctly.
[Magisk] multiwirth:
Usually no but since you already run a custom ROM, in case of bootloop just dirty flash your rom.zip again it will keep open gapps but delete any other modifications to /system and ofc. keeps your data.

Or backup /system through TWRP if you don´t have the rom.zip of your current ROM.
[Magisk] akd06:
Thanks for your advice. One last advice, pixel experience incremental update refuse to install. Any idea how to fix it?
[Magisk] multiwirth:
Uhm I'm not really familiar with pixel experience at all but i assume it's because you modified the system.

However if it's the same update format than for example LineageOS, it should still update since you download a full ROM for every update which overwrites /system anyways.

But to be 100% sure you should ask this in a pixel experience support thread.
[Magisk] akd06:
While trying to copy contents of lib64 folder from zip folder to device's system folder, my device shows SYS & SYSTEM folders among others. The sys folder in device contains lot of folders, namely class, firmware, etc. But system folder which is blue in color contains nothing. In which folder shall I chose sys or system. Kindly advice.
[Magisk] multiwirth:
Sys is completely irrelevant and shouldn´t be touched.

Make sure to mount /system in TWRP before accessing it
[Magisk] akd06:
Ok. Thanks.
[Magisk] akd06:
I followed your instructions & successfully copied the files in respective places using twrp. But after rebooting to system and connected to my car's bluetooth receiver which is aptxhd compatible, it still connect to default SBC irrespective of aptxhd settings in developer option. It means your files not suitable for pixel experience rom. However I didn't get any bootloop. Kindly comment. Thanks.
[Magisk] multiwirth:
You can still try to copy all files included in the zip so all lib and lib64 to /system and /vendor.

If pixel experience is aosp/lineage based, it should work.

Android 8+ natively supports aptx(HD) and expects the drivers in /system/lib64 or /vendor/lib64.

As soon as they're present, aptx should work.

If you want to, you could try LineageOS it's a very similar experience to stock android and will definitely work with aptx libs
[Magisk] akd06:
As per your instruction I tried to copy lib files also but no avail. For your information while copying aptx files in /vendor/lib64 folder, files get deleted (not saving) from /vendor/lib64 folder after rebooting to system. Although files saving in /system/lib & /system/lib64, /system/vendor/lib64 folder after rebooting. I tried to mount vendor partition from twrp but it is not selecting the check box as mi a1 supports only non treble rom. Pixel experience is non treble aosp like lineage os rom. Thanks.
[Magisk] akd06:
Is it possible to share build.prop of lineage 17.1? You have to use adb command " adb pull /system/build.prop" to get build.prop file to your adb folder from where run command prompt. I getting problem for installing aptx & aptxhd in my xiaomi mi A1 running pixel experience rom. Thanks.
[Magisk] akd06:
I tried again to install aptx & aptxhd in my xiaomi mi A1 phone but failed. I just came across a XDA post wherein in addition to transferring aptx & aptxhd lib files to device, it said to edit build.prop file with some codes pulled from device using abd command & twrp. The codes are : persist.bt.enable_aptxHD=true, persist.service.btui.use.aptex=1, persist.vendor.d2ap_offload_cap=sbc-aac-aptx-aptxhd. Kindly advice. Thanks.
[Magisk] multiwirth:
The build.prop edit is only needed for android 7 (anything below this doesn´t support aptx at all except oem roms with preinstalled aptx).

On anything from oreo and up should natively support aptx as soon as the lib files are present.

You can still try to flash magisk and install the zip as module and if this doesn´t work, you can simply uninstall magisk either by flashing boot.img from your rom or running the uninstaller zip for magisk.

You can even disable superuser inside magisk, so it will only load the modules.

Since it´s systemless (no tampering to /system at all) it will be OTA compatible and survive OTA´s aswell (including all installed modules).
[Magisk] akd06:
Thanks for your reply. Is there any possibility that pixel experience plus rom which my device currently running, completely removed the aptx & aptxhd drivers for the sake of better LDAC codec by the developer? My rom is based on android 10 which out of box supports only sbc & hd codec LDAC in bluetooth implementation. How do I sure that aptx & aptxhd driver present in my system? Any file details for those driver so that I can search for? Any such drivers you can provide. Waiting for your valuable feedback. Thanks.
[Magisk] multiwirth:
I don´t have much info about LDAC but since it´s showing up in developer settings, i assume it´s aswell supported by AOSP out of the box.

I don´t have a LDAC compatible headset and it ´s some Sony proprietary stuff as far as i know, pretty unusual that you have it.

Anyways both APTX and LDAC should be able to co exist but chances are high,the LDAC drivers are integrated to the bluetooth stack itself just the way APTX-HD is integrated on official LineageOS on my OnePlus 3t so there are no files you could explore, it´s coded in source code on the bluetooth stack itself.

I may have a look if i can get Pixel Experience plus on my HTC One M9 and check it´s behavior (in LineageOS it supports the aptx libs just fine).
[Magisk] NEWTINGZ:
Hey Helllo :asking

What would the module do to android 6 ? ,oem Huawei rooted/unlocked magisk

Just By chance ,like Just spitballing you know :sneaky:
[Magisk] multiwirth:
Honestly, i expect it to do nothing, Android 6 doesn´t support aptx out of the box and i actually tried to find a way to get it working on my s3 mini running android 6 but no chance.

You need at least Android 7 to get aptx(HD) but this module won´t work on Android 7, needs a few more modifications in build.prop and someone who can test it as i do no longer have a device running old android 7.

I may add android 7 one day if there´s demand for it.
[Magisk] akd06:
Hi, I have decided to flash custom rom of lineage 17.1 os to my xiaomi mi A1 device. What wil be the best gapp pkg for lineage os? After installing the rom, I will flash your aptxhd pkg for getting aptxhd. Kindly advice. Thanks.
[Magisk] multiwirth:
I usually pick opengapps-nano.

It includes all google functionalities you cannot download from playstore later but excludes everything else which you can then download manually later like youtube or gmail.

For lineage 17.1 which is based on android 10 and arm64 you should pick opengapps 10/arm64/nano

You can also pick pico which would be the bare minimum for playstore to work or stock to get all google apps bundled.
[Magisk] akd06:
Thanks for your reply. What about gcam? Pixel experience rom which my device already running in has gcam included in the rom. Kindly advice. Thanks.
[Magisk] multiwirth:
Gcam is a nice mod for snapdragon powered devices actually.

It´s far better than LineageOS "Snap" and i also use Gcam on my OnePlus 3t, which was ported from a Pixel phone with most of it´s features working.

There also was a "generic" Gcam for any device a while back which i used on my Galaxy S3 back then but both apps are actually different but still better than snap.

So basically good for you it´s preinstalled on your build of LineageOS
[Magisk] dkcldark:
This is brilliant.

Could you build this module for Android 7 please? I'll test it..
[Magisk] Prit Kumar:
Can I use this module in android 11,lineage rom 18.1. phone Lenovo k6 power.

thank you....🤗
[Magisk] multiwirth:
Yes should work
[Magisk] multiwirth:
Yeah probably possible but I'm busy atm so maybe I'll look into it at the weekend
[Magisk] GabiNeoK:
Hello. I would like to install Your module to alldocube x Neo (Android 9) but I would like to do it within original stock ROM. Is there safe way how to do it? Thank You.