I have introduced how to configure environment variables for the android SDK in "android basics using eclipse to build an android development environment and create the first Android Project". Now it is useful, we can use these Android commands directly in the Windows Command Prompt (CMD) window to assist us in development.
1. Manage the simulator device (AVD) on the command line)
Example 1: To view all installed AVD devices on the current system, enter Android list AVD, for example:
Example 2: Create a New AVD device and run the following command:
Android create AVD-n <AVD Name>-T <SDK version>-S <AVD skin>-P <AVD storage path>
For example, Android create AVD-N 1.5-T 3-s hvga
2. Run the emulator command to start the simulator.
You can use emulator.exe to start a simulator in either of the following ways:
For example, the following command:
Emulator-AVD 2.2 // run the AVD device named 2.2 here
Emulator-data userdata-qemu // here, the AVD device runs with userdata-qemu as the image file, and the image file is located in the AVD folder directory where the AVD device is saved, for example:
3. Common ADB commands
ADB is a very powerful tool. It is located in the platform-tools subdirectory of the SDK installation directory. It can replicate the simulator files and computer files, or install the APK application, you can even directly switch to the Android system to execute Linux commands.
If there is anything wrong with the above description, please make a brick!