8

Is it somehow possible to send automated intents to an app inside an emulator for testing?

I have a list of all my intents and I want to test them automaticily, so is it possible to just do a adb shell <myfancycommand> android.intent.action.PACKAGE_ADDED to initiate the android.intent.action.PACKAGE_ADDED action on the device? Or do I have to write a script that calls all the stuff by its own, so for example for this intent install a dummy apk on the device?

4

2 回答 2

5

更简单的是am应用程序的使用。

您可以从 adb shell 中像这样运行它:

# am broadcast android.net.conn.CONNECTIVITY_CHANGE
Broadcasting: Intent { act=android.intent.action.VIEW dat=android.net.conn.CONNECTIVITY_CHANGE }
Broadcast completed: result=0
# am broadcast android.intent.action.BOOT_COMPLETED
Broadcasting: Intent { act=android.intent.action.VIEW dat=android.intent.action.BOOT_COMPLETED }
Broadcast completed: result=0
于 2012-06-11T12:02:33.657 回答
0

找到了这个 APK: http: //isecpartners.com/mobile-security-tools/intent-fuzzer.html它确实会向应用程序发送空值以查看它们是否失败。因为源是可用的,您可以轻松地将其更改为一些随机值,看看您是否得到一些响应!

于 2012-05-10T08:54:14.470 回答