yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Note 9 Themes, Apps, and Mods] TenzoSRx:
I've noticed on occasion where my phone will randomly reboot everytime I go on the home screen, I have to turn the Bluetooth off before I come off the lockscreeen for the phone to not soft reboot. Can you look into this when you have the chance...I'll try to roll back to an earlier version so see if this ails my issue down some
[Samsung Galaxy Note 9 Themes, Apps, and Mods] jsjs123456:
[Installation is successful, but pairing is lost after reboot.]

Hi, I've got a s9+ running TGY G9650ZHU7ETJ5 (Android 10, One UI 2.1), installed magisk 22.0 and rooted.

I installed the module from magisk; from the log messages, everything is OK. This a take a screenshot in the attachment as BluetoothLibraryPatcher-installation-20210303103702.jpg.

Just that after reboot, bluetooth pairing info is still lost. Actually I believe I've installed it twice and for the second time it still reports successful installation instead of something like "your system is already patched". So there may be something wrong down there.

Tried BluetoothLibraryPatcher_magisk_beta2.zip and the same.

I've collected all files in the phone I know that may be relevant; see the attachment s9+-TGY-G9650ZHU7ETJ5.zip.

Thanks for your work and patience.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Hi,

I have a problem with the Galaxy Fit 2 which disconnects after entering airplane mode, turning off bluetooth or rebooting the device. I've flashed the .zip file from the recovery successfully, and even runned the terminal command with success, but the problem is still here. It's a pain because everytime it disconnects I have to reset the Galaxy Fit 2 in order to connect it again to the phone.

It's strange as my phone doesn't lose the connection to my Galaxy Buds or my Bose Soundlink III, but only with my Galaxy Fit 2.

My current setup is an S10+ (G975F) on Android 11 (OneUi 3.1) latest version available (FUBD).

The Galaxy Wereable app is updated to the latest version, and also the Galaxy Fit 2 is updated. I used the official latest version of the .zip twrp flashable file.

I hope there could be an easy fix in the near future.

Thanks for you work and the effort you put in this thing

Cheers,

DJLeleX
[Samsung Galaxy Note 9 Themes, Apps, and Mods] hippy dave:
Just saying thanks, the last module I was using stopped working with the Android 11 upgrade, but it linked me to this one, which is working great!
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Woo sure it happen only with the module? Did you try to disable it, reboot, and check if it still happen?

Humm oops your subBuffer.log clearly shows the patch didn't worked correctly..

Can you upload here /system/lib64/libbluetooth.so?

What returns this command from a terminal app?

su -c grep -r 'wsm' /vendor/etc/vintf

You should also try the multidisabler thanks to @ianmacd
[Samsung Galaxy Note 9 Themes, Apps, and Mods] TenzoSRx:
I resorted to using 1.8 so far no issues
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
I've already flashes the multidisabler by ianmacd, but not with the _btfix in the name, as in his guide it says it's deprecated (at least that's what I understood reading his information) and we should use your libbluetooth patcher.

The command has no output in the terminal app (I use termux):

Thanks for your fast answer and for your time.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Humm..

No need for _btfix, his disabler delete some unused security services for a rooted device. One of them, wsm, is known to break gear watch pairing. But if you already do it.. And no output from the command shows you already stopped this service.

Sorry to tell this but I think you should try a fresh clean install (factory reset), as other people with same device have managed to get it working.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
I've already clean flashed the rom, the fact is that I can do the first pairing with the Galaxy Fit 2, but when I turn on airplane mode, reboot my device or turn off bluetooth, it disappear from my device in the Galaxy Wereable app, so I have to pair it again. And to pair again the Galaxy Fit I need to reset it, doing so I lose the tracking data of the watch (steps, hours slept, heart rate, etc) if not previously synced with s health. Yeah, I can sync before reboot so I don't lose anything, but what if my phone reboot overnight, like yesterday, I can't sync the hours slept and the heart rate and stuff, because the Galaxy Fit 2 is unpaired since the reboot, so I lose that data. And obvliusly it's a bit annoying having to pair the watch again every time I turn airplane mode on, or reboot the device.

Maybe the problem is in the Galaxy Wereable app, which can't keep the pairing across reboot and airplane mode.

I can send you my system files, if you tell me which one do you need to look into.

Anyway, I really appreciate your work,

Best regards,

DJLeleX
[Samsung Galaxy Note 9 Themes, Apps, and Mods] Vuska:
I also really dont understand...😔

already flashed bluetoothlibpatcher v2.2.3 from magisk...

also do terminal command from page #1.

my rom also patch with MultiDisabler 3.1 for sir Ian.

but if i reboot my phone or activating flight mode.... still need to repairing my bluetooth earphone or my Huawei watch gt2.

tomorrow i my Samsung Watch active 2 coming.... and i see friend here also has same problem and his samsung watch need to reset 😱

im using Android 10 Samsung G9750 (snapdragon).

What next i could check sir ?

please help...

Magisk module only showing that....

and i cant find the log file in internal storage..
[Samsung Galaxy Note 9 Themes, Apps, and Mods] jsjs123456:
@3arthur6 Hi, here is my libbluetooth.so. Thanks for your time.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Ok. At this point I'm not sure what can be done.. Isn't there some threads on xda about that? I will make more searches..

Whoops it seems there is an issue during installation..

Could you install again the module, when backup the magisk log (by clicking the floppy disk like in your screenshot) and upload it here?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] Vuska:
Thank you, sir... finally after your guide to click that floppy disk like icon, i read the log and found that module script cannot create folder because there is a file with filename exactly same with folder that want to create.

