[MOD][PORT][N]aptX codec

Search This thread

dh.harald

Senior Member
May 20, 2010
594
1,611
London
Unfortunately, OP3 has no aptX license...
Unfortunately, CM roms have no aptX support...
Until now.


The whole aptX codec support is already present in Qualcomm Bluetooth stack, in Nougat... We need only some proprietary drivers to activate it.
... and I've found that libraries in a Moto Z factory images.

UPDATE
After a review process, this modification has (partially) merged to LineageOS
Please contact your device maintainer to get this modification merged...
Example:
- https://github.com/LineageOS/androi...mmit/c67e3e7a78305f5c2d0965c7ed63dc0712dc1e06
- https://github.com/TheMuppets/propr...mmit/2e103ff47ae64f697e650863a764de30a663541d


UPDATE
aptX for LineageOS has officially supported from lineage-14.1-20170427 nightly
- binaries from Open Beta 14: https://review.lineageos.org/#/c/169488

Merged (Don't need update.zip from next weekly)
- Xiaomi MI5
- Samsung Galaxy S5 variants
- Oneplus 3
- LG SD820 variants
- HTC 10 (pme)

Requirements
CM14.x ROM (OOS4.0 is working as well)
aptX capable headset/speaker
install zip from recovery

Link
aptX: Use attached zip by @dr_root - aptX for most of devices / LineageOS
aptX/magisk: https://forum.xda-developers.com/apps/magisk/magisk-oneplus-3-aptx-res-audio-t3541904
aptXHD: https://forum.xda-developers.com/showpost.php?p=70805640&postcount=149 aptXHD for most of devices / LineageOS
aptXHD-system: https://forum.xda-developers.com/attachment.php?attachmentid=4077930&d=1489745531 libraries to /system/lib for Nexus phones / LineageOS
aptX-oreo: LineageOS 15.0/15.1 based phones (kanged from Pixel XL ROM)

Full ROM
lineage-14.1-20170308-UNOFFICIAL-oneplus3.zip
- LineageOS, non-root user build
- aptX & aptXHD applied (https://review.lineageos.org/#/c/161921/)
- sultanxda's SafeNet patch (https://github.com/sultanxda/android_kernel_oneplus_msm8996/commit/abc05b16bbd33521c2fffaf491c5657a94bfcfc5)

Confirmed devices
Oneplus3T + OOS4.0 (SD821)
Pixel XL + LineageOS14.1 (SD821)
Oneplus3 + OOS4.0/LineageOS14.1/RRemix 7.1.1 (SD820)
Xiaomi mi5 + LineageOS14.1 (SD820)
Oneplus 2 + LineageOS14.1 (SD810)
Nexus 6P + LineageOS14.1 (SD810)
Nexus 6 + LineageOS14.1/crDroid (SD805)
Oneplus X + LineageOS14.1 (SD801)
Oneplus One + LineageOS14.1 (SD801)
Samsung Galaxy Note Pro 12.2 + LineageOS14.1 (SD800)
LG Nexus 5 (hammerheadcaf) + LineageOS14.1 (SD800)
Xiaomi Redmi Note3 + LineageOS14.1 (SD650)
Xiaomi MI4i + LineageOS14.1 (SD615)
Xiaomi Redmi 2 + LineageOS14.1 (SD410)
Samsung Galaxy SIII + LineageOS14.1 (Exynos 4412)
Nvidia Shield Tablet + LineageOS14.1 (Nvidia Tegra K1)

It looks, It's working on a lot of Qualcomm devices: Snapdragon 821/820/810/805/801/800/650/615/410
 

Attachments

  • aptX.zip
    144.8 KB · Views: 42,562
  • Screenshot_20170213-132628.png
    Screenshot_20170213-132628.png
    135.5 KB · Views: 30,473
  • aptXHD.zip
    155.8 KB · Views: 9,129
  • aptXHD-system.zip
    159 KB · Views: 11,869
  • aptX-oreo.zip
    146.7 KB · Views: 4,159
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,659
Wow, this site with that amount of adds is almost unusable... Took me 5 minutes and maybe few MB spend on loading adds to download 140 KB zip file.
Anyway, good work. I'm waiting for my Bluetooth earphones and I'll test this when I get them in my hands :) Thanks.
 

Amd4life

Senior Member
Dec 30, 2010
1,814
433
Does this port work with stock Roms, or is it even needed? I'm new to OnePlus devices, so bare with me, if this is a ridiculous question.
 

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,659
Does this port work with stock Roms, or is it even needed? I'm new to OnePlus devices, so bare with me, if this is a ridiculous question.
The libraries inside the zip are from android 7.0.0 and probably they will work on any 7+ rom including stock (ob8 and 9). If you have a Bluetooth device that supports aptX(like head/ear-phones) you might want to try it, if you don't have, then you don't need it :)
I should receive my earphones today, so I'll test this on OB9(already installed and it seems that aptX is correctly loaded based on the logcat). Will report later how it's going.
 

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,659
I can confirm that aptX is working on OB9. Attached screenshot from the log with turning off and back on the Bluetooth and playing music after that (where the codec get initialized). Nice find and work OP, thanks again :)
 

