如何在未安装Android APK的清单中检测其可调试设置为true或false? [英] How can I detect whether an Android APK has debuggable set to true or false in its manifest without installing it?

查看:200
本文介绍了如何在未安装Android APK的清单中检测其可调试设置为true或false?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,我希望能够找到APK在计算机上是否具有可调试设置为true或false,而不必将其安装在设备上,运行它并查看它是否显示在DDMS或不是.

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.

推荐答案

这是一旦知道就很容易"的事情之一-使用aapt工具检查清单.

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

该命令将为您提供AndroidManifest.xml文件的已编译形式的转储-输出将类似于

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)=(类型0x12)0x0

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

(在我的命令提示符下的实际输出)在该示例中,0x0表示false.

(Actual output from my command prompt) in that example, the 0x0 indicates false.

这篇关于如何在未安装Android APK的清单中检测其可调试设置为true或false?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