So i rename that file, and re flash the module...

Voila... it success and try it with connect my earphone.... flight mode... connect again without repairing... same if i reboot my device, my bluetooth pairing not lost anymore.

Thank you..
[Samsung Galaxy Note 9 Themes, Apps, and Mods] jsjs123456:
I examined this libbluetooth.so with methods suggested in hexpatch.sh, discovered that I already have the patch s/88000054691180522925c81a69000037e0030032/04000014691180522925c81a69000037e0031f2a/ . Then I compared the dump with the original file from ROM and confirmed that this is exactly the one-and-only change.

I got this via multidisabler when I rooted the device in the first place, as I can remember.

Now the problem is instead how I still got the loss-of-pairing problem after the patch. :D

Probably my ROM version is too "recent" and got new "features"?

Device is S9+ with Android 10 and ROM TGY-G9650ZHU7ETJ5_ALL.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] bigpotato107:
I need this fix for rooted S21 as my buds pair flawlessly but my gear s2 will not. I USED THIS ON MY S20 worked like a charm

su

mount -o remount,rw /vendor

cp --preserve=all /vendor/etc/vintf/manifest.xml /vendor/etc/vintf/manifest.xml.bak

sed -i '/<.*security.wsm.*/,/<hal format="hidl">/d' /vendor/etc/vintf/manifest.xml

mount -o remount,ro /vendor

but on S21 it crashes my phone and have to factory reset have not tried this yet

su

mount -o remount,rw /vendor

i=`grep -lr 'security.wsm' /vendor/etc/vintf` && [ ! -z $i ] && [ $i != *.bak ] && cp --preserve=all $i $i.bak && sed -i '/<.*security.wsm.*/,/<hal format="hidl">/d' $i

mount -o remount,ro /vendor

would this work on the S21??
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
You can't pair at all? Or you can pair, and it loses the connection when rebooting/airplane mode/turning off bluetooth?

If it is the second, I guess we need to wait for @3arthur6 to find a fix for the smartwatches (samsung ones at least)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Does your galaxy watch pair also after reboot/airplane mode/turning off and on bluetooth? or you have to reset it every time?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] bigpotato107:
I have not run the script in terminal yet but the one i did use crashes my phone maybe i will try this script and see what happens. On my S20 it worked perfectly with turning of bt and airplane mode. I never used multipatcher on my S20 just bluetoothlibpatcher v2.2.3 from magisk and terminal script. S21 is just rooted with magisk no twrp so never installed the vbmeta_disabled.tar not sure if i was supposed to lol but all ok apart from watch pairing. As vbmeta_disabled.tar is if you use twrp to grant certain permissions?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Yep right, the patch seems to be already applied!

So not sure what is happening...

You should consider a factory reset.

I'm still fine with galaxy 9 serie and didn't have feedback about this command on S21.

The output of this command, which don't make any change on the phone, could help :

