[GH-ISSUE #232] L2CAP Connection Fails on Fairphone 5 with Both Xposed and Magisk Methods #108

Open
opened 2026-03-02 12:03:33 +03:00 by kerem · 4 comments
Owner

Originally created by @llange on GitHub (Oct 20, 2025).
Original GitHub issue: https://github.com/kavishdevar/librepods/issues/232

Hello,
quite a similar bug report as #229 but with a different hardware (Fairphone FP5 / AirPods Pro 3) / software (Android 13).
No L2CAP connection available.

Device Information:

  • Device: Fairphone FP5 / arm64-v8a
  • Android Version: 13 (API 33) (TQ3A.230901.001 / 3.1.4-t-20250915526530-official-FP5)
  • Root: Magisk
  • Magisk Version 29.0
  • Xposed Framework: Zygisk - LSPosed (v1.9.2 7024)
  • LibrePods v0.2.0-alpha

Description: The LibrePods app is unable to establish an L2CAP connection to my AirPods Pro 3 on my Fairphone FP5, despite trying both the recommended Xposed and Magisk module methods. The symptoms are slightly different depending on the method used.

Tests :

  1. Method 1: Xposed Hook (Recommended):
  • Zygisk - LSPosed correctly detected the LibrePods 0.2.0-alpha module which was activated.
  • Reset Hook:
    • correctly reset Xposed Module
    • correctly toggled Bluetooth
    • troubleshoot connection
  • The logcat shows L2CAP Registered service classic PSM: 0x1001 then Failed to set metadata for key xxxx - java.lang.SecurityException: ... has no android.permission.BLUETOOTH_PRIVILEGED
  • Logs: airpods_log_20251020_144623.txt
  1. Method 2: btl2capfix Magisk Module:

Let me know what kind of further tests I should made to qualify the issue.

At the moment, lacking a working platform, I don't know exactly what are the markers for success and progression but if you share your troubleshooting methodology I'll certainly be able to help pinpointing the issue.

Thanks for your time and investment on this project.

Originally created by @llange on GitHub (Oct 20, 2025). Original GitHub issue: https://github.com/kavishdevar/librepods/issues/232 Hello, quite a similar bug report as #229 but with a different hardware (Fairphone FP5 / AirPods Pro 3) / software (Android 13). No L2CAP connection available. **Device Information:** * **Device:** [Fairphone FP5](https://shop.fairphone.com/fairphone-5) / arm64-v8a * **Android Version:** 13 (API 33) (TQ3A.230901.001 / 3.1.4-t-20250915526530-official-FP5) * **Root:** Magisk * **Magisk Version** 29.0 * **Xposed Framework:** Zygisk - LSPosed (v1.9.2 7024) * **LibrePods** v0.2.0-alpha **Description:** The LibrePods app is unable to establish an L2CAP connection to my AirPods Pro 3 on my Fairphone FP5, despite trying both the recommended Xposed and Magisk module methods. The symptoms are slightly different depending on the method used. **Tests :** 1. **Method 1: Xposed Hook (Recommended):** * Zygisk - LSPosed correctly detected the LibrePods 0.2.0-alpha module which was activated. * Reset Hook: * correctly reset Xposed Module * correctly toggled Bluetooth * troubleshoot connection * The logcat shows `L2CAP Registered service classic PSM: 0x1001` then `Failed to set metadata for key xxxx` - `java.lang.SecurityException: ... has no android.permission.BLUETOOTH_PRIVILEGED` * Logs: [airpods_log_20251020_144623.txt](https://github.com/user-attachments/files/23001525/airpods_log_20251020_144623.txt) 2. **Method 2: `btl2capfix` Magisk Module:** * I disabled the Xposed module and installed the `btl2capfix` (from [v0.0.3-hotfix](https://github.com/kavishdevar/librepods/releases/tag/v0.0.3-hotfix)) Magisk module instead. * **Result:** Same issue and same symptoms. * Logs: [airpods_log_20251020_145419.txt](https://github.com/user-attachments/files/23001725/airpods_log_20251020_145419.txt) Let me know what kind of further tests I should made to qualify the issue. At the moment, lacking a working platform, I don't know exactly what are the markers for success and progression but if you share your troubleshooting methodology I'll certainly be able to help pinpointing the issue. Thanks for your time and investment on this project.
Author
Owner

@llange commented on GitHub (Oct 20, 2025):

Another Xposed test has been done on an identical (but different) device with the same AirPods Pro 3.

Device Information:

  • Device: Fairphone FP5 / arm64-v8a
  • Android Version: 13 (API 33) (TQ3A.230901.001 / 3.1.4-t-20250915526530-official-FP5)
  • Root: Magisk
  • Magisk Version 29.0
  • Xposed Framework: ReZygisk (v1.0.0-rc.3) - ReLSPosed (v1.0.1 7190)
  • LibrePods v0.2.0-alpha

Same failures, here are the airpods_log_20251020_154631.txt

<!-- gh-comment-id:3422164658 --> @llange commented on GitHub (Oct 20, 2025): Another Xposed test has been done on an identical (but different) device with the same AirPods Pro 3. **Device Information:** * **Device:** [Fairphone FP5](https://shop.fairphone.com/fairphone-5) / arm64-v8a * **Android Version:** 13 (API 33) (TQ3A.230901.001 / 3.1.4-t-20250915526530-official-FP5) * **Root:** Magisk * **Magisk Version** 29.0 * **Xposed Framework:** ReZygisk (v1.0.0-rc.3) - ReLSPosed (v1.0.1 7190) * **LibrePods** v0.2.0-alpha Same failures, here are the [airpods_log_20251020_154631.txt](https://github.com/user-attachments/files/23002455/airpods_log_20251020_154631.txt)
Author
Owner

@kavishdevar commented on GitHub (Oct 20, 2025):

I think A13 should've worked fine because they updated their stack (moved around original and added Gabeldorsche) in that release. But, I'll have a look again if there were major differences. In the logs I can not see what is causing the disconnect, other than a "application closed socket", which doesn't explain what's happening.

<!-- gh-comment-id:3423014020 --> @kavishdevar commented on GitHub (Oct 20, 2025): I think A13 should've worked fine because they updated their stack (moved around original and added Gabeldorsche) in that release. But, I'll have a look again if there were major differences. In the logs I can not see what is causing the disconnect, other than a "application closed socket", which doesn't explain what's happening.
Author
Owner

@llange commented on GitHub (Oct 21, 2025):

Thanks for the feedback, and if I can help let me know how.

By the way, do you mind sharing a few insights about what you're looking for in the logs, what are the important patterns, the things that should happen in an order or in another, and more globally the markers of "success" of exchanging data with the bluetooth stack ?
What would be, for example, a way to validate that the bluetooth lib has been correctly patched ?
I believe that for Xposed modules that would be AirPodsHook: messages to look for ; but for the mounted / patched library image is there a way to check for the correct patching through the logs ?
Thanks for your insight.

<!-- gh-comment-id:3429211442 --> @llange commented on GitHub (Oct 21, 2025): Thanks for the feedback, and if I can help let me know how. By the way, do you mind sharing a few insights about what you're looking for in the logs, what are the important patterns, the things that should happen in an order or in another, and more globally the markers of "success" of exchanging data with the bluetooth stack ? What would be, for example, a way to validate that the bluetooth lib has been correctly patched ? I believe that for Xposed modules that would be `AirPodsHook:` messages to look for ; but for the mounted / patched library image is there a way to check for the correct patching through the logs ? Thanks for your insight.
Author
Owner

@kavishdevar commented on GitHub (Nov 9, 2025):

Sorry for the late reply- didn't have time!

I am not looking for anything specific, but rather all logs from the Bluetooth process that could help me trace where the stack disconnects.

And, I have removed the root module, because it wasn't guaranteed to work on all devices, xposed seemd to have been working fine, and it's easier for me to maintain and add new hooks too (like the new SDP hook for multi-device conn, and accessibility features).

But, if you still have that installed:
First check if the /apex/com.android.btservices directory exists. If it does, and the patch was successful, then Android should probably using the new library from /system/lib64. If your OS doesn't use APEX, then compare the files /data/adb/modules/btl2capfix/system/lib64/libbluetooth_jni.so and the one in the real system's lib dir.

<!-- gh-comment-id:3508573172 --> @kavishdevar commented on GitHub (Nov 9, 2025): Sorry for the late reply- didn't have time! I am not looking for anything specific, but rather all logs from the Bluetooth process that could help me trace where the stack disconnects. And, I have removed the root module, because it wasn't guaranteed to work on all devices, xposed seemd to have been working fine, and it's easier for me to maintain and add new hooks too (like the new SDP hook for multi-device conn, and accessibility features). But, if you still have that installed: First check if the `/apex/com.android.btservices` directory exists. If it does, and the patch was successful, then Android should probably using the new library from `/system/lib64`. If your OS doesn't use APEX, then compare the files `/data/adb/modules/btl2capfix/system/lib64/libbluetooth_jni.so` and the one in the real system's lib dir.
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#108
No description provided.