yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 & 3T Cross Device Development] shadeau:
Troubleshooting

The flashable zip basically does three things:

1) mounts system partition

2) copies modified bluetooth file to system partition

3) unmounts system partition

4) performs update script like all zips

The zip assumes that your system partition is in the normal location (for a 3T) and formatted in ext4 for my script to work. If you have issues then try manually mounting the system partition with TWRP before flashing the zip.
[OnePlus 3 & 3T Cross Device Development] shadeau:
Reserved2
[OnePlus 3 & 3T Cross Device Development] jbw716:
Thank you!!! I can't wait to try this! I've had this exact issue! Should the Validus version work with all CAF based ROMs?

Edit: Nevermind. I misunderstood what this was. Still, thank you very much! I cannot wait to try it still!
[OnePlus 3 & 3T Cross Device Development] shadeau:
I've built full ROM zips, so you'll need to do a clean install of the ROM that you prefer and you should be good to go. Hope that helps.
[OnePlus 3 & 3T Cross Device Development] benzaldo:
Superbbbbbb Thanks, waiting for this fixing for a long time. BT with gear s.3 WORK. Please be keep update.

BTW RR Roms from your file why option in notification slider in additional buttons are difference from the link thread
[OnePlus 3 & 3T Cross Device Development] plepew:
Hey this sounds pretty interesting. Bluetooth with my car has been hit or miss since and throughout Android 5, 6 and 7!! They fix, they break, they fix and break it again. I have an OP3.

Understanding that it different in everyone's case on device, car and OS's, but this Bluetooth issue seems to be a pain in *** fors some and that includes me.

So I'm now on OOS 4.0.3, Android 7.0.0 and it works, partially. I can't update to any OOS as I lose metadata, AVRCP and additional BT features connections with my vehicle (Lexus IS 250 F Sport 2015).

I had BJRR, Android 6 on my device and it was all working with no issue. If I was on Stock OS, it connect and plays the sound, but no meta or AVRCP no matter what I tried.

I'm rooted, running TWRP and wondering how this will work out. Sounds very promising and looking forward to hearing some feedback from others it is works.

I am wondering if this will work with GZR's Tesla as well.

Cheers!
[OnePlus 3 & 3T Cross Device Development] shadeau:
I wish you luck in testing it on your car, and as far as GZR's Tesla is concerned: I'd have to build the whole ROM with the BT fix as a separate ROM (these are all full ROM zips) and I probably won't get around to that for a while. I'm sure the fix will work though. I just need to figure out if this is something that can be converted to a flashable zip instead of needing to build the ROM.
[OnePlus 3 & 3T Cross Device Development] plepew:
Yes, a flashable zip would be the way to go if possible.

I will try Validus on the weekend and report back if I have success... I've installed in in the past and it's nice. But prefer Tesla due to some features.

Thanks for the quick response!

Cheers!!
[OnePlus 3 & 3T Cross Device Development] silentvisitor:
Should be doable unless framework is involved.
[OnePlus 3 & 3T Cross Device Development] shadeau:
I need to change out files in the system/bt folder and the vendor/qcom/bluetooth folder (edit: both of these are in the working directory before building in case that wasn't clear). Are those framework files? I'm kind of new at this and would appreciate help learning how to create a flashable zip if you have some article/forums I can read. Thanks!
[OnePlus 3 & 3T Cross Device Development] jbw716:
Would you be open to posting your sources for these builds? :)
[OnePlus 3 & 3T Cross Device Development] jbw716:
Strange. It seems that with your version of LOS, the bug is now reversed for me. I get Phone audio through my car now, but not media audio. The radio acts as though it is getting sound, showing the playback time and track name, but the audio comes out of the phone speaker. I'm not sure if a log would help with this sort of thing, but I can try to get one later if it would be helpful.
[OnePlus 3 & 3T Cross Device Development] The_Fry_Guy:
Excellent job brother! I too have the same issue with my 2015 Nissan Altima. I honestly have no idea why the makers of these roms don't just use this BT stack...... OOS has no issues with my car, so why don't they all use OOS BT? Just makes no sense to me lol
[OnePlus 3 & 3T Cross Device Development] shadeau:
I'm totally open to that. But I need to figure it how to post to git first ;).

It might be helpful so post it here and I can look at it. I'll see if I have the same issues in my car and report back.
[OnePlus 3 & 3T Cross Device Development] silentvisitor:
No framework seemingly.

Which files you're changing (names)?

