Friday, September 3, 2010

Installing and using Android Debug Bridge (adb)

Android debug bridge is a small utility that allows you to run linux commands, install softwares, import/export files from your android device without having to mount the internal disk from your device. This utility comes with the standard SDK (Software Development Kit) and have either the Windows or Linux variant.

Preparing your device. Before you can use adb, you need to set your device on development mode to accept commands from adb. To do that, follow the given steps below:-
  1. From the MAIN screen of your device
  2. Press the MENU button
  3. Click on SETTINGS
  4. Click on APPLICATIONS
  5. Click on DEVELOPMENT
  6. Check "USB debugging"
  7. Alternatively you may also wish to check "Stay awake" to make sure the device stays on when USB is connected
Steps to install adb:-
  1. Download the Android SDK for your platform here. http://developer.android.com/sdk/index.html
  2. If you are planning to run ADB from within Windows platform. Download the USB driver here http://developer.android.com/sdk/win-usb.html
  3. Download and follow the instructions on how to install Windows USB from the link given in step 2
  4. Once you're done, extract the Android SDK into a directory
  5. Using command prompt or terminal, change directory (cd) into the android-sdk-xxxx/tools (where xxxx is the platform; linux, windows or mac)
  6. Run "adb" as it is to see all available help commands
Common adb commands:-
  • adb devices (list the devices connected to your pc)
  • adb push (puts a file into your device)
  • adb pull (export a file from your device)
  • adb install (Install a downloaded application which has the apk extension)
  • adb reboot (reboots your device)
  • adb reboot recovery (reboot into recovery mode)
  • adb reboot download (reboot into download mode)
  • adb shell (shell into your device)
Feel free to read more from the adb help by just typing "adb" as it is.

No comments:

Post a Comment