Describe the Bug
When attempting to use ADB Wireless Auto-Setup / Pairing on devices running Android 14 (API 34) or later, the pairing handshake fails due to non-SDK hidden API reflection restrictions blocking com.android.org.conscrypt.Conscrypt.exportKeyingMaterial.
Steps to Reproduce
- Launch Megingiard on an Android 14 device (e.g., AYN Thor handheld).
- Open Privileged Mode Setup -> Wireless ADB Auto-Setup / Pairing.
- Input the pairing code and port from Developer Options -> Wireless Debugging.
- Attempt to pair.
- Pairing fails to establish the TLS session because hidden API reflection is blocked by the Android runtime.
Observed Behavior & Logs
During the TLS 1.3 pairing handshake, libadb-android uses reflection to call Conscrypt's exportKeyingMaterial:
java.lang.NoSuchMethodException: com.android.org.conscrypt.Conscrypt.exportKeyingMaterial [interface javax.net.ssl.SSLEngine, class [B, class [B, int]
at java.lang.Class.getMethod(Class.java:2311)
at io.github.muntashirakon.adb.AdbPairingTlsConnection...
Because modern Android versions (Android 14 / API 34+) enforce strict non-SDK interface restrictions on hidden classes, ART denies reflection access into com.android.org.conscrypt.*, resulting in NoSuchMethodException and causing auto-setup / pairing to fail.
Device / Environment Details
- Device: AYN Thor dual-screen handheld
- OS Version: Android 14 (API Level 34)
- Megingiard Version: 0.8.0 / 0.9.0-dev
Proposed Solution
Refer to PR #121 for a proposed fix using org.lsposed.hiddenapibypass:hiddenapibypass:4.3 to exempt hidden API restrictions during pairing.
Describe the Bug
When attempting to use ADB Wireless Auto-Setup / Pairing on devices running Android 14 (API 34) or later, the pairing handshake fails due to non-SDK hidden API reflection restrictions blocking
com.android.org.conscrypt.Conscrypt.exportKeyingMaterial.Steps to Reproduce
Observed Behavior & Logs
During the TLS 1.3 pairing handshake,
libadb-androiduses reflection to call Conscrypt'sexportKeyingMaterial:Because modern Android versions (Android 14 / API 34+) enforce strict non-SDK interface restrictions on hidden classes, ART denies reflection access into
com.android.org.conscrypt.*, resulting inNoSuchMethodExceptionand causing auto-setup / pairing to fail.Device / Environment Details
Proposed Solution
Refer to PR #121 for a proposed fix using
org.lsposed.hiddenapibypass:hiddenapibypass:4.3to exempt hidden API restrictions during pairing.