3

I've batchly generated a lot of apk install package, and I need to commit them to the android app store. Since the app store requires me to provide 3~4 pictures of the screenshot for the running application, and I don't wanna do this manually. So I'm trying to use some automation script. After some research I get the MIT sikuli UI interactive programming IDE which supports JPython.

The problem I got is that I need to uninstall my previously installed app or the installation process would fail with the "INSTALL_FAILED_INSUFFICIENT_STORAGE" error. I think the best way would be to run the uninstallation in the command line, and here comes the problem. The package name of the generated batched apks all starts with some same token, let's say "com.abc.efg", while differs with some minor numbers like "com.abc.efg_123_353" or "com.abc.efg_134_324", so I'm turning to some wild-char solution like "adb uninstall com.abc.efg*", but wild-char seems not be supported with the "adb" like command set. Any clue for this?

4

2 回答 2

8

An easier solution to take screeenshots without needing to do any compilation as david's solution required (for ICS devices only) is to use the following from the command line:

adb shell /system/bin/screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png screenshot.png

This'll save the screenshot.png file in the current directory.

Tested on a Samsung Galaxy SII running 4.0.3.

于 2012-08-03T15:46:11.390 回答
0

我用小技巧解决了这个问题。我保留了之前安装的包postfix,每次需要安装新的时候,我只要调用“adb uninstall”来删除之前安装的apk。至于命令行中android设备(模拟器)的屏幕截图,她的e是某个人的解决方案。

于 2012-05-27T00:57:51.180 回答