yashsingh1/xdaforums huggingface dataset:
[Magisk] multiwirth:
If you have Magisk installed, the module will be installed systemless.

This means no files on your system partition will actually get touched.

If anything goes wrong, you can remove the module from the magisk app and reboot.

The worst thing that could happen is your bluetooth crashes after enabling it > uninstall module.

However it´s not guraranteed to work but it should.
[Magisk] dskina:
Thanks so much, this is exactly what I needed for my tab4 10 plus.
[Magisk] multiwirth:
Thanks for the feedback, nice to hear it´s working for you ;)
[Magisk] NoneRain:
Thank you! :)
[Magisk] Mentalmuso:
Hi, I read someone mentioned usa samsung qcom devices. I have the note 20 ultra, usa model unlocked and rooted. I'm hoping to get apt-x HD functional on this device but haven't succeeded , I'm about to try manually adding the .so you have into my vendor using recovery.
[Magisk] multiwirth:
The hardware doesn't have to be qcom based even, only requirements are at least Bluetooth 4.0 capabilities and a compatible ROM.

Samsung may have removed the native support for aptx which google introduced with android oreo or made major changes to the bluetooth stack which differs a lot from AOSP which might be the case for a highly customized rom like samsung has.

So if the module didn't work for you, i can only recommend to try a AOSP based rom on your phone.

This module works fine on my Samsung Galaxy S3 for example, it runs a Exynos4412 SoC but also got official licensed to use aptx.
[Magisk] Mentalmuso:
Understood. Thanks
[Magisk] bluefish196:
Guys, the power of "Complaining" made them to bring back AptX support.

I own two level Pro headphones and Earphones, both use Aptx-HD and Samsung when upgraded the S8 to Pie killed the support, so people started to complain, 200 dollar headphones running SBC. Eventually they rolled out Android 10 with AptX and there is an HD toggle in developer options.

I keep telling people AptXHD was a good codec and many Samsung buds hate the Samsung scalable codec which keeps disconnecting...

I have the Note20 Ultra Sprint/Tmobile and up to date and yes, I still filed a bug report that their codecs need to be UPDATED.

Screenshot attached.
[Magisk] juniordnz:
OP, I wish I could thank you 1 million times. Was getting crazy trying to make my earbuds work with LOS17.1, was almost losing hope and going back to stock (ugh). And you just saved me! Wish you all the best.

BTW, my phone is a Samsung S6 with Wickengberg Unnoficial LOS17.1.
[Magisk] GabiNeoK:
Hi multiwirth! Thank You very much. Your module perfectly and stable works also on my Device. I have Alldocube X Neo tablet with systemlessly Magisk-Patched stock boot and stock ROM based on Android 9 pie.
[Magisk] FaXilifresh:
This works on my Oneplus 5 (cheeseburger) on "ArrowOS v11.0 | VANILLA" (Android 11)
[Magisk] satya zaen:
Hi buddy, does this module support bluetooth audio codec?
[Magisk] dimon222:
Seems no longer works in 18.1. Codecs are shown as unsupported in Developer Options.

Arm64 - Samsung Galaxy S5e

It was working in 17.1
[Magisk] multiwirth:
It works for me on HTC One M9.

Codecs in dev settings will only show up if your device AND headphones support it (and automatically switch to aptx hd audio by default).
[Magisk] dimon222:
My device and headphones didn't change with upgrade of LOS and both support it, but you're right and it's working. I've collected more details. Something more to do with behaviour of LOS 18.1 on my device and being unable to switch codec manually. With this module installed it still shows AptX HD in developer options, but I'm unable to change it and above "HD audio" toggle is off and greyed out. It does seem to report in logcat that it's using AptX HD. The sound looks worse than 17.1, but it might be simply just different audio driver.
[Magisk] multiwirth:
well it should work.

Maybe the bluetooth stack is somehow messed up?

It looks like this for me (attachment)

BTW what architecture is your device?

arm or arm64?

arm uses older libs, i thought i tested them but maybe that´s the issue here and we need newer armv7 libs.
[Magisk] multiwirth:
Nope... also just fine on my HTC One M8 (armv7) on Lineage-18.0 (18.0 is more or less the same as 18.1)

Sounds just fine, libs are working fine.
[Magisk] nafizquatib:
Its not working. Can you help?
[Magisk] multiwirth:
You´re using an old magisk module which doesn´t work with android 10 and above and is not made by me.

You need newer aptx libraries for anything newer than pie.

Its long depcreated.

So remove it and download the module i´m providing.

