Skip to content

Instantly share code, notes, and snippets.

@dino-su
Last active November 29, 2016 06:18
Show Gist options
  • Save dino-su/edb910730a718e589f269f29c5badc94 to your computer and use it in GitHub Desktop.
Save dino-su/edb910730a718e589f269f29c5badc94 to your computer and use it in GitHub Desktop.
Android CLI Tips

listing

$ android list sdk --all --extended

update platform tool

$ android update sdk --all --filter platform-tools --no-ui

update build tool

$ android update sdk --all --filter build-tools-24.0.1 --no-ui

update extra tools

android update sdk --all --filter tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository --no-ui

get sdk & image

$ android update sdk --all --filter android-21,sys-img-x86_64-google_apis-21 --no-ui

create avd

android create avd --target "android-21" --sdcard 100M --abi "google_apis/x86_64" --device "Nexus 4" --name "nexus4-android-21" --skin "768x1280"

faster hierarchy viewer

adb shell uiautomator dump && adb pull /sdcard/window_dump.xml && cat window_dump.xml | xmllint --format - | vim -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment