Build an Android x86 simulator on Windows (on)

Source: Internet
Author: User

The built-in simulator of Android SDK runs very slowly. Even if you use some methods on the Internet to allocate a relatively large memory, it still does not help. This is caused by its own architecture: the built-in simulator of the SDK runs on the arm architecture. When the simulator runs on Windows of the x86 architecture, there is an additional conversion process, as a result, the SDK simulator runs slowly on Windows. In order to run the simulator smoothly, we can think of a x86-based simulator. After my own experiments, the following methods are acceptable.

Download an Android x86 image from the http://www.android-x86.org (which may need to be turned over ). (If it is walled, you can find the relevant download under the android-x86)

You can select different versions of Android images from the Download page of the website. Note that you must select an eeepc image to run it on windows. Take Android 2.3 eeepc as an example.

 

Install Virtual Box on Windows. The author uses version 4.1.2.

Create a virtual machine project. Select Linux as the type. The version is Linux 2.6. Define a name to indicate the Project name:

Allocate memory for virtual machines. Generally, Mb is enough for Android 2.x. I allocated 1 GB of memory here.

The HDD type is used to create a virtual hard disk. Generally, 2 GB is enough for development:

Click "CREATE" to view the new Virtual Machine file in VirtualBox:

Next, edit the newly created virtual machine. Select the Virtual Machine and click "set". On the "network" Page, ensure that "enable network connection" is enabled, select "bridge nic" as the connection type, and keep the default value for the rest. The reason for this setting is to allow adb to be connected through the Virtual Machine ip address during eclipse debugging.

Like installing a virtual machine, you need to load Android iso: on the "Storage" Page, select the disk tag under "Controller: IDE, select a virtual disc from the button on the right of the "properties" tab and select the ISO of the downloaded Android 2.3 eeepc:

After that, start the VM and wait for the VM window to pop up. If other dialog boxes are displayed in the middle, click "OK" by default:

Select the last one from the boot menu to install the Android x86 system on the Virtual Machine hard disk. In the first few options, you can try Android without installing Android, similar to Ubuntu Live CD:

Create partitions for the Android x86 system:

Create a Primary-type sda partition with the maximum capacity by default (the size of the HDD previously set in VirtualBox-2 GB:

And set it to Bootable to start the mode:

After setting, do not forget to Write the above settings to the current virtual hard disk (select Write and enter yes ):

After the partition is written, Quit:

Return to the partition creation page and select the partition you just created. Then, Android x86 will be installed on this partition:

The next line is Yes, waiting for the Android system to be written to the virtual hard disk:

Finally, we need to create a virtual SD card for our Android system. Note that the allocated capacity should not use the default maximum capacity, because some of this capacity has been occupied by the system, if you allocate all the SD cards, the previous system will be installed in white. I have allocated half of the capacity, that is, 1024 M:

You can restart the instance after it is completed. Of course, if you still remember that we installed the Android system by loading iso boot in VirtualBox, you must modify the settings of VirtualBox so that the first boot of the virtual machine is the hard disk instead of the optical drive: close the current restart window and modify the VM settings in VirtualBox (on the system page, check the options in the startup sequence so that only the hard disk is selected ):

After that, you can start the Virtual Machine. Select HDPI or MDPI, but the Debug mode is generally not used:

In the pop-up dialog box during startup, click "OK" by default. The Android page is displayed!

However, you cannot click any page. The solution is to move the mouse cursor to the Android screen, press Ctrl + Home on the keyboard, and select "control"-> "prohibit automatic exclusive mouse" in the pop-up menu. Click any part of the screen to show the mouse. If you want to exit from the VM, press the right Ctrl key on the keyboard.

 

The resolution of the created virtual machine is wide-screen and cannot be flipped like the SDK simulator. If you want to make the virtual machine a normal mobile phone portrait screen, you need to modify the VirtualBox Project Settings. Refer to the next article.

 

References:

Debug Android x86 with Eclipse

Android-x86 eclipse network settings (experience)

Introduction to Android-x86-Summary of various problems

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.