Sadly you can´t download it from magisk repo so go to post #1 there´s a download link.
[Magisk] nafizquatib:
Thanks man. You just saved my day. There is no sign of aptx beside the tws. Is that okay?
[Magisk] multiwirth:
Your headphones doesn´t support aptx-HD so this should be normal.

In reference to amazon.de it only mentiones "Qualcomm aptx" and nothing about aptx-HD but it´s already far better than standard SBC codec.

More pricy headphones may also support aptx-HD
[Magisk] multiwirth:
Hey everyone!

I started another attempt to get this module submitted to magisk repo so it can be found and installed directly via the magisk app. ;)
[Magisk] dimon222:
arm64. Newly arrived OTA for 18.1 allowed me to pick codecs in Developer Options now, so there's definitely something to do with OS rather than module. Toggles in Bluetooth device options are not visible for some weird reason still. Device is Samsung S5e (Wi-Fi).

Great module !
[Magisk] multiwirth:
Well i have to say i also saw a strange behavior.

While HD-audio toggle shows up when using my headphones, it didn´t at all when using my hifi bluetooth receiver which also supports aptx-HD.

No matter if i connect it to my HTC One M9 (with this module installed) or my OnePlus 3t which has aptx-HD enabled out of the box.

In developer settings, aptx-HD is greyed out but it selects it anyways.

Idk why, maybe a lineage specific bug?

Seems like it also depends on the bluetooth device you´re using.
[Magisk] BerkeKan:
Thanks for the module, but it's not working for me.

I'm on Havoc-OS-v4.3, which is a Lineage OS 18.1 based ROM.

As you can see in pics, it says streaming Aptx, but it can't be selected when tapped on it. I'm not sure if it's working or not?

Device: Samsung Galaxy S8+ Exynos.
[Magisk] omeringen:
Hi,

Bluetooth works fine but then crashes some time later, works then again crashes. . .

For my device this one works fine: https://1drv.ms/u/s!AqlJY73bUA7rhptwuL8DPIVNTGNMug

I couldn't find developer page but name/nickname is Carl Baker.

Xiaomi A2 Lite

Android 8.1.0 [V9.6.11.0.ODLMIFF]
[Magisk] multiwirth:
I´m not sure.

It happens for me too, also on my device which comes with aptx-hd preloaded.

Seems like google did something on android 11.

With some devices, it uses aptx-hd but doesn´t show the HD-audio toggle in settings and also doesn´t allow to change the codec.

But the audio sounds as good as it should, you can also see the system is selecting aptx-hd in dev settings whille connecting to a device.

It´s working but google messed something up with the codec selection.

The link doesn´t work.

Also without any logs it´s almost impossible to tell what issue you´re having.

I guess since you´re on oreo, the newer libs probably don´t work well with your OS since they were designed for Android 10.

Also they´re designed for stock android, not for highly customized ROM´s like xiaomi, samsung, sony etc. use.
[Magisk] KaiseRRUby:
Can confirm this works on Oneplus 8 Pro running latest DotOS.
[Magisk] omeringen:
Download link works fine. Also it's stock Android One, not any of customized ROM.
[Magisk] SilverHazeFlash:
Thanks multiwirth for your work on this.

I have a Samsung S21 on the way that I look forward to trying with this module, guessing it wont work given the Samsung's customisation but looking forward to giving it a try anyway.

Can anyone advise if Aptx Adaptive is working for them with this module?
[Magisk] multiwirth:
Doesn't it already have aptx certification on it's own?

Quite common for high end devices.

Would that check first.

Anyways, aptx adaptive, low latency and such is not part of this module.

Only aptx and aptx-HD will be supported.
[Magisk] SilverHazeFlash:
Thanks for the reply @multiwirth

From what I am reading unfortunately only aptx but not HD or Adaptive are supported on the S21. Seems they cheaped out on the licensing fees or are trying to push their Galaxy buds. Here is a thread on Samsung's forum if you are interested.

Nevertheless, I will confirm when the device arrives and let the community know

Thanks again
[Magisk] juniordnz:
Any help? Can't get this to work on LOS 18.1. Recently updated my Galxy S6 from 17.1 (where this module worked perfectly) to 18.1 and now I can't get audio from the phone to my MPOW earbuds.

The selection for aptx stays grayed out and sound comes out from phone speaker, even if I select the earbuds. Strange thing is all the earbuds commands work fine, I can play, pause, everything, just the sound that keeps coming from the phone.
[Magisk] multiwirth:
Hi,

even since it's greyed out, it's still using aptx.

For some odd reason it's just not showing correctly in pairing menu and in dev settings.

It's an issue with android 11 and i'm not quite sure what's causing this.

