1,234
edits
Changes
→emulator
Remember these commands exist so you can do things (like testing) automatically. The emulator command has many options that you don't need to be concerned with. Now that you know this command exists and the type of options it has - you'll be able to find parameters you need when you need them.
= adb =
Probably the most commonly used command. Here are the options I feel are the most important from "adb help":
<pre>Android Debug Bridge version 1.0.32
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
device commands:
adb push [-p] <local> <remote>
- copy file/dir to device
('-p' to display the transfer progress)
adb pull [-p] [-a] <remote> [<local>]
- copy file/dir from device
('-p' to display the transfer progress)
('-a' means copy timestamp and mode)
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb logcat [ <filter-spec> ] - View device log
adb install [-lrtsd] <file>
- push this package file to the device and install it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade)
(-p: partial application install)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb help - show this help message
scripting:
adb kill-server - kill the server if it is running
adb remount - remounts the /system and /vendor (if present) partitions on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader</pre>