Updated: January 13, 2012
Installing and Using Motorola SDK Add-ons
A Motorola SDK add-on, when added to the Android™ SDK, allows you to run and debug your applications on an emulated Motorola handset. Note that while the device image that the add-on presents does not necessarily reflect the look of the actual device, from a functional standpoint it should be a fairly faithful emulation of the actual handset.
Installing the add-on
You can install SDK add-ons either from within or outside of MOTODEV Studio or Eclipse™. Regardless of how you install a given SDK add-on, you can use it with MOTODEV Studio, with Eclipse, or independently (typically, launched from a command line).
Installing from within MOTODEV Studio or Eclipse
- Select Android SDK Manager from the Window menu. The Android SDK Manager dialog appears.
- Near the bottom of the Android SDK Manager dialog, ensure that Updates/New is selected. Select API level (after Sort by) to group all of the available Motorola Mobility add-ons together.
If you are on a network that requires proxy authentication, MOTODEV Studio or Eclipse may only be able to download and install SDK add-ons if the proxy information (including username and password) are manually set for both HTTP and HTTPS connections (in Preferences, under General > Network Connections). If the Android SDK Manager dialog doesn't list any Motorola Mobility add-ons, navigate to the Network Connections preferences and adjust your connection preferences. Change the active provider to "Manual" and provide host, port, user, and password values for both the HTTP and HTTPS schemes.
- From the listed add-ons, select those that you wish to install by clicking the checkbox to the left of each add-on's name.
- Click Install packages.
- When prompted, review and accept the license agreement.
- If prompted to lo, supply your MOTODEV username and password.
The selected add-ons are now downloaded and installed.
Installing outside of MOTODEV Studio or Eclipse
To manually install a Motorola SDK add-on, simply download it, unzip it, and copy the resulting directory to the directory named add-ons within the Android SDK that you are using (if you are using MOTODEV Studio for Android and are not sure where it placed the Android SDK, check the SDK Location field in the Android preferences dialog).
Using the add-on
In order to run or debug your applications on an emulated Motorola handset, you must first create an AVD that has its AVD Target set to reference the SDK add-on. You can then deploy your applications to it. When creating your projects, you can either target the emulated Motorola device specifically (which you would do if your application runs only on that device), or you can select a more general, compatible target such as Android 2.2. The following sections detail the steps involved in each of these tasks.
Creating an AVD
To create an AVD named "Motorola" using the command line, do the following (you may need to be within the Android SDK's "tools" directory):
android list targets
The details for each possible target are listed, starting with a unique ID number that identifies that target. Make note of the ID number for the Motorola add-on you want to target.- android create avd -n Motorola -t target-ID
For target-ID supply the ID number for the target you obtained from the previous step.
To create an AVD named "Motorola" from within MOTODEV Studio for Android:
- Select New Android Virtual Device from the MOTODEV menu, or right-click Android Virtual Device in the Device Management view. The New Android Virtual Device dialog appears.
- Enter Motorola (or whatever name you want to give the new AVD) in the Name field, and click Next.
- From the AVD Target list, select the target named for the Motorola device you are targeting.
- If it hasn't already been done for you, select the skin named for your target device from the AVD Skin list.
- If you want the emulated device to have an SD card, in the SDCard field either specify the path and filename to a file containing an existing SD card image, or specify a size (such as 64M) to create a new, empty SD card image. Leave this field blank if the device isn't to have an SD card.
- Click Finish to close the dialog.
When creating Run or Debug configurations, you can now select this new AVD when choosing a target device.
), which is located in the top right corner of that view."Starting the AVD
From the command line, the following command will start the AVD named "Motorola":
emulator -avd Motorola
To start it from within MOTODEV Studio for Android, select the AVD from within the Device Management view and click Start. Note that if you start a Run or Debug configuration that specifies a Motorola SDK add-on AVD as the target device, the AVD will be automatically launched for you.
Targeting the Motorola device
If your application is designed specifically for a Motorola device, select the corresponding Motorola SDK add-on as the project target when creating the project.
To change an existing project so that it targets the SDK add-on from an Eclipse-based IDE such as MOTODEV Studio for Android:
- Right-click the project in the Package Explorer and select Properties.
- From the list of properties select Android.
- The project build target is shown in the right side of the dialog; select the one named for your target device.
If you are not using an Eclipse-based IDE you can change your project's target with the android update project command; see Google's developer documentation on developing in other IDEs.
Created: July 24, 2009
Updated: January 13, 2012
ECCN 5D992.b: In accordance with United States Export Administration Regulations (EAR), and specifically the Commerce Control List (CCL), this item has been classified 5D992.b. Export or re-export of this commodity and compliance with the U.S. Export Administration Regulations is ultimately the responsibility of the exporter. For more detailed information related to export or re-export of this item, please consult the EAR at http://www.access.gpo.gov/bis/ear/ear_data.html.