su -c grep -r 'wsm' /vendor/etc/vintf
[Samsung Galaxy Note 9 Themes, Apps, and Mods] bigpotato107:
So could this be why its not working?? Also do u need to flash anything else as doing just magisk there is nothing else flashed. You have flashed multi disabler but there is nothing about flashing that
[Samsung Galaxy Note 9 Themes, Apps, and Mods] bigpotato107:
I ran this in adb and this is the outcome /vendor/etc/vintf/manifest.xml: <name>vendor.samsung.hardware.security.wsm</name> I have not run the fix yet on s21.

But on my s20 this is the outcome /vendor/etc/vintf/manifest.xml.bak: <name>vendor.samsung.hardware.security.wsm</name> which has had fix run but not the one from this post and my gear s2 work fine

so if I run fix on s21 and all goes ok after reboot should I see similar outcome to my s20 but now on s21
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Ok perfect so you should run the command from first post without issue.

And yes only the magisk module, to fix global bluetooth pairing, and the terminal command, which fix specifically samsung watch pairing.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] bigpotato107:
as soon as i run 2nd command in script I get sed: short write: No space left on device run 3rd command reboot and phone goes to recovery to be factory reset? Any ideas.. should i try command before running magisk modules

I used this

su

mount -o remount,rw /vendor

cp --preserve=all /vendor/etc/vintf/manifest.xml /vendor/etc/vintf/manifest.xml.bak

sed -i '/<.*security.wsm.*/,/<hal format="hidl">/d' /vendor/etc/vintf/manifest.xml

mount -o remount,ro /vendor and had to reset watch to new device
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Humm

Not sure about that but S21 serie could use the ext4 dedup filesystem.. which is readonly and means no possible physical modification, such as this command try to do..
[Samsung Galaxy Note 9 Themes, Apps, and Mods] jsjs123456:
Yes, I've done that and even flashed another version of ROM and rooted using previous method. Everything is the same, patching is successful, and pairing is still lost after reboot.

I can live with the problem, as I'm using NFC.

Hope there is some article describing analysis of the problem and development of the patch. Reverse engineering is difficult. :)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] Nor|shoR:
Hi!

The solution that worked for me and lead to a succesfull pairing with my Gear S3 watch is a combination of informations found here on XDA.

I have a Samsung S21 5G Snapdragon - SM-G9910 curently running Kernel - G9910ZHU2AUBB.

First, I applied the solution that afaneh92 provided in his thread HERE (and also on telegram!)

that worked flawlessly with the new update from our coleague.

After that, I went to the initial phone setup (as normal) and then, I had manualy edited the 2 XML files form \vendor\etc\vintf

