MuntashirAkon/AppManager · error · IOException
ADB pairing failed
Error message
ADB pairing failed
What it means
pairAndReport() rethrows the failure of the ADB wireless-pairing task submitted to sPairingExecutor. The underlying pair(host, port, pairingCode) — an mDNS/TLS pairing handshake with the device — failed, commonly because the pairing code was wrong or expired, the port changed, or the device dropped the pairing socket. The generic catch converts any cause into this reported error.
Solutions
- Ask the user to re-enter the pairing code and re-run pairing before the dialog expires
- Confirm both devices are on the same Wi-Fi network and mDNS is reachable
- Check the device's wireless debugging screen for the current port and retry
- Log/inspect the underlying cause exception for TLS or IO specifics
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at app/src/main/java/io/github/muntashirakon/AppManager/adb/AdbConnectionManager.java:89 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/3010cc2017b3b543.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/adb/AdbConnectionManager.java:89
public static synchronized PairingSession getPairingSession() {
return sPairingSession;
}
public static synchronized void endPairingSession(@NonNull PairingSession session) {
if (sPairingSession == session) {
sPairingSession = null;
}
}
@WorkerThread
public void pairAndReport(@NonNull PairingSession session, @NonNull String host, int port,
@NonNull String pairingCode) throws Exception {
try {
Future<Boolean> pairingTask = sPairingExecutor.submit(() -> pair(host, port, pairingCode));
try {
if (!awaitPairingAttempt(pairingTask, PAIRING_ATTEMPT_TIMEOUT_MILLIS,
TimeUnit.MILLISECONDS)) {
throw new IOException("ADB pairing failed");
}
} catch (SocketTimeoutException | InterruptedException e) {
discardInstance(this);
throw e;
}
session.reportSuccess();
} catch (Exception e) {
Log.w(TAG, "Pairing failed.", e);
session.reportFailure(e);
throw e;
}
}
private static synchronized void discardInstance(@NonNull AdbConnectionManager instance) {
if (sInstance == instance) {
// The library serialises operations on each manager. Do not let a stuck pairing
// operation block every later ADB connection through the same instance.
sInstance = null;View on GitHub (pinned to 0152f468fc)