Tuesday, 5 February 2013

ADB Commands

ADB stands for Android Debug bridge. it's a command line tool that lets you communicate with an emulator instance or connected Android-powered device. You can find the adb tool in <sdk>/platform-tools/. Following are some of the useful adb commands.

adb devices  - lists all the connected devices / emulators
adb help - lists the adb commands
adb version - prints the adb version

Instaling / Uninstalling Apps & Uploading / Removing Files:

adb install <apk path>
adb uninstall <apk path>
adb pull <remote destination> <local destination>
adb push <location path> <remote /destination path>

Starting/Stopping adb server:

adb start -server - starts the adb server if it's not running already
adb kill -server  - stops the adb server

For collecting logs:

adb logcat –v time > <path/filename.txt>
adb logcat  <path\'filename.txt'>
adb shell logcat -v time > filename.txt

To remove files:

adb shell rm <destination/filename>
Ex: adb shell rm /sdcard/.Example/example.txt


No comments:

Post a Comment