[GH-ISSUE #4] Support for Qualcomm Bluetooth Stack #2

Closed
opened 2026-03-02 12:02:30 +03:00 by kerem · 8 comments
Owner

Originally created by @InfinityMod on GitHub (Nov 20, 2024).
Original GitHub issue: https://github.com/kavishdevar/librepods/issues/4

Originally assigned to: @kavishdevar on GitHub.

Hi, I like the project.

My current phone seems to use the Qualcomm Bluetooth library (libbluetooth_qti_jni.so), and so I was wondering if there also exists a fixed ".so" file for this chipset.

What I did so far:
Integrating the libbluetooth_jni.so via Magisk under System/lib64/libbluetooth_jni.so. Unfortunately, the app crashes on starting up. I recognized that normally just "libbluetooth_qti_jni.so" but not "libbluetooth_jni.so" exists under lib64 for my smartphone (OnePlus 10 Pro).

Originally created by @InfinityMod on GitHub (Nov 20, 2024). Original GitHub issue: https://github.com/kavishdevar/librepods/issues/4 Originally assigned to: @kavishdevar on GitHub. Hi, I like the project. My current phone seems to use the Qualcomm Bluetooth library (libbluetooth_qti_jni.so), and so I was wondering if there also exists a fixed ".so" file for this chipset. _What I did so far:_ Integrating the libbluetooth_jni.so via Magisk under System/lib64/libbluetooth_jni.so. Unfortunately, the app crashes on starting up. I recognized that normally just "libbluetooth_qti_jni.so" but not "libbluetooth_jni.so" exists under lib64 for my smartphone (OnePlus 10 Pro).
kerem closed this issue 2026-03-02 12:02:30 +03:00
Author
Owner

@kavishdevar commented on GitHub (Nov 21, 2024):

Thank you for trying out the project! Unfortunately I can not build custom libraries for possible flavoured android ROMs like OxygenOS. Although, chances are, the normal library exists in the apex library folder. Could you send me the output of sudo lsof | grep libbluetooth?

By the way, I've recently discovered that my library only works on A14, and breaks bluetooth on A15. Could you confirm which Android version are you using?

I will shortly be updating my (pre-)release including the library buily from Android 15's sources and make the instructions more clear.

Thank you!

<!-- gh-comment-id:2489893808 --> @kavishdevar commented on GitHub (Nov 21, 2024): Thank you for trying out the project! Unfortunately I can not build custom libraries for possible flavoured android ROMs like OxygenOS. Although, chances are, the normal library exists in the apex library folder. Could you send me the output of `sudo lsof | grep libbluetooth`? By the way, I've recently discovered that my library only works on A14, and breaks bluetooth on A15. Could you confirm which Android version are you using? I will shortly be updating my (pre-)release including the library buily from Android 15's sources and make the instructions more clear. Thank you!
Author
Owner

@kavishdevar commented on GitHub (Nov 21, 2024):

Hi, can you please share the crash logs? I don't think it should be crashing. Does Bluetooth work after replacing the library? if not, you are probably not on A14, for which the library was built for. Else, it might be some other bug, which I will defintely look into!

<!-- gh-comment-id:2491514669 --> @kavishdevar commented on GitHub (Nov 21, 2024): Hi, can you please share the crash logs? I don't think it should be crashing. Does Bluetooth work after replacing the library? if not, you are probably not on A14, for which the library was built for. Else, it might be some other bug, which I will defintely look into!
Author
Owner

@InfinityMod commented on GitHub (Nov 21, 2024):

Hi thanks for looking inside the issues,

I did lsof; thanks for the hint:

audio.service_6  1655 audioserve  mem     /odm/lib64/libbluetooth_audio_extend_session_oplus.so
audio.service_6  1655 audioserve  mem     /odm/lib64/libbluetooth_audio_extend_factory_client.so
audio.service_6  1655 audioserve  mem     /vendor/lib64/libbluetooth_audio_session_qti_2_1.so
audio.service_6  1655 audioserve  mem     /vendor/lib64/libbluetooth_audio_session_qti.so
audio.service_6  1655 audioserve  mem     /vendor/lib64/libbluetooth_audio_session.so
droid.bluetooth  4362  bluetooth  mem      /system_ext/lib64/libbluetooth_qti.so
droid.bluetooth  4362  bluetooth  mem      /system/lib64/libbluetooth_qti_jni.so

The crash generates the following log:

11-21 20:34:03.904 18007 18007 E AndroidRuntime: Process: me.kavishdevar.aln, PID: 18007
11-21 20:34:03.904 18007 18007 E AndroidRuntime: java.lang.RuntimeException: Unable to start service me.kavishdevar.aln.AirPodsService@65b1719 with Intent { cmp=me.kavishdevar.aln/.AirPodsService (has extras) mCallingUid=10381 }: java.lang.NoSuchMethodException: Cannot find matching constructor
11-21 20:34:03.904 18007 18007 E AndroidRuntime:        at me.kavishdevar.aln.AirPodsService.onStartCommand(AirPodsService.kt:311)
11-21 20:34:03.906  3287  3792 W OplusEapManager handleErrorInfo sendEvent: : me.kavishdevar.aln happenedcrash
11-21 20:34:03.907  3287  3792 W ActivityTaskManager:   Force finishing activity me.kavishdevar.aln/.MainActivity
11-21 20:34:03.939  3287  4544 I WindowManager: WIN DEATH: Window{eedfe4a u0 me.kavishdevar.aln/me.kavishdevar.aln.MainActivity}
11-21 20:34:03.939  3287  4304 I ActivityManager: Process me.kavishdevar.aln (pid 18007) has died: fg  TOP 
11-21 20:34:03.944  3287  4304 W ActivityManager: Canceling start item Intent { cmp=me.kavishdevar.aln/.AirPodsService (has extras) mCallingUid=10381 } in service me.kavishdevar.aln/.AirPodsService
11-21 20:34:04.019  3287  4702 I SurfaceAnimationRunner: startAnimation requiresEdgeExtension=false, animationLeash=Surface(name=Surface(name=90d5ad5 Splash Screen me.kavishdevar.aln)/@0xa846495 - animation-leash of window_animation)/@0x14269aa, runningAnim=com.android.server.wm.SurfaceAnimationRunner$RunningAnimation@8f4f99b, mPreProcessingAnimations={}
11-21 20:34:04.024  3287  4702 I WindowStateExtImpl: onSurfaceShowChange show = false mPackageName = me.kavishdevar.aln parentPkgName = me.kavishdevar.aln
11-21 20:34:04.024  3287  4702 I WindowManager: Window{90d5ad5 u0 Splash Screen me.kavishdevar.aln EXITING} state from HAS_DRAWN to NO_SURFACE; reason: destroySurface
11-21 20:34:04.409  3287  3514 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{4e595cf u0 me.kavishdevar.aln/.MainActivity t4768 f} isExiting}
11-21 20:34:04.753  3287  4988 I OplusScreenSecurityMask: onStackRemoved task = Task{3cfbfeb #4768 type=standard A=10381:me.kavishdevar.aln} record = null displayId = 0
11-21 20:34:04.756  3287  3515 I FlexibleTaskController: releaseFlexibleTaskCaptionView task=Task{3cfbfeb #4768 type=standard A=10381:me.kavishdevar.aln}
11-21 20:34:04.756  3287  3515 I FlexibleTaskController: releaseFlexibleTaskCaptionView task=Task{3cfbfeb #4768 type=standard A=10381:me.kavishdevar.aln}
<!-- gh-comment-id:2492109942 --> @InfinityMod commented on GitHub (Nov 21, 2024): Hi thanks for looking inside the issues, I did lsof; thanks for the hint: ``` audio.service_6 1655 audioserve mem /odm/lib64/libbluetooth_audio_extend_session_oplus.so audio.service_6 1655 audioserve mem /odm/lib64/libbluetooth_audio_extend_factory_client.so audio.service_6 1655 audioserve mem /vendor/lib64/libbluetooth_audio_session_qti_2_1.so audio.service_6 1655 audioserve mem /vendor/lib64/libbluetooth_audio_session_qti.so audio.service_6 1655 audioserve mem /vendor/lib64/libbluetooth_audio_session.so droid.bluetooth 4362 bluetooth mem /system_ext/lib64/libbluetooth_qti.so droid.bluetooth 4362 bluetooth mem /system/lib64/libbluetooth_qti_jni.so ``` The crash generates the following log: ``` 11-21 20:34:03.904 18007 18007 E AndroidRuntime: Process: me.kavishdevar.aln, PID: 18007 11-21 20:34:03.904 18007 18007 E AndroidRuntime: java.lang.RuntimeException: Unable to start service me.kavishdevar.aln.AirPodsService@65b1719 with Intent { cmp=me.kavishdevar.aln/.AirPodsService (has extras) mCallingUid=10381 }: java.lang.NoSuchMethodException: Cannot find matching constructor 11-21 20:34:03.904 18007 18007 E AndroidRuntime: at me.kavishdevar.aln.AirPodsService.onStartCommand(AirPodsService.kt:311) 11-21 20:34:03.906 3287 3792 W OplusEapManager handleErrorInfo sendEvent: : me.kavishdevar.aln happenedcrash 11-21 20:34:03.907 3287 3792 W ActivityTaskManager: Force finishing activity me.kavishdevar.aln/.MainActivity 11-21 20:34:03.939 3287 4544 I WindowManager: WIN DEATH: Window{eedfe4a u0 me.kavishdevar.aln/me.kavishdevar.aln.MainActivity} 11-21 20:34:03.939 3287 4304 I ActivityManager: Process me.kavishdevar.aln (pid 18007) has died: fg TOP 11-21 20:34:03.944 3287 4304 W ActivityManager: Canceling start item Intent { cmp=me.kavishdevar.aln/.AirPodsService (has extras) mCallingUid=10381 } in service me.kavishdevar.aln/.AirPodsService 11-21 20:34:04.019 3287 4702 I SurfaceAnimationRunner: startAnimation requiresEdgeExtension=false, animationLeash=Surface(name=Surface(name=90d5ad5 Splash Screen me.kavishdevar.aln)/@0xa846495 - animation-leash of window_animation)/@0x14269aa, runningAnim=com.android.server.wm.SurfaceAnimationRunner$RunningAnimation@8f4f99b, mPreProcessingAnimations={} 11-21 20:34:04.024 3287 4702 I WindowStateExtImpl: onSurfaceShowChange show = false mPackageName = me.kavishdevar.aln parentPkgName = me.kavishdevar.aln 11-21 20:34:04.024 3287 4702 I WindowManager: Window{90d5ad5 u0 Splash Screen me.kavishdevar.aln EXITING} state from HAS_DRAWN to NO_SURFACE; reason: destroySurface 11-21 20:34:04.409 3287 3514 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{4e595cf u0 me.kavishdevar.aln/.MainActivity t4768 f} isExiting} 11-21 20:34:04.753 3287 4988 I OplusScreenSecurityMask: onStackRemoved task = Task{3cfbfeb #4768 type=standard A=10381:me.kavishdevar.aln} record = null displayId = 0 11-21 20:34:04.756 3287 3515 I FlexibleTaskController: releaseFlexibleTaskCaptionView task=Task{3cfbfeb #4768 type=standard A=10381:me.kavishdevar.aln} 11-21 20:34:04.756 3287 3515 I FlexibleTaskController: releaseFlexibleTaskCaptionView task=Task{3cfbfeb #4768 type=standard A=10381:me.kavishdevar.aln} ```
Author
Owner

@kavishdevar commented on GitHub (Nov 24, 2024):

Thank you for the logs!

I will not be able to help with the library, unfortunately. And, I will look into the crash!

<!-- gh-comment-id:2496085646 --> @kavishdevar commented on GitHub (Nov 24, 2024): Thank you for the logs! I will not be able to help with the library, unfortunately. And, I will look into the crash!
Author
Owner

@kavishdevar commented on GitHub (Dec 28, 2024):

I think I might be able to work on the library using a patcher. I will try to use ghidra and patch the library. I am still learning how to use the tool, though. So after experimenting, I will share the library with you!

<!-- gh-comment-id:2564339320 --> @kavishdevar commented on GitHub (Dec 28, 2024): I think I might be able to work on the library using a patcher. I will try to use ghidra and patch the library. I am still learning how to use the tool, though. So after experimenting, I will share the library with you!
Author
Owner

@nikhilbadyal commented on GitHub (Jan 4, 2025):

Same issue. Not working for me. I can see libbluetooth_qti_jni.so and libbluetooth_jni.so.

<!-- gh-comment-id:2571302003 --> @nikhilbadyal commented on GitHub (Jan 4, 2025): Same issue. Not working for me. I can see `libbluetooth_qti_jni.so` and `libbluetooth_jni.so`.
Author
Owner

@kavishdevar commented on GitHub (Jan 5, 2025):

BTW, if you want to experiment with this, you can use ghidra or any other patching tool and path the library yourself. I am little busy with my exams right now.

<!-- gh-comment-id:2571705718 --> @kavishdevar commented on GitHub (Jan 5, 2025): BTW, if you want to experiment with this, you can use ghidra or any other patching tool and path the library yourself. I am little busy with my exams right now.
Author
Owner

@kavishdevar commented on GitHub (Jan 13, 2025):

Please follow the instructions in the README for a simplified installation process. You need to install a module available in the latest nightly release.

This patches the library, so there is no need to build it now.

Closing as completed. You may create a new issue if needed.

<!-- gh-comment-id:2588123782 --> @kavishdevar commented on GitHub (Jan 13, 2025): Please follow the instructions in [the README](https://github.com/kavishdevar/aln#installation) for a simplified installation process. You need to install a module available in the [latest nightly release](https://github.com/kavishdevar/aln/releases/). This patches the library, so there is no need to build it now. Closing as completed. You may create a new issue if needed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librepods#2
No description provided.