As the title says, I'd like to be able to find whether an APK has debuggable set to true or false on a computer without having to install it on the device, run it and see whether it shows up in DDMS or not.
Asked
Active
Viewed 1.0k times
3 Answers
20
This is one of those "easy once you know how" things - Use the aapt tool to inspect the manifest.
aapt dump xmltree YourApp.apk AndroidManifest.xml | grep debuggable
That command will give you a dump of the compiled form of the AndroidManifest.xml file- the output will look something like
A: android:debuggable(0x0101000f)=(type 0x12)0x0
(Actual output from my command prompt) in that example, the 0x0 indicates false.

Alexander Lucas
- 22,171
- 3
- 46
- 43
-
Thanks, I just found an alternate method with `l -a` too. – kabuko Nov 17 '11 at 01:46
-
3If you want to know the state of the debuggable flag in the manifest you can do as @Alexander suggests. However, if you want to know if an apk is actually debuggable, you also need to see if the `grep` is empty. If your manifest has no debuggable flag, it will default to false. From the docs: `You can disable debugging by removing the android:debuggable attribute from the
tag in your manifest file, or by setting the android:debuggable attribute to false in your manifest file.` You can always just look at the whole manifest by removing `| grep debuggable` from the above code. – tir38 Jun 22 '14 at 02:01
5
For window user can use following command:
aapt l -a <apk with path> | findstr debuggable
will return either:
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
-> this means debuggable is true.
or
A: android:debuggable(0x0101000f)=(type 0x12)0x0
-> this means debuggable is false.

BSavaliya
- 809
- 1
- 16
- 26
-
5
-
2If it returns nothing, that means the `debuggable` flag is not explicitly set, so the debuggable flag defaults to false, according to the android docs: https://developer.android.com/guide/topics/manifest/application-element – Norman Breau May 22 '20 at 12:38