But my heaphones always report aptx-HD to be active and according to the currently used sampling rate in dev settings, it shows 48khz to be currently used, which corresponds to aptx-HD (not sure about non HD aptx though)

About your issue with the playback, well try to go to your settings > sound > playback device and make sure, your earbuds are actually in use.

If this is the case, well does bluetooth audio streaming actually work without the magisk module?

If you upgraded from 17.1 to 18.1 without a full wipe, i'd recommend first unpairing and repairing your earbuds.

If that doesn't help, make a backup through twrp and do a clean install of 18.1

Hope this helps.
[Magisk] juniordnz:
Hi, thanks very much for the fast reply.

Unfortunately, I already did everything you suggested:

1. Earbuds are connect correctly, I can even play/pause/skip songs with it, it's just the sound that's not coming through.

2. I did a full wipe before going from 17.1 to 18.1, so I guess that's not the case either.

3. When I go to sound settings, I have the option of my earbuds and speaker. Even when I select the earbuds the sound keeps coming from the speaker.

Your module was a godsend on 17.1, I was about to quit LOS when I found it. I'm so frustrated now because this 18.1 build I'm using feels so smooth, works perfectly. But I just can't get any sound to my bluetooth earbuds...

Is there any prop that can be changed manually maybe? Anything else?

HD Audio and Disable A2DP are also greyed out, as my print below shows. All this features used to work on 17.1
[Magisk] multiwirth:
hmm so what happens if you remove the aptx module and reboot?

Does it play audio then?
[Magisk] juniordnz:
It doesn't. Without the module it autoselects AAC and keeps playing through speaker rather than the earphone.

So the module seems to have some effect, because without it it won't default to aptX. But it keeps grayed out and doesn't send sound through the bluetooth connection.

Already tried your module and the one avaiable on magisk repo. Tried installing through TWRP and magisk. No success either way...
[Magisk] multiwirth:
Well this sounds more like there´s something broken in your rom itself.

aptx is working and selected for you but if there´s no audio from your earbuds even after removing aptx module, then it´s 99% an bluetooth stack issue in your ROM.

So maybe you can upgrade/downgrade your weekly build?

Otherwise you have to open a bugreport to lineageos on gitlab, unfortunately.

Or try another R based rom like Resourrection Remix, AICP etc.

I had such an issue with a CM10 build for a Sony Xperia Miro (very old device) and it was fixed after correcting something in mixer_paths.xml.

I don´t recommend messing around with this file but it´s possible there´s something configured wrong so the OS doesn´t route audio to a bluetooth device.

Maybe you can replace the file from the 17.1 builds and see if this helps. (backup the original file first, if something goes wrong, there´s no audio at all)

It´s usually placed in /system/vendor/etc/ alongside some other audio related config files.
[Magisk] juniordnz:
Yeah, i just gave up and went back to 17.1.

It seems to me that 17.1 is much more polished in this stage than 18.1. Recent builds don't even need the aptx module anymore, everything works out of the box. Maybe I'll give 18.1 another try later down the road...

Thanks a lot for the help, your module is awesome and I'll keep recomending it as I do!
[Magisk] multiwirth:
You're welcome :)
[Magisk] ctakah27:
is this only for lineage? I have a Lenovo tablet with a rooted stock rom... would it work?
[Magisk] multiwirth:
It´s only tested on lineage builds by myself but it is supposed to work on other AOSP based ROMs aswell.

A few people reported it to be working on their stock ROMs and in fact since android 8.0, android supports aptx(hd) natively unless the OEM has built in restrictions or uses a highly customized bluetooth stack.

I suggest you to just try it out and report back.

The worst thing that may happen is your bluetooth keeps crashing until you remove the module and reboot.

But ofc you need magisk root for this to work (or manually place the lib files in their respective DIRs)
[Magisk] phaze3131:
I have been at this for a few days.

I'm running lineageos 18.1 on my Galaxy s10 exynos g973F/DS and I am not able to control the volume on my car stereo.

When this same device was stock android 10 everything worked perfect.

Is there a possible fix if I am rooted?

Thanks for any help
[Magisk] ctakah27:
It works but I'm only getting aptX (no HD). Receiver device definitely supports it and I use it with HD from another phone that came with HD support out of the box. But better than nothing, thanks!

(Lenovo Yoga Smart tab stock 10 rom rooted with magisk)
[Magisk] Roury:
Hi sir, thanks for the module, there is a way to verify if the module is working, I dont have my buds here right now. I was looking in dev setting but the aptx option is grey out.

