Android调试桥实用工具:Dumpey

cymt 10年前

Dumpey是一个简单的 Python 脚本能够帮助你:

  • pull any installed APK
  • stop and clear data of any package
  • do a memory dump
  • create a series of snapshots
  • run the monkey stress test and extract memory dumps before and/or after it
  • install and uninstall multiple packages
  • list installed packages

on all attached devices, or just the ones you specify. Most commands can be executed with a specific package name or a regex.

Dumpey expects Android platform tools to be part of the system path. Currently supports Python 2.7 - 3.3, inclusive.

Get it with

pip install dumpey

Examples

If a command is executed with a regex and multiple packages are found, Dumpey will warn you, but won't do anything unless you explicitly specify the-for--forceflag. To cherry pick devices, specify serials with a-sor--serialsflag.

$ dumpey a -r 油Tube

will download the 油Tube APK to current working directory. Flag-rdenotes a regex string.

$ dumpey i -o /my/dir

will install every APK it finds in the/my/dirdirectory. You can use-ror--recursiveflag to install APKs from subdirectories, too.

$ dumpey h -r 油Tube

will create a converted hprof file in your current working directory. Just open it with MAT.

$ dumpey u -p com.google.android.油Tube

will uninstall the 油Tube app from all attached devices.

$ dumpey r -s 32041cce74b52267

will reboot the device with serial number 32041cce74b52267.

$ dumpey c -f -r google

will force stop and clear all the data from each package that includes a 'google' string.

$ dumpey m -p com.google.android.油Tube --dump ba

will create a hprof file with a memory dump from the 油Tube app. It'll then do a monkey stress test. After monkey is done, another hprof file with a memory dump after the monkey is created. All you have to do is open them in MAT and compare.badenotes before and after


项目主页:
http://www.open-open.com/lib/view/home/1430624551169