yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] adr1st:
Connection:
9c:2e:a1:52:5b:de (Xiaomi Redmi Note 5 Pro) → e8:07:bf:1c:97:6d (1MORE iBFree)

Supported codecs:
Audio non-A2DP (aptX - 16000 32000 44100 48000, Stereo)
Audio SBC (16000 32000 44100 48000 | Mono DualChannel Stereo JointStereo | block: 4 8 12 16 | subbands: 4 8 | allocation: SNR Loudness | bitpool: 2..53)

Used for audio:
Audio SBC (44100 | JointStereo | block: 16 | subbands: 8 | allocation: Loudness | bitpool: 2..53)

Latest SBC Bitpool value: 53

Can you please tell me how to patch for using aptX or SBC DualChannel.

Thanks..

After using magisk aptX, more vibrant & crisps sound. Better than nothing.
[Android Software/Hacking General [Developers Only]] Nachitobot:
Hey, i have tested my Sony MDR-ZX330BT in Ubuntu:

Connection:

localhost () → 00:18:09:2b:b3:d2 (MDR-ZX330BT)

Supported codecs:

Audio SBC (16000 32000 44100 48000 | Mono DualChannel Stereo JointStereo | block: 4 8 12 16 | subbands: 4 8 | allocation: SNR Loudness | bitpool: 2..53)

Audio MPEG-2,4 AAC

Used for audio:

Audio SBC (44100 | DualChannel | block: 16 | subbands: 8 | allocation: Loudness | bitpool: 2..41)

Latest SBC Bitpool value: 32
[Android Software/Hacking General [Developers Only]] unibomber:
Would this work on a nvidia shield TV?
[Android Software/Hacking General [Developers Only]] grandgreed:
LIST OF THE TESTED DEVICES

I decided to continue a compatibility devices list since the work done by the author (which deserves at least gratitude and respect), this way makes a different view on a situation around the sound quality over bluetooth connection. There are many devices with support of bluetooth which obviously can sound much better. In this post I will provide the list of portable acoustics and other devices which were tested in "Dual Channel" mode.

Devices will be checked with next parameters:

Dual Channel | 44100 kHz | bitpool: 53 | block: 16 | subbands: 8 - with the final bitrate

617 kbps

.

Also exists some cases with sound distortions on some devices, only because of high bitpool values. It doesn't mean that these devices are not working. In this case bitpool value must be reduced with final bitrate up to 512 kbps. Whenever possible, it will be checked with 482 kbps.

Portable and other speakers:

✔️ Behringer MPA40BT

✔️ JBL Flip 4

✔️ JBL Xtreme 2

✔️ JBL Boombox

✔️ JBL Partybox 100

✔️ Dynaudio Music 3

✔️ Dynaudio Music 5

✔️ Naim Audio Mu-so

✔️ Harman/Kardon Traveler

✔️ LG FH6

✔️ Soundstream Mini Street Hopper SH5P

✔️ Sony MHC-V50D

✔️ Ruark Audio R2

✔️ Ultimate Ears Megaboom 3

✔️ Ultimate Ears Roll 2

✔️ GZ electronics Youngwind Hist

⚠️ Sony MHC-V21D (482 kbps works; unrestricted сrackling)

⚠️ Sony SRS-XB31 (482 kbps works; unrestricted сrackling)

⚠️ Sony SRS-XB41 (482 kbps works; unrestricted сrackling)

⚠️ Sony GTK-XB7/BC (482 kbps works; unrestricted сrackling)

⚠️ JBL Bar 2.1 (482 kbps works; unrestricted сrackling)

⚠️ JBL Charge 3 (482 kbps works; unrestricted stutters)

⚠️ JBL Go 2 (482 kbps works; unrestricted сrackling)

⚠️ JBL Clip 3 (482 kbps works; unrestricted сrackling)

⚠️ LG FH2 (482 kbps works; unrestricted some сrackling)

⚠️ Bang & Olufsen Beolit 17 (482 kbps works; unrestricted stutters)

⚠️ Remax RB-M9 / Rombica BT-17 (482 kbps works; unrestricted stutters)

⚠️ Remax RB-M19 (482 kbps works; unrestricted stutters)

