如何在不安装 Android APK 的情况下检测其清单中的 debuggable 设置为 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是“一旦你知道怎么做就很容易”的事情之一 - 使用 aapt 工具检查清单。
该命令将为您提供 AndroidManifest.xml 文件的编译形式的转储 - 输出将类似于
(命令提示符的实际输出)在该示例中,0x0 表示 false。
This is one of those "easy once you know how" things - Use the aapt tool to inspect the manifest.
That command will give you a dump of the compiled form of the AndroidManifest.xml file- the output will look something like
(Actual output from my command prompt) in that example, the 0x0 indicates false.
显然 aapt 可以做到这一点:
将返回:
或
Apparently
aapt
can do it:will return either:
or
对于窗口用户可以使用以下命令:
将返回:
或
For window user can use following command:
will return either:
or