In most probabilities they're residing in /system/lib and/or /system/bin folder. If so, than you could just make a simple flashable zip or a Magisk module (that'll be a better learning experience).
[OnePlus 3 & 3T Cross Device Development] jbw716:
Here you go. I hope it helps! :)

https://drive.google.com/file/d/0B22KzlQ3gJRaMHhNbGVDd29JMXM/view?usp=drivesdk
[OnePlus 3 & 3T Cross Device Development] shadeau:
Honestly, I swapped the entire folder for each of the two I mentioned. I wanted to get something that worked first and then figure I could sort out the exact file to blame later. I also need to look into the media audio problem since I have the same issue. Thanks for the suggestion, I'll look into building a module for the required files. That should be less time between iterations as well.
[OnePlus 3 & 3T Cross Device Development] silentvisitor:
Search for "bt" and "bluetooth" in both folders and you'll get list of files. Now extract those files, make a flashable zip and test with some other ROM :)
[OnePlus 3 & 3T Cross Device Development] shadeau:
Just did the search and found them. I'll work on making a zip in the next couple of days.

My guess is those files will still include the bad media protocol (a2dp right?) so I might have to fix that as an additional step. I'll post all zips and files here for testing.

Thanks again for the help!
[OnePlus 3 & 3T Cross Device Development] nicesoni_ash:
This information should be in the OP too as what works and what doesn't after using different bt stack.
[OnePlus 3 & 3T Cross Device Development] silentvisitor:
Zip can be made in less than 10 minutes btw ;). Not very difficult I mean.

You're always welcome :good: ;)
[OnePlus 3 & 3T Cross Device Development] shadeau:
done :good:
[OnePlus 3 & 3T Cross Device Development] buski:
this thread is missleading i just waisted my precious time installing ressurection remix from this thread to go in my car and see that bluetooth says no phone just like all los roms....
[OnePlus 3 & 3T Cross Device Development] shadeau:
I am sorry that this fix doesn't work for you, but it does work for quite a few others, me included. I'm looking into a different fix that will hopefully fix the media audio issues as well and maybe that will fix your problem. What car do you have/ does OOS bluetooth work with your car?
[OnePlus 3 & 3T Cross Device Development] shadeau:
I gave a link to the official RR thread because I assumed that it was based off of stock RR code since the author is one of the RR maintainers. I'll have to figure out what repo he's using to fix it, but I'd rather get this into a flashable zip to make it easier on everyone.
[OnePlus 3 & 3T Cross Device Development] buski:
Yes it works with oos and aosp based roms.

Lineage based roms i get no phone when its connected.

I have vw jetta with a kenwood sound system.
[OnePlus 3 & 3T Cross Device Development] shadeau:
Flashable Zip posted!

edit: Updated fix below
[OnePlus 3 & 3T Cross Device Development] shadeau:
Media Audio Issues Resolved!

Hey everyone,

I've narrowed down the BT issue to one file (to think that was all we needed this whole time :p). Anyway, I've removed the old zip and posted a new one that fixes the media audio issues and that I've tested with RR. If you've already got a ROM loaded try dirty flashing it and then following steps 2-7. If it doesn't work then try a clean flash. I'll report here my results of a dirty flash tomorrow if I can.

Flashable Zip fix for other ROMs: AFH.

Instructions:

1) Flash ROM in TWRP

2) Flash BT_Fix_v1.1.zip

3) Boot ROM

4) Connect to car/device

5) Grant MAP rights

6) Enjoy!

If anyone is curious the file I'm using is /system/lib/hw/bluetooth.default.so
[OnePlus 3 & 3T Cross Device Development] nicesoni_ash:
This fixes the media audio stream too?

Edit:

Op states flashable zip files so that's good. [emoji106]

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[OnePlus 3 & 3T Cross Device Development] elikplim442:
Working here in [MENTION=4608158]ZeNiXxX[/MENTION] Resurrection Remix ???
[OnePlus 3 & 3T Cross Device Development] shadeau:
yes, it fixes the media audio issue

Max phone volume? Is this with your car or headphones? Does the issue persist if you turn down volume on your phone and then turn up volume on your car?

