librepods-org / librepods-org/librepods

unable to connect to AirPods over L2CAP

Open
#624 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

android bug
Dominant language
Kotlin
Stars
29.9k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

App version

v0.1.0-rc.4

App source

GitHub

Device

XIAOMI 12X

Android / OS version

Android 12, MIUI 13

Root / hook method

Magisk + Xposed

AirPods model

AirPods (4th gen) with ANC

AirPods firmware

No response

What happened

Hi, I captured new logs on my Xiaomi device (psyche). The hook is successful, but the connection still fails.
I found massive SecurityException: Need BLUETOOTH PRIVILEGED permission when AirPodsService.updateBattery tries to call setMetadata().
Also, there are ClassNotFoundException for standard AOSP classes like com.android.bluetooth.bc.BCService because MIUI heavily modified the Bluetooth stack.
Could these exceptions be crashing the service and dropping the L2CAP socket? I attached the log for your reference.

Logs

airpods_log_20260609_182600.txt

Additional context

https://github.com/kavishdevar/librepods/actions/runs/23708184802

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached log and the reported SecurityException from AirPodsService.updateBattery when it calls setMetadata(), then compare it with the ClassNotFoundException entries for MIUI's Bluetooth stack. Done means identifying whether these exceptions cause the L2CAP connection failure and documenting or resolving the MIUI-specific failure path.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.