Thanks to @3arthur6 for legacy OneUI HEX values. I got them from his project. His TWRP patcher is here : https://github.com/3arthur6/BluetoothLibraryPatcher
- sudo chmod +x hexpatcher.sh
- ./hexpatcher.sh
- You need to choose the right OneUI version to make it work "properly". Every android has its own HEX values so if you don't choose the right value it will fail or won't patch properly for sure.
- OneUI 1/2/3/4 needs "libbluetooth.so", take it from lib64 folder and put it in "in" folder
- OneUI 5/6/7 needs either "libbluetooth_jni.so" or "com.android.btservices.apex" so get them from your ROM base and add them into "in" folder
- OneUI 8 needs either "libbluetooth_jni.so" or "com.android.bt.apex" so get them from your ROM base and add them into "in" folder
- Patched lib will be copied to "lib_patched" folder and stock one will be copied to "lib_stock" folder.