Edit: tested this in my car and I don't have this issue (Max phone volume).
[OnePlus 3 & 3T Cross Device Development] elikplim442:
Sorry, it's working fine now. Using xioami bluetooth speaker apparently it was because of low battery on the speaker.
[OnePlus 3 & 3T Cross Device Development] Philb90:
Does it work with oos?
[OnePlus 3 & 3T Cross Device Development] buski:
Doesnt work for me with the fix.epic fail
[OnePlus 3 & 3T Cross Device Development] shadeau:
This BT fix uses the BT stack from OOS so you really wouldn't accomplish anything by flashing this. This fix is designed to fix issues that some of us are having with connecting our device to our vehicles for hands-free phone usage with LOS-based ROMs.

Not to be rude, but I have spent quite a few hours getting this fix working for me, and it works as expected in my car as well as with others. I even addressed the BT media audio issue. I'm posting this to help others that have a similar issue. If you could be a little more specific than "Doesn't work for me" I might be able to help, but telling me my project is an "epic fail" isn't true and doesn't help anyone.

Here are some questions that can help me with your issues:

1) What ROM are you using?

2) You're using a OnePlus 3T 128gb version, correct?

3) How are your partitions formatted?

4) Does the bluetooth ask for MAP permissions?

5) When you flash the zip does it say "result: [/system]", "result: []", or something else?
[OnePlus 3 & 3T Cross Device Development] daltendo:
Okay, so this is the only thread I could find that actually addresses this specific Bluetooth issue. I'm however using a Samsung galaxy s5 with the latest resurrection remix, and desperately want this fix (but it doesn't seem to be mentioned anywhere). Is it worth a try to attempt to flash this zip anyways? Anything else I could try if not? Thanks and sorry for posting in the wrong forum
[OnePlus 3 & 3T Cross Device Development] shadeau:
The flashable zip has a script that will only work for the Oneplus 3/3T and the file itself comes from our stock ROM. The zip doesn't check which device it's flashing to so you won't get an error, but it might break your bluetooth. Here's what I would suggest if you want to try this:

1) make a complete backup

2) mount the system partition manually in TWRP

3) flash my zip

4) boot up and check if it's working

If that doesn't work I can make a zip for you based on your device and I'll post it in the S5 section if it works. Let me know if it's working on your S5 and I can add it to the supported devices list.
[OnePlus 3 & 3T Cross Device Development] shadeau:
Did you try this zip and get it to work on a OnePlus 2?
[OnePlus 3 & 3T Cross Device Development] daltendo:
So I tried what you said and I got the error "the updater process ended with error:255" in TWRP. No changes were made to my Bluetooth, it still says connected (no phone audio), works for a half second saying it's connected, and going back to no phone audio. If you tried a fix for the s5 that would be awesome, I would link you in the ROM thread cause I'm not the first one complaining. Thanks for getting back.
[OnePlus 3 & 3T Cross Device Development] shadeau:
K, I'll need a couple of things from you to get this to work:

1) flash the stock TW ROM and find /system/lib/hw/bluetooth.default.so and copy it to your storage (I'll need that)

2) link me to the room that you're using

3) run this on your computer with adb:

adb shell "mount > /sdcard/PHONENAME_mountinfo.txt"

Replace PHONENAME with whatever your device is named (usually a code name used by LOS for building, klte, kltevzw, etc).

This creates a file on your internal storage that I'll need.

4) send me a link for those two files
[OnePlus 3 & 3T Cross Device Development] nicesoni_ash:
I am using the same lib from the zip on my phone but so far I didn't make any test.

Sent from my "1+2" powered by Unofficial RR 7.x.x

Compiled by myself
[OnePlus 3 & 3T Cross Device Development] vrda08:
Thx man!!! Now my Gear s3 phone calling works on Aosp roms like on oos!!!

Respect for this!!! Greetings from Croatia!
[OnePlus 3 & 3T Cross Device Development] daltendo:
Okay. So I'm kind of a noob, no dev skills, just know how to flash and whatnot. So bear with me.

1) Can I not download TW ROM and just find that file by browsing the files on my computer?

2) Here is the link https://xdaforums.com/galaxy-s5/unified-development/rom-resurrection-remix-n-klte-t3510376

3) I'll figure out how to use adb on my windows PC once I do the first step. Always have used a terminal on my phone for everything.
[OnePlus 3 & 3T Cross Device Development] shadeau:
Don't worry, I'll walk you through it:

1) Unfortunately no, the zip of the ROM is compressed and typically all of the system files are contained in huge chunks of data instead of the final file structure. Here's what you can do:

1a) Make a TWRP backup

1b) Perform "factory reset" in TWRP

1c) Flash TW ROM

1d) Mount system in TWRP (tap mount on main page and make sure that "system" has a checkbox filled)

