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

Search This thread

3arthur6

Senior Member
Sep 15, 2011
545
987
Samsung Galaxy S20


Bluetooth Library Patcher



Description :

This patch attends to avoid losing bluetooth pairings after reboot or airplane mode switch on rooted samsung devices.

It patches on the fly the bluetooth library and should support most of samsung devices on android Nougat, Oreo, Pie, 10, 11 and 12.

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



Galaxy Watch devices support :

Due to limitations in Magisk, a manual step is required to fix pairing issues with Galaxy Watch devices. After installing the Magisk module, use a command line (like Terminal Emulator or Termux) to run the following commands, then reboot:

*Beware! /!\ Owners of the S21 series cannot use these commands (or you have to be SURE your vendor partition isn't read only or full) and must instead use the zip (see bellow) to flash using TWRP. The commands below could brick your device /!\*


Code:
$ su
$ mount -o remount,rw /vendor
$ for i in `grep -lr 'security.wsm' /vendor/etc/vintf`; do [ ! -z $i ] && sed -i "$((`awk '/security.wsm/ {print FNR}' $i`-1)),/<\/hal>/d" $i; done
$ mount -o remount,ro /vendor

Alternatively, instead of installing the Magisk module and running the commands, flash the zip file from Github releases (BluetoothLibraryPatcher_twrp_X.X.X.zip) meant for TWRP.


Links :


- Bluetooth Library Patcher module from Magisk Manager


Credits :

- @topjohnwu for magisk
- @afaneh92 for the partition resizing script


Source & changelogs : Github BluetoothLibraryPatcher
 
Last edited:

aljoscha81

Senior Member
Apr 23, 2016
1,261
100
Will root android 10 rom bluetooth harm anyway ???:confused:

---------- Post added at 03:01 AM ---------- Previous post was at 03:00 AM ----------

Or is this for gsi usage?

---------- Post added at 03:01 AM ---------- Previous post was at 03:01 AM ----------

;)
Is this a magisk module?
 
Last edited:

3arthur6

Senior Member
Sep 15, 2011
545
987
Samsung Galaxy S20
Will root android 10 rom bluetooth harm anyway ???:confused:

---------- Post added at 03:01 AM ---------- Previous post was at 03:00 AM ----------

Or is this for gsi usage?

---------- Post added at 03:01 AM ---------- Previous post was at 03:01 AM ----------

;)
Is this a magisk module?

It is for samsung rom only!

I will work on a magisk module but this zip isn't one.
 
  • Like
Reactions: damca

tomatolei

Senior Member
Samsung Galaxy S10+ G9750 CHN system, can not work.
TWRP flash it, Stay in Backuping libbluetooth.so to .bak

Screenshot_2020-01-06-18-52-18.png

this is official file
View attachment libbluetooth.zip
 
  • Like
Reactions: Chaternet

jamesfitzes

Senior Member
Feb 5, 2019
202
37
do you know if this module will work on note 10+ snapdragon version?
I tried another similar module from magisk and got the message that my device is running BTA1 firmware and it couldn't patch libbluetooth.so
 

kramer04

Senior Member
Jan 15, 2011
597
230
France
@3arthur6
Just try last v1.5 module with magisk
Can't install it.
Says "Only for Samsung devices"
I've Note9 + Android 10

Just take quickly a look in your customize.sh
In my build.prop I've
ro.product.system.brand=samsung
Not ro.build.vendor.brand
 
Last edited:

3arthur6

Senior Member
Sep 15, 2011
545
987
Samsung Galaxy S20
  • Like
Reactions: kramer04

Top Liked Posts

  • There are no posts matching your filters.
  • 56


    Bluetooth Library Patcher



    Description :

    This patch attends to avoid losing bluetooth pairings after reboot or airplane mode switch on rooted samsung devices.

    It patches on the fly the bluetooth library and should support most of samsung devices on android Nougat, Oreo, Pie, 10, 11 and 12.

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



    Galaxy Watch devices support :

    Due to limitations in Magisk, a manual step is required to fix pairing issues with Galaxy Watch devices. After installing the Magisk module, use a command line (like Terminal Emulator or Termux) to run the following commands, then reboot:

    *Beware! /!\ Owners of the S21 series cannot use these commands (or you have to be SURE your vendor partition isn't read only or full) and must instead use the zip (see bellow) to flash using TWRP. The commands below could brick your device /!\*


    Code:
    $ su
    $ mount -o remount,rw /vendor
    $ for i in `grep -lr 'security.wsm' /vendor/etc/vintf`; do [ ! -z $i ] && sed -i "$((`awk '/security.wsm/ {print FNR}' $i`-1)),/<\/hal>/d" $i; done
    $ mount -o remount,ro /vendor

    Alternatively, instead of installing the Magisk module and running the commands, flash the zip file from Github releases (BluetoothLibraryPatcher_twrp_X.X.X.zip) meant for TWRP.


    Links :


    - Bluetooth Library Patcher module from Magisk Manager


    Credits :

    - @topjohnwu for magisk
    - @afaneh92 for the partition resizing script


    Source & changelogs : Github BluetoothLibraryPatcher
    6
    Just added a magisk module :good:
    It works flawlessly on my N9 and does the same stuff as the twrp zip. So should works with all others devices.
    5
    Libbluetooth patcher

    Thanks a ton for this, i'm gonna test it right away. You da mvp! :highfive:
    LE: Works as expected on BSKO and S10+, thanks again!!!!!
    4

    That module really only works for Pie and earlier. It does, however, currently contain a hack, based on byte strings found by the author of this module, that allows libluetooth.so to be patched for Android 10 on S10 and N10 series devices, but this was added to allow an easy transition to Android 10 for users of those devices and will be removed in the next version.

    Users of Android 10 should really use this module, as it is more comprehensive and supports many more models of device.
    3
    Hello! I trying to install this for my S10e (G970F), but getting a library not supported error. I've attached the libbluetooth.so and build.prop if it's any help. Thanks!

    Hey
    Give it a new try, it should be fixed