Installing an Application

You can use adb to copy an application from your development computer and install it on an emulator/device instance. To do so, use the install command. With the command, you must specify the path to the .apk file that you want to install:

adb install <path to apk>

For more information about how to create an .apk file that you can install on an emulator/device instance, see Android Asset Packaging Tool (aapt).

Here's an example showing the devices command and its output:

$ adb devices

List of devices

attached

emulator-5554

device

emulator-555 6

device

emulator-555 8

device

Note that, if you are using the Eclipse IDE and have the ADT plugin installed, you do not need to use adb (or aapt) directly to install your application on the emulator/device. Instead, the ADT plugin handles the packaging and installation of the application for you.

0 0

Post a comment