Skip to content

Instantly share code, notes, and snippets.

@renanferrari
Created January 24, 2018 16:19
Show Gist options
  • Save renanferrari/1625ba5c23dcd845daac5638b2501633 to your computer and use it in GitHub Desktop.
Save renanferrari/1625ba5c23dcd845daac5638b2501633 to your computer and use it in GitHub Desktop.
Stetho dumpapp example

Setup

  1. Clone https://github.com/facebook/stetho
  2. Launch the app

Usage

$ cd stetho-master/scripts

$ ./dumpapp -p com.facebook.stetho.sample files
Usage: dumpapp files <command> [command-options]
       dumpapp files ls
       dumpapp files tree
       dumpapp files download <output.zip> [<path>...]

dumpapp files ls: List files similar to the ls command

dumpapp files tree: List files similar to the tree command

dumpapp files download: Fetch internal application storage
    <output.zip>: Output location or '-' for stdout
    <path>: Fetch only those paths named (directories fetch recursively)

$ ./dumpapp -p com.facebook.stetho.sample files ls
cache/com.android.opengl.shaders_cache
shared_prefs/com.facebook.stetho.sample_preferences.xml
databases/apod.db
databases/apod.db-journal

$ ./dumpapp -p com.facebook.stetho.sample files tree
+---lib
+---cache
|   +---com.android.opengl.shaders_cache
+---files
+---shared_prefs
|   +---com.facebook.stetho.sample_preferences.xml
+---databases
|   +---apod.db
|   +---apod.db-journal

$ ./dumpapp -p com.facebook.stetho.sample files download - > files.zip

$ unzip -t files.zip
Archive:  files.zip
    testing: com.facebook.stetho.sample/cache/com.android.opengl.shaders_cache   OK
    testing: com.facebook.stetho.sample/shared_prefs/com.facebook.stetho.sample_preferences.xml   OK
    testing: com.facebook.stetho.sample/databases/apod.db   OK
    testing: com.facebook.stetho.sample/databases/apod.db-journal   OK
No errors detected in compressed data of files.zip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment