Wednesday, 8 February 2012

Connecting to the Android Emulator using adb

Assuming you are carrying out Android development using Eclipse and have fired up your application with the emulator you can access the adb shell on the emulator by carrying out the following steps
  • navigate to the android sdk platform-tools folder in your command shell
  • make sure you have the emulator running
  • run adb shell from your command shell
  • you are now connected and can use normal linux commands to navigate around
The most common tasks I can think of for using the adb shell are to install additional apk files and to download and upload files to the emulator.


To upload a file to the emulator do
  • adb push <path-to-local-file> <path-on-the-device>

To download a file on the emulator do
  • adb pull <path-on-the-emulator> <path-to-local-file>

I have created a couple of Videos to demonstrate this in action

Part 1 - Connecting to the adb shell


Part 2 - Uploading and Downloading files to the emulator




No comments:

Post a Comment