Reputation: 20242
I have a real Android device that I am using to debug. In order to attach Android Studio to my application, I ran this on the device:
adb shell am set-debug-app -w my.package.name
This worked fine. However, the problem is that now, whenever I try to open the application on my device, it will wait for the debugger to attach.
Waiting for Debugger
My Application (my.package.name) is waiting for the debugger to attach.
This happens even after I disconnect the device from my computer. Also, I restarted my device and nothing changed.
This is definitely not related to Android Studio, because my device is not connected to Android Studio, so any solution involving restarting Android studio would not work.
After looking at this page, I tried:
adb shell am force-stop my.package.name
This stops the application. But when I reopen it, it still waits for the debugger to connect.
So, any idea how I can remove this debug hook?
Upvotes: 4
Views: 2189
Reputation: 6866
You can set/clear the debug app through Developer Options in your device settings.
If you want to do it through adb, it looks like you could do am clear-debug-app
to clear it: http://androidxref.com/8.0.0_r4/xref/frameworks/base/services/core/java/com/android/server/am/ActivityManagerShellCommand.java#166
case "set-debug-app":
return runSetDebugApp(pw);
case "clear-debug-app":
return runClearDebugApp(pw);
Upvotes: 6