Attachments

  • Screenshot_20161219-142338.png
    Screenshot_20161219-142338.png
    159.4 KB · Views: 11,718

kiha

Member
May 1, 2012
5
4
Seems that it is working properly. I just check it on the cm 14.1 nightly (dec 18) with my meizu ep 51. Find a few rows in the logcat. I would like to attach screens from logcat, but i don't know how to do it (=
 

Stupifier

Senior Member
Jun 8, 2010
1,906
680
Instead of just looking at the Logcat to confirm working (a good way to check I admit),
Do you guys notice an improvement to sound quality? I mean, that is the Whole point of apt-x codec.....Much higher bitrate and such.
 

kiha

Member
May 1, 2012
5
4
Instead of just looking at the Logcat to confirm working (a good way to check I admit),
Do you guys notice an improvement to sound quality? I mean, that is the Whole point of apt-x codec.....Much higher bitrate and such.

I Just downloaded a few songs in flac and listening it now. A quality is really awesome. I am really feel the difference
 

2x4

Senior Member
Oct 20, 2012
1,438
332
Austin, TX
i was really excited until i realized that none of my devices support AptX (Pioneer head unit, jaybirds, and lots of other BT headphones/speakers)
 

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,659
It's seems that aptX(HD) is already included in A.R.I.S.E., so for those that use it, most probably you don't need this :)

P.s. - I'm telling this just for information, no disrespect for the creator :)

P.s. 2 - Little off topic, but if someone know for a way to see the battery stats of the bt set, please PM me (it works on IOS natively...). Thanks.
 
Last edited:
  • Like
Reactions: Signor Rossi

dh.harald

Senior Member
May 20, 2010
594
1,611
London
It's seems that aptX(HD) is already included in A.R.I.S.E., so for those that use it, most probably you don't need this :).
Apt-x HD codec is already included to xperia x performance, but different filename. (You need to rename it from *int* to *rel*) But unfortunately, I have no clue, is it working or not... (The key functions are present) If somebody has apt-x hd headset/speaker, i could attach that lib as well for try...
 
  • Like
Reactions: dape16 and AcmE85

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,659
Apt-x HD codec is already included to xperia x performance, but different filename. (You need to rename it from *int* to *rel*) But unfortunately, I have no clue, is it working or not... (The key functions are present) If somebody has apt-x hd headset/speaker, i could attach that lib as well for try...
My point was that the arise users don't need to flash this (it may lead to some issues maybe, because of the different aptX codecs in the system). Anyway, I'm almost sure that aptXHD is backward compatible with the aptX and it picks the right codec depending on the paired device, so your idea to make another zip with the HD libs is good and if it works on aptX(without HD) device you can abandon your first one :)

P.s. - For some strange reason arise write different logd binary and now my logcat isn't working even after manually replace it with the stock one... So I can't see if the HD one work on my aptX earphones (no difference in the sound with your zip that I've tested before that, so it might work).

If you need I can extract them from the zip to test them too?
 
Last edited:

Top Liked Posts