Dumpey


Source link: https://github.com/tslamic/Dumpey

Dumpey is a simple Python script that helps you

  • 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 -f or --force flag. To cherry pick devices, specify serials with a -s or --serials flag.

$ dumpey a -r youtube 

will download the Youtube APK to current working directory. Flag -r denotes a regex string.

$ dumpey i -o /my/dir 

will install every APK it finds in the /my/dir directory. You can use -r or --recursive flag to install APKs from subdirectories, too.

$ dumpey h -r youtube 

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

$ dumpey u -p com.google.android.youtube 

will uninstall the Youtube 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.youtube --dump ba 

will create a hprof file with a memory dump from the Youtube 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. ba denotes before and after

But wait, there's more!

Here's the list of all Dumpey commands:

usage: dumpey.py [-h] {
i,u,a,c,r,h,l,m,s
}
 ...  Dumpey, an Android Debug Bridge utility tool.  optional arguments:
-h, --help

  show this help message and exit  dumpey commands:
{
i,u,a,c,r,h,l,m,s
}
  commands
  i

install APKs from path
  u

uninstall apps
  a

download APKs
  c

stop and clear package data
  r

reboot devices
  h

do a heap dump
  l

list installed packages
  m

run the monkey
  s

make snapshot 

each command accepts a -h or --help flag which'll tell you the various ways to use Dumpey.

Dumpey can also serve as a library, since it enables you to interact with the ADB, with some of the plumbing taken care of.

Install

pip install dumpey

Have a suggestion, a fix, a complaint or feature request?

Open an issue, or better yet, create a pull request!

License

The MIT License (MIT)

Copyright (c) 2015 Tadej Slamic

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Resources

If you use RxJava2, you know the StackTrace it builds will tell you very little when an exception happens.

Whether you handle the exception or let it crash your app, RxJava2Debug will give you a clear and precise StackTrace pointing to the exact line of code which caused the exception.

An example project / library of animation-supported Toolbar widget.

This is contains below components:

  • AnimatedToolbar
  • AnimatedToolbarActivity
  • AnimatedToolbarHelper
  • ActionBarWrapper

Custom ViewGroup for browse badge with count of some products.

Simple library to pull updated details of applications using their package name from Google Play Store.

Medal can be used to add medal effect to your Android views.

A view that can rolling automatic within child views list.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes