jadx
jadx copied to clipboard
[gui] Smali debugger: Failed to init debugger
Debugger won't work on any app. When I click "Launch App", it first logs "Starting debugger..." and then "Failed to init debugger" In the debugger:
jdwp handshake failed
(Yes the app is debuggable and in "Waiting for debugger" mode) Jadx version: 1.3.4 OS: Ubuntu
@Mino260806 as discussed in #1412 downgrading ADB to previous version may help.
@jpstotz, @RebootSTR can anyone post a version of ADB which still work and/or which version don't work? So I can add that info to the debugger wiki page.
@skylot I tested some adb versions, but it seems like the adb commands like adb -L tcp:5037 start-server
and some of the protocol commands don't allow an adb version that is too old. In the end I found out that connecting to the debugger via adb seems to be an exclusive operation. That means if you have one other program running that keeps the connection open Jadx will fail to connect to the app.
For example I had once installed the Android plugin into IntelliJ, that plugin seems to automatically connect to all attached devices and thus block them. Even killing adb server had no effect as the plugin automatically restarts adb and performs a reconnect. An running instance of Android Studio (with an open project) also has the same effect.
So at the moment I am running adb 33.0.0-8141338, v33.0.1-8253317 also works fine for me as long as the Android plugin is disabled and Android Studio closed.
connecting to the debugger via adb seems to be an exclusive operation
@jpstotz thanks for that research! Debugger wiki page already has that notice, so maybe we also need to add such notice in error message if jdwp handshake failed or maybe try to detect if ADB is already used before connection.
@skylot Unfortunately I have not understood yet how Android Studio establishes the jdwp connection. At least it does not use the adb forward
way Jadx uses. May be I look into Google's ddmlib library source code. I would assume that it contain the code to establish the adb connection used by Android Studio.
I had this problem too, and switching to latest v33.0.1 adb solved the problem
Solved this problem by closing Android Studio, killing the ADB server, and using the ADB binary from the android-tools
package instead of the one provided by the SDK.
I used version : Android Debug Bridge version 1.0.41 Version 33.0.3-8952118 but it still not work