Skip to content

If after rebooting to normal mode the devices is lost #84

@ofilin

Description

@ofilin

!!!You follow all instructions at your own risk!!!
I encountered a problem when the patch only works in root mode, if you boot the phone without root, bluetooth devices disappear. So I found a way out on my Galaxy S10. The point is to flash the patched module into the firmware. Now on my smartphone, bluetooth works with any reboot and devices are not lost. Maybe someone will find it useful.

Install maagisk...

All command running in adb shell

su
mkdir -p /sdcard/Download/magisk/orig/
mkdir -p /sdcard/Download/magisk/patched/

md5sum /system/lib64/libbluetooth.so # MD5_1
cp /system/lib64/libbluetooth.so /sdcard/Download/magisk/orig/libbluetooth.so # Backup original module

Install BluetoothLibraryPatcher... Next:

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

reboot 
su

md5sum /system/lib64/libbluetooth.so # MD5_2. Should not match MD5_1

if MD5_2 != MD5_1
cp /system/lib64/libbluetooth.so /sdcard/Download/magisk/patched/libbluetooth.so
And uninstall BluetoothLibraryPatcher

reboot

su
md5sum /system/lib64/libbluetooth.so # if MD5_1 do:

mount -o remount,rw /
cp /sdcard/Download/magisk/patched/libbluetooth.so /system/lib64/libbluetooth.so
mount -o remount,ro /
reboot

All done!
Now bluetooth on your smartphone will work without the Bluetooth Library Patcher module

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions