The sections below describe other tools that you can use when building Android applications.
All of the tools are included in the Android SDK and are accessible from the <sdk>/tools/
directory.
The android tool is a script that lets you create and manage Android Virtual Devices (AVDs) and, if you are developing using Ant, generate template Android projects to help you get started quickly.
For information about how to use the android tool to manage AVDs, see Android Virtual Devices.
For information about how to use the android tool to create or update a project, see Developing in Other IDEs.
Note that if you are developing in Eclipse with the ADT plugin, you will use the android tool to manage the AVDs you create, but you will not use the android tool for creating a project. The ADT plugin provides a New Project Wizard that helps you set up an Android project in Eclipse.
If you are developing in Ant, you will use the android tool to manage your AVDs, and you can also use it to create or update a project.
Note: The android tool replaces the activitycreator tool provided in previous SDK releases.
The mksdcard tool lets you quickly create a FAT32 disk image that you can load in the emulator, to simulate the presence of an SD card in the device. Here is the usage for mksdcard:
mksdcard [-l label] <size>[K|M] <file>
The table below lists the available options/arguments
Argument | Description |
---|---|
-l |
A volume label for the disk image to create. |
size |
An integer that specifies the size (in bytes) of disk image to create.
You can also specify size in kilobytes or megabytes, by appending a "K" or "M" to <size>. For example, 1048576K , 1024M . |
file |
The path/filename of the disk image to create. |
Once you have created the disk image file, you can load it in the emulator at startup using the emulator's -sdcard option. For more information, see Android Emulator.
emulator -sdcard <file>
The dx tool lets you generate Android bytecode from .class files. The tool converts target files and/or directories to Dalvik executable format (.dex) files, so that they can run in the Android environment. It can also dump the class files in a human-readable format and run a target unit test. You can get the usage and options for this tool by using dx --help
.