⚠️ Xiaomi Mi Bluetooth Speaker 2 (482 kbps works; unrestricted stutters)

⚠️ SVEN MS-2051 (482 kbps works; unrestricted stutters)

❌ JBL Party Box 300 (Connects but no sound)

❌ Naim Audio Mu-so Qb (Connects but no sound)

❌ Harman/Kardon Onyx Studio 5 (Can't connect)

❌ Bose Home Speaker 500 (Connects but no sound)

❌ Marshall Kilburn (Crackling with any bitrate)

❌ Marshall Woburn (Error during pairing)

Headphones:

✔️ Marshall Mid ANC Bluetooth

✔️ Marshall Monitor Bluetooth

✔️ Sennheiser HD 4.50 BTNC

⚠️ Beats Solo3 Wireless (482 kbps works; unrestricted stutters)

Headsets:

✔️ Jabra Talk
[Android Software/Hacking General [Developers Only]] SamClem:
Is there / will there be a versions of this for OxygenOS?
[Android Software/Hacking General [Developers Only]] Bhabesh98:
Can anyone help me ?

I have Xiaomi Note 5 Pro device..with 1more IBFree first model headset... Which supports AptX codec

Actually the problem is..when I was in MiUi ROM.. The Bluetooth Audio transmission while gaming was perfect .means..no delay ..like I m playing a Shooter game.. When I fire.. At the same time I can Listen the sound of that in Bluetooth earphone.

In miui..

After that I tried Bootleggers ROM..in that also no issue with Bluetooth audio transmission

But after that i decided to change the ROM..because I needed some more features which were not present in bootleggers

After that I tried Aosp extended , Liquid remix ,Resurrection Remix,Hovoc os ,Aosip

All these ROMs giving audio transmission distance issue..while gaming..the sound coming late. Like 1 second late in all these ROM ..AptX enabled..still its haappeing...which Ruining the whole gaming experience

Please help me..whats the issue .and fix for it?

I m frustrated now after so many ROMs flashing..still problem exist
[Android Software/Hacking General [Developers Only]] c0l0:
I booted the modified Ubuntu 18.04.1 Live image on my actual machine, and took my three bluetooth devices for a spin. I made sure to capture btsnoop dumps and uploaded them through op's form on their website. Although I am somewhat confused by the output the analysis generated (pasted below; does this mean that the modified bluez stack actually used only 41 bits for communicating with my devices?), I hope to have supported your research into this interesting area :)

There were no audible problems with all three devices listed below.

Creative SoundBlaster JAM - Headset (FCC ID: IBAAVPGH0300)

Bluetooth A2DP Codec Dissection

Results:

Connection:
localhost () → 00:02:3c:03:9b:ee (Sound Blaster JAM)

Supported codecs:
Audio non-A2DP (FastStream - M:44100 M:48000 V:16000, Music, Voice)
Audio SBC (16000 32000 44100 48000 | Mono DualChannel Stereo JointStereo | block: 4 8 12 16 | subbands: 4 8 | allocation: SNR Loudness | bitpool: 2..53)

Used for audio:
Audio SBC (44100 | DualChannel | block: 16 | subbands: 8 | allocation: Loudness | bitpool: 2..41)

Latest SBC Bitpool value: 41

Anker SoundBuds Lite - Headset (FCC-ID: 2AB7K-A3271)

Bluetooth A2DP Codec Dissection

Results:

Connection:
localhost () → 00:23:02:31:8b:09 (SoundBuds Lite)

Supported codecs:
Audio SBC (16000 32000 44100 48000 | Mono DualChannel Stereo JointStereo | block: 4 8 12 16 | subbands: 4 8 | allocation: SNR Loudness | bitpool: 2..53)

Used for audio:
Audio SBC (44100 | DualChannel | block: 16 | subbands: 8 | allocation: Loudness | bitpool: 2..41)

Latest SBC Bitpool value: 41

Anker SoundCore 2 - Portable Speaker (FCC-ID: 2AB7K-A3106)

Bluetooth A2DP Codec Dissection

Results:

Connection:
localhost () → 08:eb:ed:b1:9f:12 (SoundCore 2)

Supported codecs:
Audio SBC (16000 32000 44100 48000 | Mono DualChannel Stereo JointStereo | block: 4 8 12 16 | subbands: 4 8 | allocation: SNR Loudness | bitpool: 2..53)

Used for audio:
Audio SBC (44100 | DualChannel | block: 16 | subbands: 8 | allocation: Loudness | bitpool: 2..41)

Latest SBC Bitpool value: 41
[Android Software/Hacking General [Developers Only]] Ferit Askerov:
It is off topic, but does someone know how can i reduce lag on my bt headphones while playing games? I have Pixel Buds and Pixel 2 XL. I tried different options from Developer Options but none of them reduce lag. Sometimes game opens with low quality one channel sound, sometimes opens good quality, stereo but laggy. Does anybody have any idea?
[Android Software/Hacking General [Developers Only]] Sukrut4778:
which one will work for Redmi 5
[Android Software/Hacking General [Developers Only]] grandgreed:
What version of android ?
[Android Software/Hacking General [Developers Only]] frcraig:
Sorry if my question is a bit off topic, but the folks in this forum understand the technology underlying my problem. I have a new Huawei Mate 20 x phone running Android 9.0 and a set of Jabra Elite Active 65t wireless earbuds (that worked flawlessly with my Android 8.0 phones). With the Mate 20 x they pair and connect easily. When I put them in my ears they say "connected" and if I look in Bluetooth settings on the phone they are connected for both calls and media audio. Calls come through the earbuds and I can interact with Google Assistant with them, but when I try to play music (either downloaded to my phone or via WiFi - like YouTube) I either hear a 'stuttering' noise or no sound at all. Now this is where the codec issue arises. To hear music I must go into the phone's Settings/Developer Options and change the default Bluetooth codec from AAC to SBC. I then immediately hear music. I can't save this setting, however, as each time I exist Developer Options it reverts to AAC. My earbuds work with both the SBC and AAC codecs, and if I get them to play music by switching the codec to SBC I can then change it to AAC and they continue to play music. They just won't connect with AAC set as default. Any advice on a fix or work around is very much appreciated.
[Android Software/Hacking General [Developers Only]] ValdikSS:
You should disable "HD Audio" tick in Bluetooth device options (not in developer options).
[Android Software/Hacking General [Developers Only]] frcraig:
Thank you for your response, but there are not "HD Audio" settings in Huawei's Android 9.0 Bluetooth device options. My devices (my VW car and my Jabra Elite Active 65t wireless earbuds) are listed in the Bluetooth device section but each has three options: "Call Audio", "Media Audio", and "Contact Sharing". I remember an HD Audio setting on a Xiaomi phone I had once, but that doesn't seem to be available on Huawei Android Pie.
[Android Software/Hacking General [Developers Only]] lorikeet:
Under developer options->bluetooth, try disabling the optional codecs and see whether it makes a difference.
[Android Software/Hacking General [Developers Only]] frcraig:
Thank you, but 'disable optional codecs' is greyed out. When I am connected to my earbuds I can only change SBC and AAC the other items are greyed out.
[Android Software/Hacking General [Developers Only]] santos evelyn:
great!! :D
[Android Software/Hacking General [Developers Only]] pr0kewl:
Nice, wonder if you could help

Sony Xperia XZ1 Compact

BOSE OE

https://drive.google.com/file/d/16k176NOoInYeF-T0m66jnJicfVIU574r/view?usp=drivesdk

Phh Treble 8.1 AOSP

Thanks
[Android Software/Hacking General [Developers Only]] xdasree:
can you please create a patch for Pioneer DAC, its running on 5.1.1 and I guess it is 32bit ( I don't have lib64 folder).

attached bluetooth.default.so file here.

pls be noted that, Bluetooth file location is /system/lib/hw/
[Android Software/Hacking General [Developers Only]] ValdikSS:
Why are you keeping upload the files?
[Android Software/Hacking General [Developers Only]] Henzoo07:
can you please at least give tutorial to apply patch set to lineage os ? i have a problem to find rom builder :crying:

or can u give patched redmi note 4x 9.6.3.0 ? on pda thread, link is dead
[Android Software/Hacking General [Developers Only]] grandgreed:
Take bro
[Android Software/Hacking General [Developers Only]] Henzoo07:
is that for miui 9.6.3.0 bro ? thanks btw :D

edit it works on MIUI Global 10.1.1.0 with Sansui i23 True Wireless

486, 576, 617 works, but all of that result a stuttering

is that because of im using miui 10 ? or my earphone problem ?

if that my earphone cant handle, how about not 486 maybe 350~400 ? is that affects?

thanks i want to patch by myself but i dont have IDA pro software :(

Really hope someone can make for 352bit limit patch
[Android Software/Hacking General [Developers Only]] Henzoo07:
like this.. someone can patch for me pleasee.. :)

i will PM my lib

EDIT

Finally i tried to edit lib file for Xiaomi Redmi Note 4, i just changed bitrate to 352 using tutorial on valdik pda thread.

it's works perfectly with no cracklings and noisy sound, yeahh...

my eq : Sansui i23 TWS Bluetooth v5.0 works at SBC 352

with Redmi Note 4x MIUI 10.1 GLOBAL STABLE, Android 7.0

my question is hex editor method works for android 8.0 ? [MENTION=1357654]valdik[/MENTION] coz u mention that method is for android 5-7
[Android Software/Hacking General [Developers Only]] Henzoo07:
hi bro, i want to know, i edited bitrate that file u provide with method from valdik to 352 and its works for me with no stuttering and no cracklings..

but if i edited with same method from my original lib got from my ROM, it won't works.. its keep crackling and i try to edited to 486 bitrate too, and keep crackling..

i want to know what are mod that applied to your provided lib ?
[Android Software/Hacking General [Developers Only]] funfly11:
Xiaomi Mi Max 2 / Lineage OS 15.1 Oreo 8.1

Hi,

i tried to contact the Lineage OS 15.1 (Oreo 8.1) oxygen authors to issue a patch in accordance with the great work of this threats author, but haven't gotten any response yet. As I am having severe issues with the bluetooth audio quality in a car install and removed the device for troubleshooting, which is why I am looking for a quick solution. Could anyone who has the means and knowledge provide me with the patched files for my rom or even a full patch for the system?

Somehow I can't add links or files, so please send me a personal message if you are able and willing to help.

Help would be greatly appreciated. Thank you in advance.
[Android Software/Hacking General [Developers Only]] grandgreed:
Your earphones works in DualChannel but it needs to some low bitpool.

That lib patched by VladikSS.

___

Try manual method (thanks gjf) from 4pda.

http://4pda.ru/forum/index.php?showtopic=914135&view=findpost&p=80262166
[Android Software/Hacking General [Developers Only]] Henzoo07:
hmm, maybe valdik patched the TST.W R0, # 4, and MOVS R0 too,

coz, i try to edit my original .lib(not your provided lib), i edit only bitrates value, using hex editor to 352bit, its not working,

when i edit .lib from you, its works..
[Android Software/Hacking General [Developers Only]] Tunmise:
Works great on my itel p51 , I follow the manual and the result was awesome, it works with my nia x3 headphone and sardine subwoofer speaker
[Android Software/Hacking General [Developers Only]] alexwhittemore:
I wonder if someone in this massive thread can help with my particular situation:

Tune2Air WMA1000 in the car. Only supports SBC. Used to have a Nexus 7 permanently installed in there, but it finally kicked the bucket. Always sounded great though.

Replaced the N7 with a Samsung Galaxy Tab A 10.5 (Verizon) (SM-T597v). All other things being (finally) equal, the audio quality simply ISN'T as good. Mostly, there are lots of compression artifacts in the highs, especially something synth-heavy like St. Lucia or RAC.

I noticed yesterday while playing around that the audio quality actually IMPROVES if I switch to mono in developer options (besides that, you know, mono). It's like devoting its available bandwidth to one channel improves things, suggesting a bandwidth constraint.

When I connect to the device with a macbook pro, I can see (in Bluetooth Explorer.app) that it uses a perfectly reasonable bitpool of 53, and sounds fine as long as I turn the volume down to avoid clipping.

I FINALLY got to the point of collecting a btsnoop_hci.log from the Samsung, opened that with Wireshark, and figured out what I was looking at. I've got a nice long capture of SBC packets that show something super odd:

Frame: 5/ 5
Sync Word: 0x9c
10.. .... = Sampling Frequency: 44.1 kHz (0x2)
..11 .... = Blocks: 16 (0x3)
.... 11.. = Channel Mode: Joint Stereo (0x3)
.... ..0. = Allocation Method: Loudness (0x0)
.... ...1 = Subbands: 8 (0x1)
Bitpool: 53
CRC Check: 0x7d
Frame Data
[Expected data speed: 38KiB/s]
[Frame Duration: 2.90250119885919ms]

If I'm reading that right, it means the tablet is ALSO using a bitpool of 53, which SHOULD sound fine. Except the expected data speed is 1/10 or so of what I was expecting? Does anyone know what's going on here, or how I can rectify the situation with bad compression artifacts? EDIT: I suppose I should clarify, I did look at other packets throughout the session to verify that the bitpool stayed at 53, which was the case. No throttling back after the initial connection or some such.
[Android Software/Hacking General [Developers Only]] Tunmise:
You have to have your phone rooted to begin with, then go to page 8, manual guide link is available there, follow it properly and you will be amazed with the result[COLOR="Silver"
[Android Software/Hacking General [Developers Only]] alexwhittemore:
Ahh so you ARE talking about following the Russian language guide to do a direct binary modification? Is it particularly relevant that the guide's for Android 5-7 vs 8? If I can ever root this one, I may well take you up on the offer. Chimera Tool is the only project advertising support for rooting the SM-T597V, so I'm a little suspicious. Probably worth the few bucks if it DOES work, but I haven't been able to confirm it will. EDIT: But anyway, even if I can root it: what's the reason to believe that modifying the BT stack would accomplish anything, if it's already using bitpool=53 anyway?
[Android Software/Hacking General [Developers Only]] Tunmise:
Because it enable your devices to take the advantage of using dual audio channel, which increases the bitrate, and also it won't hurt your devices if you try it out, you will just backup the original lib file so that you can restore later if you are not satisfied with the result, firstly i don't know much about bt codecs, i stumbled here looking for other thing else, i decided to follow the guide and it works, when i loaded it on my phone and i connected my nia x3 headset using the unrestricted version the sound was cracking i have to lower the bitrate to achieve more stable result, but on my sardine subwoofer speaker with bt version 2.1edr it works perfectly well, it delivers quality treble sound and punchy bass, overall its more louder,

If your Bluetooth device is old i will advice not to invest your time on it

---------- Post added at 12:53 AM ---------- Previous post was at 12:49 AM ----------

Yes i am,

I don't really know because i have only done it to my itel p51 with android 7
[Android Software/Hacking General [Developers Only]] marvelart:
Thanks for sharing such a piece of great information with us it really gonna help lots of people.
[Android Software/Hacking General [Developers Only]] Meowdib:
Someone made a magisk module that I tested, works on Pixel 2. It's in the Magisk app, under downloads. It's called Bluetooth stack audio bitrate changer for SBC + aptX & aptX-HD enable :D. I didn't see any xda thread for it at the magisk area though.
[Android Software/Hacking General [Developers Only]] OPOt585:
It's not compatible with lineageos
[Android Software/Hacking General [Developers Only]] joedajoester:
I'm on a p2 xl and I tried the same module but I don't think it works. In the developer options I don't have the option for dual channel, only mono and stereo. When you installed, what did you select for the quality? I choose the lower quality one since it was the most compatible it said
[Android Software/Hacking General [Developers Only]] markiemarc2:
Hi [MENTION=685332]ValdikSS[/MENTION] I have a question... Do you have to have to set (add) both in the property directory or only the 'hd_higher' one?

$ setprop persist.bt.sbc_hd_enabled 1

Bitrate could be increased further with $ setprop persist.bt.sbc_hd_higher_kbps 1

Greetings, Marc
[Android Software/Hacking General [Developers Only]] ValdikSS:
Only persist.bt.sbc_hd_enabled.

persist.bt.sbc_hd_higher_kbps increases SBC HD bitrate further. It works only if SBC HD is already enabled.
[Android Software/Hacking General [Developers Only]] side:
[MENTION=685332]ValdikSS[/MENTION] Nice work done here... i really appreciate the way you handle it! perfect

although,i am too disappointed that i cant have the dual channel performance on legacy device ( samsung s4 9505 jfltexx ) since the BT calls/ BT speaker stream is kinda dead on pie (and almost every < snap800 soc has got the same bug)
[Android Software/Hacking General [Developers Only]] ValdikSS:
There are also patches for Nougat and Oreo.
[Android Software/Hacking General [Developers Only]] lscambo13:
Thank you for your amazing work. I need to clear some doubts.

Does your patch work on Lineage OS out-of-the-box? Or do I need to patch manually.

Also is binary method available for Android 8-9?
[Android Software/Hacking General [Developers Only]] ValdikSS:
SBC HD patchset has been merged into LineageOS 15.1!
[Android Software/Hacking General [Developers Only]] akkeo:
I have redmi note 4X pie. Can I use this or the OP one? I have 0.5 second delay in my Bluetooth device.
[Android Software/Hacking General [Developers Only]] cacio_confusa:
Is it possible to set AAC codec bitrate higher ?

Edit:

I looked it up. AAC LC (low complexity) is max 256kbit
[Android Software/Hacking General [Developers Only]] grandgreed:
Check your android version first. Delay will be always present due the bluetooth specs.
[Android Software/Hacking General [Developers Only]] lscambo13:
Awesome! Now LOS 16 left. Hopefully, it'll be accepted into AOSP master branch as well.
[Android Software/Hacking General [Developers Only]] Mike9797:
Pocophone F1

Hi,

I would like to know that it is working on Pocophone as well? In Miui 10.3 stable rom. I am not a developer or anything, could you explain me how to do that my SBC sounds better?

Thanks!
[Android Software/Hacking General [Developers Only]] Mike9797:
Hi, could you make a flashabble one for the Pocophone F1? Andoid 9.0 PIE+miui 10.3.4.

Thanks
[Android Software/Hacking General [Developers Only]] Mike9797:
anyone did test on Bose QC 35 II ?
[Android Software/Hacking General [Developers Only]] ValdikSS:
No, new requests are not accepted.
[Android Software/Hacking General [Developers Only]] Mike9797:
That is alright.

I flashed the Lineage os 16.0 . I saw that with my headphone is playing HD audio:AAC , this is better then regular aac? I meen is higher then 250kbps ? And If I could somehow do the HD sbc, what is have more kbps, would it sound better on my Bose QC 35 II ?

Thanks for the advice!
[Android Software/Hacking General [Developers Only]] ValdikSS:
That's a regular AAC, 320 kbps or 256 kbps. Android uses "HD Audio" phrase for all optional Bluetooth codecs (aptX, AAC, LDAC).
[Android Software/Hacking General [Developers Only]] Mike9797:
Oh, I see. But If I could do the 500+ kbps SBC it would sounf much better?

And how would I do that? If I click on the link in the 14-15. page of the comments, on the lineage os 16.0 patch, I cant understand what is that writing. There is an easy way to upgrade my SBC?
[Android Software/Hacking General [Developers Only]] ValdikSS:
AAC 320 kbps sounds transparent (the difference from original is inaudible).

The patch is for source code, for developers. You can apply this patch to LineageOS 16.0 source code, compile your own firmware and you'll have it with SBC HD option.
[Android Software/Hacking General [Developers Only]] ValdikSS:
SBC HD patchset has been merged into LineageOS 16.0 today!

Except for one patch with alternative bitrates set via setprop, it has problems and is not merged yet.
[Android Software/Hacking General [Developers Only]] takerna:
And what about modifying Linux (BlueZ) stack to get higher bitrates on SBC? Any tips in this direction? Thanks in advance.
[Android Software/Hacking General [Developers Only]] ValdikSS:
Note: Android 9+ supports audio/video sync (AVDTP 1.3 Delay Reporting). This function allows to automatically adjust audio/video sync while watching videos: in case of radio congestion, audio won't be getting delayed and go off-sync with video. Instead, the video will be temporary paused to get in sync with delayed audio, eliminating lip-offsync.
[Android Software/Hacking General [Developers Only]] ValdikSS:
https://lists.freedesktop.org/archives/pulseaudio-discuss/2019-June/031168.html

https://lists.freedesktop.org/archives/pulseaudio-discuss/2019-June/031176.html