Configuring a good Android simulator makes you no longer so disappointed with the simulator

Source: Internet
Author: User

The Android simulator is like this by default.:
The most prominent problem on the screen is obviously its ugly interface. The simulator window occupies a huge space on the screen and has a screen keyboard for no reason.

If you have never used a simulator yourself, there is another issue that is hard to find: it is almost too slow to be used! It took 5 minutes to start the simulator to take the above picture, and almost did not respond to the input event. There are three reasons to explain this problem:


1. Non-localized. The ARM architecture simulator is used by default. Although it is feasible to convert commands into x86, the conversion process is very slow.
2. Non-accelerated. Even if you select x86, Virtual Hardware acceleration is not automatically available.
3. Soft drawing. By default, GPU acceleration cannot be used, resulting in slower simulators.

The following are some solutions to these problems, so that you are no longer so disappointed with the simulator.
1. Install Intel Hardware Accelerated Execution Manager on your computer. You can find extras/intel/Hardware_Accelerated_Execution_Manager in the following Android SDK locations.
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 512 MiB.
• Skin: for mobile phone size simulators, I usually set it to 320x528. for the flat size, I use 1024x648. I will add 48 pixels in the vertical direction to set aside the space for navigation control on the screen.
• 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
Note:: After adding and configuring these hardware options, select another line in the list to confirm that the new options are automatically saved. Welcome to the hanging chad theory of uidesign.
4. Click Create AVD, but do not start immediately.
5. Because x86 images do not contain any Google APIs, I know this is a bad reason, so we need to manually add them. If you do not need Google Maps APIs, you do not need to add it.

These steps are based on the articles on this blog post.
A. you need to copy a Google Maps file. The most convenient way is to create a file named "Google APIs (Google Ins .) -Set API Level 10 as the target simulator and then kill all of them.
You can also download the files from http://goo.im/g.pdf.
B. The simulator/system area has 0 bytes by default. Although AVD manager has an option to change this value, it is actually ineffective. To solve this problem, you can exit the AVD manager, start AVD from the terminal, and specify a larger area.
$ Emulator-partition-size 512 @ AVD_NAME
(Replace the AVD-NAME with a proper name)
C. Add the Google API file 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. Let's create a new system image, so you don't need to reconfigure it every time you start AVD. Download
Mkfs. yaffs2.x86 is added to your device.
$ Adb push mkfs. yaffs2.x86/data
E. Create a New System image.
$ Adb shell chmod 755/data/mkfs. yaffs2.x86
$ Adb shell/data/mkfs. yaffs2.x86/system/data/system. img
F. Extract the new image:
$ Adb pull/data/system. img
This takes a while to complete. Now we can have two drinks at this time.
G .. put the new image system. img in your AVD directory. Here ~ /. Android/avd/AVD_NAME.avd.
$ Cp system. img ~ /. Android/avd/AVD_NAME.avd/
H. Start your AVD normally
6. Congratulations, you have an available Android simulator.


Unfortunately, this may mean that you are about to develop applications on Android. Good luck.
Recently, many exciting jobs have begun to improve the performance of simulators, especially for x86 images, hardware virtualization, and GPU acceleration. Unfortunately, not only are these features not included by default, but the AVD manager has no indication of better performance. This makes many developers unable to accept this bad experience.

When hanging out in the Git repository of the Android SDK, I noticed that many major changes to the AVD manager are in progress, so I hope this situation will change in the future. By then, I hope you can remember this article.

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.