1e) From the main TWRP screen tap "Advanced", then "File Manager", then navigate to /system/lib/hw and tap on "bluetooth.default.so", then tap "copy file", then tap "sdcard", then tap the folder with a check mark in the lower right and swipe to copy the file

1f) Perform "factory reset" in TWRP

1g) Restore backup

2) Thanks

3) Don't worry about adb if you haven't used it before. You can do the same thing straight from the terminal (in adb using the "shell" command is the same as typing what follows into a terminal emulator). Type the below code into your terminal emulator:

mount > /sdcard/PHONENAME_mountinfo.txt

You need to replace PHONENAME with your device name, ie for me it's oneplus3, for you it will be klte with additional letters at the end for different brand versions (AU edition kltekdi, China: kltechn, Sprint: kltespr, etc). Use this link and scroll down the left side until you see the S5 section and find your phone's codename then use it in the command like this:

mount > /sdcard/klte_mountinfo.txt

These steps will place both files on the main internal storage where you can easily copy them off and post them here. Let me know if you need additional help. :)
[OnePlus 3 & 3T Cross Device Development] marriedman:
I don't post much on xda, but I had to say thanks for this fix. The only reason I bought my OnePlus3 (OP3) was because my OnePlus2 (OP2) was crap with certain bluetooth devices. My truck receiver (Kenwood DDX393) being the big culprit. I had a little success existing .prop files, but not enough to be happy. I cannot tell you how many ROM's I tried. So I figured I would buy the OP3 and see if that worked. Imagine my dismay that it was exactly the same.

I still have the OP2, so I may try to apply this fix to it and keep it as a spare. Seriously, thank you for this fix!
[OnePlus 3 & 3T Cross Device Development] shadeau:
You're welcome :good:. Thanks for listing your stereo so I know what this works with:)
[OnePlus 3 & 3T Cross Device Development] zickler_malta:
I don't know if this fix was meant to tackle the network drops some people get when using bluetooth in their car. this problem has been present in LOS (and LOS based roms) and previously CM for a very long time (at least on OnePlus2). Basically what happens is when the car is syncing contacts with the phone and you make or receive a call, there are several network drops, one after the other. full, nothing, full, nothing etc. network is then regained after approx 3 minutes. I'm sure not everyone faces this problem but I have seen and heard of many others apart from myself.
[OnePlus 3 & 3T Cross Device Development] plepew:
previous response:

Hey this sounds pretty interesting. Bluetooth with my car has been hit or miss since and throughout Android 5, 6 and 7!! They fix, they break, they fix and break it again. I have an OP3.

Understanding that it different in everyone's case on device, car and OS's, but this Bluetooth issue seems to be a pain in *** fors some and that includes me.

So I'm now on OOS 4.0.3, Android 7.0.0 and it works, partially. I can't update to any OOS as I lose metadata, AVRCP and additional BT features connections with my vehicle (Lexus IS 250 F Sport 2015).

I had BJRR, Android 6 on my device and it was all working with no issue. If I was on Stock OS, it connect and plays the sound, but no meta or AVRCP no matter what I tried.

I'm rooted, running TWRP and wondering how this will work out. Sounds very promising and looking forward to hearing some feedback from others it is works.

I am wondering if this will work with GZR's Tesla as well.

Cheers!

Ok, so the testing was done finally today..

Here is what I used and flashed in sequence:

1 - OnePlus3_4.1.6-FIRMWARE+MODEM-flashable

2- Validus-oneplus3-7.1.2.RC.14.7-Official-20170707-0828

3- open_gapps-arm64-7.1-pico-20170707

Rebooted the device and made sure all was running...connect the device to my vehicle and confirmed that the metadata was not showing...confirmed

4- Went back to TWRP and flashed: BT_Fix_v1.1

rebooted and removed the pairing from the device and the vehicle and redid the pairing...

NO LOVE!!

the metadata is still not showing up. this has been broken since 7.0 (4.0.3)...so I seem to be stuck there.

7.1.1 release, still broken again..

7.1.2 release still broken...

I'm at a complete loss...

seems like OP & Google have no clue what they are doing and frankly don't care...

I have other devices that work flawlessly (Apple 6 & 7, Sammy Note 4, 5 , Blackberries BB10, etc...)...none of the Android N device work or they due for a limited time as they update and break it again...
[OnePlus 3 & 3T Cross Device Development] shadeau:
In short: No, this fix was not meant to address that issue. This fix was designed to address the problem of not having phone functionality in vehicles because of a Bluetooth stack problem in LOS. Because it uses the default Bluetooth stack of OOS it might address the issue you're having, but you'd just need to test it and let me know since I don't have this issue.

