Configure a handy Android emulator so you're not so disappointed with the simulator _android

Source: Internet
Author: User
By Default, the Android simulator is the one below.
See the most conspicuous problem with this screenshot is obviously its ugly interface. The simulator window occupies a huge space on the screen, and there is no reason to put a screen keyboard.

If you haven't used the simulator yourself, there's a problem that's not easy to spot: it's almost too slow to use! It took 5 minutes to get the emulator started, and almost no response to the input event. There are 3 reasons to explain the problem:

 
1. Non-localized. The default is to use the ARM architecture emulator, although it is feasible to convert the instructions to x86, but the conversion process is very slow.
2. Not accelerated. Even if you choose X86, virtual hardware acceleration is not automatically available.
3. Soft Drawing. GPU acceleration is not available by default, which causes the emulator to be slower.

Here are some ways to solve these problems so that you are no longer so disappointed with the simulator
1. Install Intel hardware accelerated Execution Manager for your computer, which can be found in the following Android SDK locations: Extras/intel/hardware_accelerated_ Execution_manager.
2. Start Android Virtual Device Manager
$ Android AVD
3. Click New to configure the following information:
target:android 4.1–api Level 16.
Cpu/abi:intel Atom (x86).
SD card:size of the MiB.
skin: For the size of the phone simulator, I generally set to the x528. For the size of the flat, I use 1024 x 648, in the vertical direction I will add 48 pixels to leave the navigation control on the screen space.
Hardware:
Change these defaults:
Abstract LCD density 160
• Click New ... Set the following options:
Hardware Back/home Keys:no
Keyboard Support:yes
SD Card Support:yes
GPU Emulation:yes
Attention: After adding these hardware options, select a row in the list to confirm that the new option has been saved automatically. Welcome to the hanging Chad theory of UI design.
4. Click Create AVD, but do not start immediately.
5. Since x86 mirrors do not contain any Google APIs, I know this is a bad reason, so we have to add them manually. If you do not need Google Maps APIs, you can not add.

These steps are based on this blog post. The article on the
A. You need to copy a Google Maps file, the easiest way is to create a "Google APIs" (Google Ins.) -api level 10 "as the target simulator, and then kill them all."
You can also download those files from Http://goo.im/gapps.
B. The simulator/system area defaults to 0 bytes, although the AVD Manager has an option to change this value, but in fact it is ineffective. To resolve this problem, you can exit the AVD Manager and then start the AVD from the terminal, specifying a larger area.
$ emulator-partition-size @AVD_NAME
(replace Avd-name with a suitable name)
C. Add Google API files to your virtual device:
$ adb remount
$ adb Push com.google.android.maps.xml/system/etc/permissions
$ adb Push com.google.android.maps.jar/system/framework
D. We'll do a new system image next so we don't have to reconfigure it every time we start AVD. Download
Mkfs.yaffs2.x86 is then added to your device.
$ adb Push Mkfs.yaffs2.x86/data
E. Create a new system mirror.
$ adb shell chmod 755/data/mkfs.yaffs2.x86
$ adb shell/data/mkfs.yaffs2.x86/system/data/system.img
F. Extraction of new mirrors:
$ adb pull/data/system.img
It takes a while to get it done. Now it's time to drink two cups.
G.. Put the new mirror system.img in your AVD directory. ~/.ANDROID/AVD/AVD_NAME.AVD here.
$ CP system.img ~/.android/avd/avd_name.avd/
H. Normal start-up of your AVD
6. Congratulations, you've got a usable Android simulator.


Unfortunately, this could mean that you're about to develop Android apps. Good luck to you.
Many of the most exciting recent efforts to improve emulator performance have started, especially in x86 mirroring, hardware virtualization, and GPU acceleration. Unfortunately, not only are these features not included by default, but the AVD manager also has no indication that there is better performance. This has made many developers unable to accept this terrible experience.

While lounging in the Android SDK Git Warehouse, I noticed that many of the big changes to the AVD Manager are in progress, so hopefully this will change in the future, and hopefully you will remember this article well.

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.