snippetbashTip
adb — Android Debug Bridge: communicate with an Android emulator instance or connected Android devices. So
Viewed 0 times
adbcommandclicommunicatewithbridgeandroiddebug
Problem
How to use the
adb command: Android Debug Bridge: communicate with an Android emulator instance or connected Android devices. Some subcommands such as shell have their own usage documentation. More information: <https://developer.android.com/tools/adb>.Solution
adb — Android Debug Bridge: communicate with an Android emulator instance or connected Android devices. Some subcommands such as shell have their own usage documentation. More information: <https://developer.android.com/tools/adb>.Check whether the adb server process is running and start it:
adb start-serverTerminate the adb server process:
adb kill-serverStart a remote shell in the target emulator/device instance:
adb shellPush an Android application to an emulator/device:
adb install -r {{path/to/file}}.apkCopy a file/directory from the target device:
adb pull {{path/to/device_file_or_directory}} {{path/to/local_destination_directory}}Copy a file/directory to the target device:
adb push {{path/to/local_file_or_directory}} {{path/to/device_destination_directory}}List all connected devices:
adb devicesSpecify which device to send commands to if there are multiple devices:
adb -s {{device_ID}} {{shell}}Code Snippets
Check whether the adb server process is running and start it
adb start-serverTerminate the adb server process
adb kill-serverStart a remote shell in the target emulator/device instance
adb shellPush an Android application to an emulator/device
adb install -r {{path/to/file}}.apkCopy a file/directory from the target device
adb pull {{path/to/device_file_or_directory}} {{path/to/local_destination_directory}}Context
tldr-pages: common/adb
Revisions (0)
No revisions yet.