Thanks again.
[Magisk] multiwirth:
Hi, not sure did this issue occur after flashing this module?

Otherwise i assume it´s an issue with your ROM and therefore not much i can help you with.

You can open a bugreport on gitlab if galaxy s10 runs official lineageos (downloaded from lineageos.org) otherwise you can report the issue in the xda thread where you found your ROM.

Hmm very strange.

Well it should work but it´s possible the handshake between your phone and headphones don´t work properly so it uses "only" aptx.

Otherwise anything that has at least bluetooth 4.0 usually works fine with aptx-HD.

You could try another ROM, since your stock ROM isn´t designed to support aptx at all, maybe they removed some routines that would load the aptx-HD libs.

The options in dev settings are kinda weird:

When no device is connected, everything is grayed out.

Since android 11 it´s greyed out aswell after connecting a device, but you´ll see aptx-HD is selected and active.

It´s an android 11 bug, it also occurs on my device which comes with aptx out of the box.

Also the "HD Audio" toggle sometimes is missing in the bluetooth settings.

So it´s not that easy to verify it´s working.

But fortunately my headphones have a voice announcement telling me if either aptx or aptx-HD is in use so it´s definitely working here even if greyed out.

Also it seems like this got fixed recently in a newer release tag of android 11 (the release tags that also bring you the security patches)

Hope this helps :)
[Magisk] Roury:
Thabk you so much, everything works with my Galaxy Buds Pro
[Magisk] Senior_Pj:
Hey bro, need your help for aptX TWS+ codec support to force in
[Magisk] multiwirth:
Hi, what specific issue do you have?

Do you have a source for aptx tws+ libs?
[Magisk] francoism90:
Unfortunately, this does not work for me (LOS 18 - S9 - greyed out). Galaxy Buds+.
[Magisk] multiwirth:
Galaxy Buds+ don´t support aptx, only aac which is enabled by default.

Both devices must support the codec.
[Magisk] francoism90:
Now I feel stupid for asking.. thanks for the help anyway. :)
[Magisk] multiwirth:
no problem mate :)
[Magisk] junior-art:
Hi all, say me plz, how enable aptx hd 48 kGz 24 bit on samsung note 20 android 12, all modules and codecs not working, maybe need write code in terminal ? Apx working, aptx HD not working. Hearbuds with Aptx HD.
[Magisk] multiwirth:
Hi,

Are you running on stock?

If so, there´s not much i can help you with as i neither know how sammy ROM´s handle bluetooth stuff nor do i have a device for testing.

And at last, i just packed blobs from google pixel for aptx (HD) into one magisk module since in theory, android 8+ will natively support it but who knows how samsung handles bluetooth codecs...

Samsung uses highly customized ROM´s.
[Magisk] junior-art:
I wrote to the Samsung developers, if they fix it, I will write to this thread. I hope they will fix it, in theory there should be support for aptx HD, the headphones support this codec, but the usual aptx 44.1 kgz 16 bit is used.
[Magisk] multiwirth:
Well to implement aptx(hd) the vendor (samsung) has to pay licensing fees to qualcomm and probably also follow some licensing agreements.

So i dunno if they will ship aptx(hd) to your device, unfortunately.

However if you can live without stock rom, i´d recommend looking around for lineageos for your device.

Then the module should work fine you.
[Magisk] Case_Of:
Hello,

It works on LineageOS 18.1 on my FairPhone 3 (FP3) and Nexus 6 (shamu).
[Magisk] thetac0:
Hey, just wanna report it's working on a Mi Mix 2 (chiron) on LineageOS 18.1!

Awesome module, thanks!
[Magisk] bobbyamarthaa:
Hello, can u add aptx adaptive module?

I'am using Xperia 5, on my lastest firmaware, this device supported aptx adaptive codec, but now i'am using AOSP Based rom (Not Sony Stock), but just support AAC Codec, after using this module, just got AptX codec, but my earphone support to AptX Adaptive, i hope u can add aptx adaptive on this module.

Sorry for my bad english.
[Magisk] ClockUpEx:
Any updates? Doesn't work for mine Redmi K20 Pro (raphael) Lineage 18.1 it just makes my screen brightness broken (high level all the time)
[Magisk] multiwirth:
Unfortunately, i do not have the required binary blobs.

Also, according to Android Open Source Project Android Oreo (and up) only support the following codecs natively:

AAC

aptX

aptX-HD

LDAC

So this means, you´d also need a modified bluetooth stack in order to use the codec.

But this also means, that the aptx adaptive codec might be integrated into the bluetooth stack itself, which means there are no generic binary blobs avaiable, even if i had a ROM dump of your stock ROM.

