Skip to content

[Android] Launching LibrePods takes AirPods Pro 2 away from desktop despite disabled auto-connect status options #784

Description

@sleepysec

App version

v1.0.0-rc1-play

App source

Play

Device

OnePlus 12

Android / OS version

OxygenOS 16.0.10

Root / hook method

No root (native L2CAP support). My phone is not rooted.

AirPods model

AirPods Pro 2 (USB-C)

AirPods firmware

9A348, updated a few days before this report. I am on the latest firmware; Apple lists 9A348 for AirPods Pro 2 (USB-C) as of September 19, 2026: https://support.apple.com/en-us/106340

What happened

LibrePods takes my AirPods Pro 2 connection away from my desktop and reconnects them to my phone when the app starts, without me explicitly requesting a connection.

Every option under "Connect to your AirPods when its status is:" is disabled. I originally noticed this after restarting the phone, when LibrePods eventually starts in the background. I then reproduced the takeover simply by launching LibrePods, without rebooting the phone.

Steps to reproduce

  1. Disable every option under "Connect to your AirPods when its status is:" in LibrePods.
  2. Force-stop LibrePods through Android's App info page.
  3. Connect the AirPods to the desktop and play audio.
  4. Open LibrePods on the phone without pressing Connect or "Reconnect to last connected device."

Actual result: Opening LibrePods pulls the AirPods connection away from the desktop to the phone.

Expected result: With those automatic connection conditions disabled, starting LibrePods should leave the desktop connection alone unless I explicitly request a connection.

Logs

No logs captured yet. The launch-based reproduction above was tested and reproduced the takeover.

Additional context

A source inspection identified a possible lead, not a confirmed root cause: in AirPodsService.kt at commit 53679cc90222e94ade84e66542d97ace2540e626, bleStatusListener.onDeviceStatusChanged() calls connectToSocket() when the advertised connection state is Disconnected and the local AACP socket is not connected. That branch does not check the auto-connect status preferences.

private val bleStatusListener = object : BLEManager.AirPodsStatusListener {
@SuppressLint("NewApi")
override fun onDeviceStatusChanged(
device: BLEManager.AirPodsStatus, previousStatus: BLEManager.AirPodsStatus?
) {
if (device.connectionState == "Disconnected" && BluetoothConnectionManager.aacpSocket?.isConnected != true) { // should never happen unless android messes up and sends us a stale broadcast
Log.d(TAG, "Seems no device has taken over, we will.")
val bluetoothManager = getSystemService(BluetoothManager::class.java)
val bluetoothAdapter = bluetoothManager.adapter
val bluetoothDevice = bluetoothAdapter.getRemoteDevice(
sharedPreferences.getString(
"mac_address", ""
) ?: ""
)
connectToSocket(bluetoothAdapter, bluetoothDevice)
}

It has not been established that this branch ran during my reproduction, that the advertisement was stale, or that my installed Play build matches this commit. Please treat it only as a debugging lead. I have not tested a GitHub build.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions