简体   繁体   English

“等待调试器” Android Studio

[英]“Wait for Debugger” Android Studio

I am using a guide to Decompile and Debug an APK but I can not pass the last step. 我正在使用反编译和调试APK的指南,但无法通过最后一步。 Where when trying to Debug APK on my phone from Android Studio, an error appears: "Wait for Debugger". 尝试从Android Studio调试手机上的APK时,出现错误:“ Wait for Debugger”。 According to the guide I must execute the code: 根据指南,我必须执行代码:

adb forward tcp:5005 jdwp:$(timeout 0.5 adb jdwp | tail -n 1)

But since I do not have Linus (I have windows), I do not know what code I should execute. 但是由于我没有Linus(我有Windows),所以我不知道应该执行什么代码。 Thank you very much for your help! 非常感谢您的帮助!

Guide: https://malacupa.com/2018/11/11/debug-decompiled-smali-code-in-android-studio-3.2.html 指南: https//malacupa.com/2018/11/11/debug-decompiled-smali-code-in-android-studio-3.2.html

First make sure you have adb in your path. 首先,请确保您的路径中有adb。 Then open a cmd.exe and run this command: 然后打开一个cmd.exe并运行以下命令:

adb jdwp

and take note where application's debug interface is listening. 并记下应用程序的调试接口正在侦听的位置。 I'll call this value jdwp-port from now on. 从现在开始,我将这个值称为jdwp-port。

Now execute the following command: 现在执行以下命令:

adb forward tcp:5005 jdwp:jdwp-port

and you should be fine. 你应该没事的 REMEMBER to change jdwp-port with the value you got from the first command. 记住用您从第一个命令获得的值更改jdwp-port。

Good luck. 祝好运。

But since I do not have Linus (I have windows) 但是由于我没有Linus(我有窗户)

It is actually called Linux anyway. 无论如何,它实际上被称为Linux。

As a side note, you should check the official AOSP documentation on how to use GDB here: https://source.android.com/devices/tech/debug/gdb 附带说明,您应该在此处查看有关如何使用GDB的官方AOSP文档: https : //source.android.com/devices/tech/debug/gdb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM