BluetoothLibraryPatcher - Fix bluetooth pairings loss [Android 11/10/Pie/Oreo/Nougat]


Jul 11, 2015
Can you help which file to back up .bak? I think you're making some changes to this file. I can save this file with Root Explorer. and attach it to you. You type what the command line would do, and I put it in its old place. Reboot and you're done. If you want to modify an xml file, you can do so without any problems. It is not used continuously by the operating system, it only reads data from it on reboot. You know for sure which file, what text you are looking for, and what action you are taking on it. I'll come to you with a beer minimum! Please solve it! You know for sure what needs to change and where. If I know that, I'll fix it. Thanks!

Edit: You wrote to type "su" first, then enter, then the other commands, and enter again. The su command, followed by enter, typed this text:
:data/data/command.termux/filmes/home #
So I could only copy the second command after that. I don't think so.
Oh man! I do not know what found the phone! He figured out this morning that he was connected to the clock. And it hasn't been restarted since I wrote it. Maybe the operation still took place? I do not know! Now he's mated for some reason. Thank you so much for dealing with this so much! I'm coming for a beer! Thanks! You are cool!
  • Like
Reactions: 3arthur6


Senior Member
Jun 5, 2018
Ho Chi Minh city
I'm using OneUI 2.5 on Samsung A70
I have a Galaxy Fit e
I've flashed Bluetooth Library Flasher through TWRP. It said it sucessfully flashed
But when I turn on airplane mode or reboot, it still lost
My Fit e then reset
I tried using terminal, but got this:
a70q:/ $ su
a70q:/ # mount -o remount,rw /vendor
/vendor/etc/vintf` && [ ! -z $i ] && cp --preserve=all $i $i.bak && sed -i '/<.*security.wsm.*/,/<hal format="hidl">/d' $i
mount -o remount,ro /vendora70q:/ # i=`grep -lr 'security.wsm' /vendor/etc/vintf` && [ ! -z $i ] && cp --preserve=all $i--preserve=all $i $i.bak && sed -i '/<.*security.wsm.*/,/<hal format="hidl">/d' $i <
cp: /vendor/etc/vintf/manifest.xml.bak.bak.bak setxattr(security.selinux=u:eek:bject_r:vendor_configs_file:s0): Bad file descriptor
cp: /vendor/etc/vintf/manifest.xml.bak.bak.bak: Bad file descriptor
1|a70q:/ # mount -o remount,ro /vendor
a70q:/ #
Please help, what did I done wrong?


Mar 5, 2011
Thank you so much ... been fighting for days to get my Gear S3 watch to connect after updating my S20 to OneUI 3.0.
I found your module by mystake in Magisk.


Aug 25, 2012

Bluetooth Library Patcher

This patch/module attends to avoid bluetooth pairings loss after reboot on rooted samsung devices.

It handles most of samsung devices on android Nougat, Oreo, Pie, 10 and 11.

This patch is NOT applicable with an aosp rom, only samsung stock/based.

In case installation fails, please upload here the BluetoothLibPatcher-files.tar created in your internal storage.

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

Either go to twrp flashable zip

Or you can directly execute these commands from a terminal app :

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

• Link :

- TWRP zip :
- Mega
- GDrive

- Magisk module : Bluetooth Library Patcher module from Magisk Manager

• Credits : @topjohnwu for magisk and magiskboot used here for its easy-to-use hexpatcher

• Source & changelogs : Github BluetoothLibraryPatcher
Thank you so much...problem solved


Senior Member
Aug 10, 2014
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