There is still hope ;)

First: When you flash my zip can you make sure that you see "return [/system]" or something similar? If it doesn't, or if you want to troubleshoot, try mounting the system partition in TWRP before flashing and test again.

Second: From your OOS 4.0.3 ROM (the one with working BT) do the following:

1) Mount system in TWRP (tap mount on main page and make sure that "system" has a checkbox filled)

2) From the main TWRP screen tap "Advanced", then "File Manager", then navigate to /system/lib/hw and tap on "bluetooth.default.so", then tap "copy file", then tap "sdcard", then tap the folder with a check mark in the lower right and swipe to copy the file

3) Attach that file in your reply post

This will allow me to create a zip for you to test with the working BT stack from your phone. You can then flash that on one of the newer ROMs and see if it works.
[OnePlus 3 & 3T Cross Device Development] plepew:
Ok, just got your reply. To be honest, I'm not quite sure I understand the first part of your reply, but will try it again and see what happens.

But before I flash a new rom and and the fix as you point out, I will send you the the file you are asking asap.

Thanks for responding and assisting me on this. :)
[OnePlus 3 & 3T Cross Device Development] shadeau:
The zip file contains a script to mount the /system partition in TWRP for a OnePlus 3T. I haven't tested it on a 3 because I don't have one. While flashing the text in TWRP will say "return [/system]" if it mounted properly or "return []" if it didn't.

Just try mounting the system partition in TWRP before flashing and see if it fixes the issue.
[OnePlus 3 & 3T Cross Device Development] plepew:
Ok, I will try out these instructions on the Validus rom tomorrow as I have already restored my Nandroid for my OOS 4.0.3.

In the meantime, I followed your instruction to retrieve the Bluetooth hw file from my current rom 4.0.3 , which was pretty easy, even though it was my first time doing that in TWRP.

Here is the file which I had to zip as it wouldn't let me upload it as is.

Thanks for your continued help in trying to sort this out!!

Cheers!
[OnePlus 3 & 3T Cross Device Development] shadeau:
I've attached a zip to this post for you to try. If it doesn't work the first time then mount the system partition in TWRP manually and try it again. Let me know if it works.
[OnePlus 3 & 3T Cross Device Development] plepew:
Hey, so I was stunned when I decided to try Validus again this afternoon without any tinkering ....its working!!! Wow! I was freaking out!!

Then for good measure, I tried OB19 full rom...and to my amazement, it works too!!

I'm stumped and at a loss of words my friend. Accept my deepest gratitude for your help and the work you put in!!!

Thank you!!!
[OnePlus 3 & 3T Cross Device Development] emuandco:
DId not fix my Oneplus forgetting my Smartwatch more than once a day, but... audio stuttering became better in my car. THis one is from OB20 and I use it on LOS 14.1.

NO GUARANTEE FOR NOTHING!
[OnePlus 3 & 3T Cross Device Development] cdorrell12000:
This helped fixed my issue of answering calls over BT when using other ROM's other than stock or PureNexus.
[OnePlus 3 & 3T Cross Device Development] ilyan77:
Tesla 7.1.2 getting Error 255, cant test

Hi,

I have a Note 3 N9005.

Tesla-hlte-7.1.2.STABLE.v4.4-UNOFFICIAL-20170825-2302.zip

And Bluetooth phone audio does not work.

When I try to install with TWRP it stops with Error 255. Is there something I can do to overcome this?
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
This is a oneplus3(t) thread, I don't think it's going to work on different hardware (different phone model)...
[OnePlus 3 & 3T Cross Device Development] hasan4791:
Hey op... Alien here from Redmi note 3 thread... Even we face same issue in all LOS/CM based roms... Could there be any fix from your side, if we assist u in giving necessary files? Or else if it needs compiling whole rom, it would be great to open a guide thread also.
[OnePlus 3 & 3T Cross Device Development] llmiller:
This does sound interesting hope someone can help.

I'm using RR 712 on my Samsung S7 and the issue is I get know phone audio when using my Bluetooth powerbeats 3 .For some reason the audio gets routed back to the phone when I try to make a call. I tried another Bluetooth headphone and it worked fine . Also the powerbeats work fine with TW ROMs and other media work fine as well RR and TW. I also looked into Bluetooth settings but no luck.

Any assistance would be great.