So in this case, you may want to ask your ROM dev if he is able to include parts of the stock bluetooth stack.

In the end, this would only work for your specific device, so making an universal magisk module would require patching the ROM and will cause a lot of issues with different ROM´s i guess.

That´s a weird issue actually.

It isn´t meant to interference with your brightness control.

The blobs don´t override anything, except if you already had aptx blobs included in the ROM.

I wonder if something may have gone wrong caused by something else.

Is your device running official or unofficial builds?

Maybe your dev added some fancy stuff to the rom, i dunno.

A pure lineage build will work with this module.

If there are builds avaiable, you could try AICP on your device instead.

However there isn´t much i can do about this issue :/
[Magisk] thisisludachris:
Much thanks multiwirth. Confirmed the Bluetooth crashing issue is fixed on Samsung Galaxy S2 (gts28vewifi) on LineageOS 17.1.
[Magisk] wendsay:
Hi, I have a S20 FE with stock rom Android 12.

I really want to make use of aptx-HD as it's cheaper to found receivers (to use in my old hifi system), and I already have a headphone with this technology. (I have Tidal Hi-Fi, and I'm a bit enthusiastic on sound quality)

I'm reading the tutorials about Magisk (how to install and use), but also would like to know if there's any risk of losing my data, or bricking my phone on trying to install this on it.

Actually I don't know about custom roms, but, if I have all the stock features available on it, why not?

But first I would like to try and install on stock to avoid all the data migration pain.

Also know that the phone supports LDAC from Sony, but the receivers are more expensive, and I won't be able to use my headphones either.
[Magisk] multiwirth:
Hi,

well Magisk Modules are system-less so that means any modifications are "mounted" every boot up so it doesn't modify your system at all).

So if you're stuck in a bootloop, you can simply remove the module from TWRP file manager and then boot up again (in theory).

But be aware that unlocking your bootloader and installing magisk will void your warranty, will permanently disable knox security and features aswell as some other features offered by samsung that may get disabled.

Samsung really gives you a hard time actually.

Also thanks to google, SafetyNet will probably fail after unlocking the bootloader and might cause issues with banking apps etc. (Some banks don't allow transactions/logins from rooted devices).

But other than that, magisk itself and modules shouldn't cause any harm at all.

Nothing that couldn't be fixed in the end.

If a module causes crashes, you can always remove it either through magisk app or through TWRP file manager (in case the phone won't boot)

Hope this helps ;)
[Magisk] wendsay:
Thank you so much for such detailed explanation.

I used to root old devices, but as this is basically a brand new phone, I have it since November, and still in warranty, I may be 'happy' with it as is, without any modifications.

I'll just grab an LDAC receiver and see how it goes, as for my headphone, well, 16-bit/48kHz it is so hahaha

Thanks friend!
[Magisk] newbieandroid:
Just stopping by to say thanks, this works on the Essential Phone running StatiXOS v5.0(Android 12)
[Magisk] matrix200200:
Has anyone tested this on Xperia xz1 compact 19.1 LineagOS unofficial?
[Magisk] bandario:
My dude, you are an absolute legend making this. I did not expect it to work on a MediaTek chipset but worked fine on Ulefone Power Armor 13 latest firmware (Android 11).

I was so angry when I discovered no aptX support but fixed in 39 seconds with your module. At least...that option is now the default and selectable. Haven't done enough testing to know it's actually working yet but it's a psychological victory ;p
[Magisk] nexkat:
Happily reporting aptX (not HD) is still working on

Nexus 7 (2013 Wifi) running on lineageos 18.1 (Android 11)

Thanks mate for this package!
[Magisk] multiwirth:
Yes i use an XZ1 compact myself as daily driver, no problems here.
[Magisk] borisSweden:
May I ask as this module is universal for Qualcomm phones. You basically ported the encoder for AptX that is a Qualcomm code. Is it possible to replicate for a simple audio encoder and decoder?
[Magisk] multiwirth:
Hi,

i don´t think so.

These are precompiled, closed source, blobs taken from vendor off an google pixel device.

The blobs however work on every device with bluetooth 4.0 capabilities.

I even got it working on my nintendo switch (which in fact can run android!)

If you wanted to implement it to your device (as an OEM), you only needed a license to do so, not actual qualcomm hardware.

Long story short: i don´t think you can make your own encoder/decoder out of it.

The module is basically only placing a few files into the right direction so android can make use of it automatically.

Maybe you want to have a look onto the AAC bluetooth codec.

It´s an open standard and implemented on any modern android device, i bet it even is fully open source.