manifest_lahaina.xml and manifest_shima.xml using MiExplorer for backup and editing these files (root access needed - and GRANT for MiExplorer

The edit consists in deleting the selected lines like in the picture attached (thank you 3arthur6 !!!) because the commands form ADB Shell:

su

mount -o remount,rw /vendor

i=`grep -lr 'security.wsm' /vendor/etc/vintf` && [ ! -z $i ] && [ $i != *.bak ] && cp --preserve=all $i $i.bak && sed -i '/<.*security.wsm.*/,/<hal format="hidl">/d' $i

mount -o remount,ro /vendor

Didn`t worked for me, because of some sort of "unexpected operator/operand" error.

In text format this lines are found in the two XML files and have to be DELETED

<hal format="hidl">

<name>vendor.samsung.hardware.security.wsm</name>

<transport>hwbinder</transport>

<version>1.0</version>

<interface>

<name>ISehWsm</name>

<instance>default</instance>

</interface>

<fqname>@1.0::ISehWsm/default</fqname>

</hal>

One phone restart later, I ran through Galaxy Wearable setup and succesfully paired my Gear S3 watch without any problems.

Please, take my feedback as a personal experience with this method. I don`t know if it will work for other phones too. Also, please BACK-up any relevant files or entire system before you proceed testing this method.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Hi @3arthur6 ,

today I've decided to reset my phone trying to fix this buetooth pairing issue, but I can't install the zip from recovery. (I did not flash it trough magisk before)

It says Error 1 and it doesn't create any file .tar to upload here.

I wanted to flash in twrp as you say:

" To fix Galaxy Wearable pairing issue, as the modifcations aren't applicable through Magisk :

Either go to twrp flashable zip..."

because previously running the command was not the solution for me.

So, I'll wait for your instruction to continue.

Thanks for your time,

DJLeleX
[Samsung Galaxy Note 9 Themes, Apps, and Mods] chronolz:
Hi,

I would like to understand how you got the /vendor folder to be writable. Is it the multidisabler patch or something other patch. Even if I "mount -o remount,rw /vendor" I still get "no space left" when editing files in /vendor similar to bigpotato107 when he tired to run the following cmd

Mar 13, 2021 at 1:00 AM

New

Add bookmark

#269

Humm

Not sure about that but S21 serie could use the ext4 dedup filesystem.. which is readonly and means no possible physical modification, such as this command try to do..

Thanks

chronolz
[Samsung Galaxy Note 9 Themes, Apps, and Mods] Nor|shoR:
Yes! Multidisabler done the trick from the @afaneh92 thread. "mount -o remount, rw" didn`t worked for me either till I installed TWRP and run multidisabler from our coleague.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] crazy4everX:
Finally, my savior! I've spend the past month and a half searching for a fix after upgrading to Android 11, and nearly tried everything. After resetting one last time and applying this fix it finally works!

Ps. I assume I need to reapply this after every single update?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Whoops try to download the zip again, I just silently updated it in line with magisk module samsung phones detection. It should be fine now

As I understand, the vendor partition is entirely full. @afaneh92 recovery seems to repartition the super partition containing system, vendor and some others to give some more space on vendor one.

Happy to hear it helps!

Theoretically a script checks at each boot and reinstall the module if needed (ota or something). But a second reboot is needed in this case
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
I tried just now with the new zip file, it stills give me the same error.

waiting for your instruction to proceed,

thanks

DJLeleX
[Samsung Galaxy Note 9 Themes, Apps, and Mods] mariomaxx:
Im having the same problem. Were you able to fix it?

If you have please tell how.

Im using a Galaxy s21 and I can pair it with everything but my Galaxy Watch 3.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Sorry again.. I will look deeper on it.

You probably need to extend your vendor sub partition under the super partition and/or make it writable.

I will ask for more infos on how to do that and probably add a guide here for S21 users.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
I really appreciate all the effort you're putting into this

I'm really really grateful to you (even if it's not working for me right now)

Thanks again, cheers,

DJLeleX
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
So I suspect an incompatibility with your twrp recovery, since there are variety of recoveries and my script isn't good enough to handle all of them.

Could you flash again the zip from first post then make a copy of the recovery log.

And flash the attached zip which will create a file, BluetoothLibraryPatcherDebug.txt, on your internal storage.

Then attach here the recovery log and this created file.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Here's the .txt file (My recovery is latest official twrp, downloaded from twrp.me)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Again thanks! You help a lot and probably for various phones.

So go again download the zip from the first page. Hoping this is the last and good time!
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Now it flashes successfully from recovery, thanks.

But the problem with my Samsung Galaxy Fit 2 still isn't fixed. Whenever I reboot or power off the phone or put it in airplane mode I lose the pairing with it band (aka the watch or whatever name you want to call it). So if you have some other tests I can do, just tell me, if not but you can investigate this issue, please do.

[ I can surely deal with this issue without any major problems in daily life, but it's a bit annoying having to reset the band every time I need to put my phone in airplane mode or reboot or power off the phone, (and for medical reason it quite frequently, like twice or three times a week, as in hospital they require me to enable airplane mode or power off the phone) ]

Anyway thanks a lot for all the work you've done.

I'm truly grateful to you, cheers,

DJLeleX
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Damn..

Pretty sure you already done this but did you have disabled tima in your system/build.prop?

And could you attach again your /data/misc/bluedroiddump/subBuffer.log? Maybe I could see something
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Yep tima is disabled

I'll attach my subBuffer.log (zipped as xda doesn't let me upload .log files)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] ercanziyanak:
hello my device Note 10 + SM-N975F root andrıid 11 is it okay for.Galaxy werable for watch?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] basem55:
Please add support my device

Samsung Galaxy S7 SM-G930FD
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Installation error should be fixed but depending on devices this patch didn't always worked on pre Android 8.0

You can go to libsecure_storage magisk module to fix it on your s7

You will need twrp zip or magisk module + terminal commands from first post to fix your watch.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
for the S7 (and S7E) I suggest you to use Floyd ROM which is super stable (with android 10/OneUI 2.5) and I never had any issue bluetooth related on my old S7E
[Samsung Galaxy Note 9 Themes, Apps, and Mods] marrrteng:
Please support my device Samsung Galaxy Tab A 10.1 (SM T510)

Files from failed installation are attached.

Thanks!!
[Samsung Galaxy Note 9 Themes, Apps, and Mods] edzamber:
@3arthur6

Hi

It is imposible to patch S9 G960FXXUFFUC6 new base from march 31, 2021 fw update.

It was working with previous fw base.

Android 10.

Here is BluetoothLibPatcher-files.tar

Many thanks
[Samsung Galaxy Note 9 Themes, Apps, and Mods] DjLeleX:
Hey @3arthur6 what's the latest changes on the build pushed today on magisk?

A question popped in my mind right now..

if I flash through recovery I still need to install the magisk module or not?

(Because I flashed through recovery and this time I noticed that magisk doesn't see the module. Last time it was normally loaded into magisk after flash thourgh twrp)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Try it again. I just pushed an update which should handle your device

I just saw your issue in github.

It seems samsung makes more and more changes on the bluetooth library since few months..

I will take a look asap.

Unfortunately not.. And I couldn't find relevant informations on your bluetooth logs.

I could not explain your situation..

Magisk module will never fix the gear watch issue. And no need for zip + magisk module.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] edzamber:
Hi

Yes they change a lot of things again :rolleyes:

Many thanks (y)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Did you try with latest module version (2.2.3)?

It probably has been fixed with it.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] edzamber:
Yes i tried with 2.2.3 but failed as well
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Could you try again 2.2.3 on magisk manager..? :p And post the debug tar if any?

I saw you used it on the github issue, but the library location isn't the right one..(?)

The patch seems ready for this library version
[Samsung Galaxy Note 9 Themes, Apps, and Mods] edzamber:
Done again but not working 😔
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Ahaha sorry dude.. again I pushed some crap on github.. you can look the latest commit

It should be ok now. Hoping for your feedback will be good
[Samsung Galaxy Note 9 Themes, Apps, and Mods] edzamber:
Perfect !

Many thanks ;)
[Samsung Galaxy Note 9 Themes, Apps, and Mods] ercanziyanak:
I have a Note 10 plus Sm-n975f. If I install this module can I connect from werable to my watch and headset without any problems.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Did you read the first post..?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] ercanziyanak:
I read it. But when I was on Android 10, I could not connect to my watch.I did not apply thermal, was it necessary for galaxy werable, will galaxy buds pro and galaxy watch be connected?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
S21 serie user experiencing gear watch problem should be fine now.

Without anything more than flashing the twrp zip and with any twrp version.

Thanks to @afaneh92 and @Nor|shoR
[Samsung Galaxy Note 9 Themes, Apps, and Mods] ercanziyanak:
Do we need to follow the thermalis step after uploading with twrp?Do we need to do anything after uploading it with twrp? Does it connect directly?Because I installed it from magisk it is not connected.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
You need to read the first post dude. All your asks are explained in it.

Install Magisk module + execute terminal commands

OR

flash the twrp zip, reboot, then pair again your watch as usual. That's all.
[Samsung Galaxy Note 9 Themes, Apps, and Mods] ercanziyanak:
I understood everything. I have one last question. I will get galaxy buds pro will it connect smoothly?
[Samsung Galaxy Note 9 Themes, Apps, and Mods] 3arthur6:
Give it a try you will see
[Samsung Galaxy Note 9 Themes, Apps, and Mods] ercanziyanak:
There is a small problem. It connects and immediately loses the connection.Bluetooth icon at the top right disappears and comes back
[Samsung Galaxy Note 9 Themes, Apps, and Mods] AllanEloy:
After typing the code in the terminal i get this error and nothing happens.

Edit: I figured it out, i had the error because I was copying everything and pasting. I didn't realize I had to do it one by one, every line.

After typing each line and pressing "enter" I get no error message, but also no "success" message.. is it normal?

S20 Plus Exynos

android 11

OneUI 3.1