How can I determine if the Android APK debugger is set to true or false in its manifests without installing it?

As the name says, I would like to know if the APK has a debugged value of true or false on the computer without having to install it on the device, run it and see if it appears in DDMS or not.

+6
source share
3 answers

This is one of those “simple as soon as you know how” - use the aapt tool to validate the manifest.

aapt dump xmltree YourApp.apk AndroidManifest.xml | grep debuggable 

This command will give you a dump of the compiled form of the AndroidManifest.xml file - the result will look something like this:

A: android: debuggable (0x0101000f) = (type 0x12) 0x0

(Actual output from my command line) in this example, 0x0 indicates false.

+15
source

Apparently aapt can do this:

 aapt l -a app.apk | grep debuggable 

will return either:

 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff (means debuggable is true) 

or

 A: android:debuggable(0x0101000f)=(type 0x12)0x0 (means debuggable is false) 
+9
source

For the window user, you can use the 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. 
+2
source

Source: https://habr.com/ru/post/901676/


All Articles