There are two ways to create the Android simulator:
1> created through the graphical interface, click Windows->android Virtual Device Manager in Eclipse to start the graphical interface window
2> If you are not using eclipse, you can switch to the ~/tools/folder, execute "Android AVD" at the terminal, click the Create button, and you can create a new emulator.
2. Use the mirroring feature to speed up the simulator.
You may be restarting the Android emulator very slowly, so you have added a mirroring feature to save and restore the emulator state to speed up the emulator restart. Mirroring is the ability to save memory from the entire emulator process to the hard disk, and the process of recovering from mirroring is actually restoring the memory file that was previously saved to the hard disk to the memory of the emulator process. It skips the start and initialization steps of the simulator, so it starts faster.
First, you need to edit the emulator configuration to start the function, select the emulator you want to set in the emulator list, click the "Edit" button to edit it, find the snapshot (in the red box) and tick, if you need to restart the emulator, you need to check out the Launch Options dialog box two options , so instead of recovering from the image, start the emulator from the beginning.
3. Creating the emulator from the command line
In large-scale automated testing, creating with a graphical interface is obviously time consuming and laborious, so you can create it using the command line. And in Android, the image interface and command line interface are created by the same program Android, the difference is that if you pass an AVD parameter to Android, as follows: Android AVD, the graphical interface will be launched, with other parameters through the command line interface.
1) Punch-in terminal, switch to the tools directory.
2) Before you create the Android version of the simulator, you need to specify an identification number for each Android system in the Android SDK Toolkit, which can be viewed by "Android list Target".
Where Id:2 represents Android 5.0.1 This version of the identification number is 2,type:platform indicates this one standard Android version, no plug-in any other components, if the value of Type is add-on, Indicates that this is an agreed-upon version of another Android device factory, with some additional components attached.
3) command line creation avd:android Create avd-n < emulator name >-T < target Android system identification number > [-< option >< option value;]
If the creation process appears as an error prompt, look carefully is required if the--abi option, plus, and if you choose a Type:platform (Standard Android system) will ask the hardware configuration, if you need to customize then enter Yes, otherwise you can directly enter, The default does not require special customization, wait until the emulator is created.
4) You can use the "Android list AvD" to view the simulator.
5) The Android command creates a dedicated folder on the host to hold the emulator's information, including the emulator's profile, user data, and the virtual SD card. This folder does not contain Android system files, but instead indicates the target system identification number in the configuration file, so that the emulator will automatically load the system image from the Android SDK when it starts.
The android command is also in the directory. ANDROID/AVD creates an. ini file named after the emulator name for the new emulator that indicates the save address of the emulator configuration file. WIN7 is placed by default under C:\users\<user>\.android\.
The save location for this INI file can be specified with-p when creating the emulator.
An AVD (Android Virtual Device) has the following components:
1> hardware configuration: For example, whether the camera is equipped with a physical keyboard, how much memory, and so on.
2> Software configuration: Defines the version of the Android platform running on the emulator, either specifying a standard Android version or a custom Android system.
3> appearance configuration: Defines the skin used by the simulator, through the Skin Control simulator screen physical ruler appearance, you can also specify the virtual SD card used by the simulator.
4> the storage area on the host: the user data on the simulator and the virtual SD card are all stored in this place.
6) Other Android commands
Android Move avd-n < emulator name >-P < directory to move to >
Move Simulator Command: This < The directory to be moved to > do not need to lift the creation, execute the command while the creation operation.
Android Move avd-n < emulator name >-r < emulator new name >
Renaming the emulator
Android Delete avd-n < emulator name >
Delete the emulator, and delete the corresponding emulator configuration files, user data and virtual SD card and other data.
Android-h
View Android Commands
Android-h < sub-commands >
To see how individual subcommands are used
Additional:
EMULATOR-AVD < simulator name >-memory &
Start the emulator and specify the memory size, otherwise use the default settings.
ADB-E Shell Cat/proc/meminfo
To view the emulator memory size, you can modify the. android\ Emulator name \config.ini the value of hw.ramsize in the file or specify larger memory when creating the emulator.
If the emulator does not shut down after it is started, refer to the method to kill the emulator process. Using the PS aux | grep emulator ", lists the emulator processes and kills the emulator process with" Kill-9 < process id> ".
You can start multiple Android emulators at the same time, and each emulator opens a new port to communicate with the developer tool on the host, which is displayed on the title bar of the emulator process, and through the Telnet localhost < emulator port number > Connection Simulator, Enter Help to display all commands.
Two ways to create an Android simulator and an introduction to common Android commands