anonymix007 / ExtA2DP

LSPosed module for adding A2DP codecs
GNU General Public License v3.0
60 stars 3 forks source link

does not work with OxygenOS 14 Oneplus 10T #19

Open vidrug opened 5 months ago

vidrug commented 5 months ago

bluetooth crashes

anonymix007 commented 5 months ago

https://github.com/anonymix007/ExtA2DP?tab=readme-ov-file#logs

Bluetooth® Bluetooth® 5.2, support SBC, AAC, APTX, aptx HD, LDAC, LHDC

vidrug commented 5 months ago

the previous version was working

vidrug commented 5 months ago

logs.txt

anonymix007 commented 5 months ago
AndroidRuntime: FATAL EXCEPTION: main
04-18 18:10:39.109 21985 21985 E AndroidRuntime: Process: com.android.bluetooth, PID: 21985
04-18 18:10:39.109 21985 21985 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for void com.oplus.bluetooth.feature.nativechannel.OplusBtNativeChannelUtils.classInitNative() (tried Java_com_oplus_bluetooth_feature_nativechannel_OplusBtNativeChannelUtils_classInitNative and Java_com_oplus_bluetooth_feature_nativechannel_OplusBtNativeChannelUtils_classInitNative__) - is the library loaded, e.g. System.loadLibrary?

Sorry, I'm not going to spend time on reverse engineering BBK BT stack. If you want to, you may provide the list of all those functions and I'll add dummy implementations for them. Refer to this and JNI docs for the format.

vidrug commented 5 months ago

Unfortunately I won't be able to pull this off without outside help, is there any way to replace the BBK stack with AOSP then apply the patch?

anonymix007 commented 5 months ago

Use custom ROM. Alternatively, you may try to build QTI BT stack from Paranoid Android and replace Bluetooth.apk with a simple Magisk module, but you'll be on your own here.

I'm planning to add support for AOSP-based (LineageOS, crDroid etc) ROMs in the future, so you'll be able to use any custom ROM.

vidrug commented 5 months ago

i find source code for my phone, maybe it help? https://github.com/OnePlusOSS/android_kernel_oneplus_sm8475/tree/oneplus/sm8475_u_14.0.0_oneplus_ace_pro

anonymix007 commented 5 months ago

Nope, it didn't. Kernel has nothing to do with this.

O2C14 commented 2 months ago

If OplusBtNativeChannelUtils is not that important to the system, then you can consider hooking all native modified functions of OplusBtNativeChannelUtils and skipping them. Screenshot_2024-08-02-17-32-53-005_me simpleHook

Screenshot_2024-08-02-17-32-55-492_me simpleHook

Screenshot_2024-08-02-17-33-09-394_ru kirddos ext

anonymix007 commented 2 months ago

That's why I need a list of all these functions. There is already a similar mechanism implemented in jniRegisterNativeMethodsSafe