简体   繁体   English

在不知道意图,包和活动的情况下从adb启动应用程序

[英]Launch application from adb without knowing intent, package, and activity

As a part of a research project, I'm doing method profiling work on a bunch of android applications identified as having malicious code in them. 作为研究项目的一部分,我正在对一堆被识别为包含恶意代码的android应用程序进行方法分析。 To automate the process, I've made a batch file and a java executable to decode, add the android:debuggable flag, rebuild, sign, and install the application to a test device. 为了自动化该过程,我制作了一个批处理文件和一个Java可执行文件进行解码,添加android:debuggable标志,进行重建,签名,然后将应用程序安装到测试设备上。 The next step would be launching the application. 下一步将启动应用程序。

Is there a way to do this from adb without knowing the intent, package, or activity of the application in question? 有没有办法从adb做到这一点而又不知道相关应用程序的意图,程序包或活动? I'm aware of the adb shell's 'am start' command, but this requires the package and the activity to start at the least, if I recall correctly. 我知道adb shell的“ am start”命令,但是,如果我没记错的话,这要求该程序包和活动至少要启动。

Is there a way to start the application without this information? 没有此信息,有没有办法启动应用程序? Or failing that, another method to get the package and activity and then use that in my batch file? 还是失败了,另一种获取软件包和活动然后在我的批处理文件中使用它的方法?

It would be much easier to run those on a device where adb runs as root (or the emulator), then you can attach without having to modify. 在adb以root身份运行的设备(或仿真器)上运行它们会容易得多,然后无需附加即可附加。 If you are parsing the APKs, you might as well parse the manifest and build a list of packages, intents, etc. And of course, there is not 'launching the application' in Android -- you may start an activity or service, not necessarily the main/root activity. 如果要解析APK,则不妨解析清单并构建软件包,意图等列表。当然,Android中没有“启动应用程序”-您可以启动活动或服务,而不是必须是主/根活动。 Especially for (suspected) malware, which may well be trying to hide its main activity behind an benign entry one. 特别是对于(可疑)恶意软件,它很可能试图将其主要活动隐藏在良性入侵者的背后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM