adb_shell
adb_shell copied to clipboard
Implement the pair command for Android 11+ devices
It would be great to add this feature.
https://developer.android.com/studio/command-line/adb#connect-to-a-device-over-wi-fi-android-11+
I think this is the same as https://github.com/JeffLIrion/adb_shell/issues/175
There are C++ and Java implementations. It looks kinda cryptic for me, but it could help you.
- https://github.com/RikkaApps/Shizuku/blob/master/manager/src/main/jni/adb_pairing.cpp
- https://github.com/MuntashirAkon/libadb-android/blob/master/libadb/src/main/java/io/github/muntashirakon/adb/PairingAuthCtx.java
Any news on this ?
I'm trying to implement this but STLS/Pair needs SPAKE that in turn needs the export_keying_materials
OpenSSL function that is still not available for cpython3
https://github.com/python/cpython/pull/25255 https://github.com/python/cpython/issues/87931 https://github.com/python/cpython/pull/95366
I have a draft PR that implements STLS communication with already paired devices (pair through ADB or IntelliJ and then connect with adb_shell)
The only viable solutions are:
- implement a custom ctype caller for the openssl OS library (this will work only in system with newer openssl>3.0)
- use sslkeylog as a dependency https://sslkeylog.readthedocs.io/en/latest/index.html#sslkeylog.export_keying_material
- use sslkeylog as a dependency https://sslkeylog.readthedocs.io/en/latest/index.html#sslkeylog.export_keying_material
You could add that as an extra dependency (like libusb1
and aiofiles
), especially if this feature should be considered experimental or if it will only work on certain platforms.
This is an important request...