Make an android emulator that can be distributed independently

Source: Internet
Author: User

Article reprinted to CSDN community Luo Shenyang's Android tour, original address: http://blog.csdn.net/luoshengyang/article/details/6586759

What if we wrote an Android app and wanted to show it to someone in a machine without an Android SDK or build environment? Typically, when we develop an Android application, we use the emulator to run the program, either in the SDK environment or in the source build environment. In the SDK environment, with Eclipse and ADT, the use of the simulator is very convenient, and in the build environment, it is very simple to use the emulator command, you can refer to the Ubuntu download, compile and install the latest Android source code article. This article describes another way to use the Android emulator under Windows, which does not depend on the SDK or build environment and can be distributed and used independently.

To run the Android emulator emulator, as long as there are 4 system images can be, respectively, system.img, Userdata.img, Ramdisk.img and Kernel-qemu, these 4 files can be obtained from the SDK environment, in addition, it is best to add emulator skins and ADB tools, so that the function is complete. Specific methods are described below.

One. Download the android SDK. Official download Http://dl.google.com/android/android-sdk_rXX-windows.zip,XX refers to the version number you want to download, for example, I downloaded 08. This link may have been harmonized, can be searched on the Internet, in other ways to download. After downloading, run the SDK Manager tool and download the full SDK. Suppose the SDK is placed in the D:\android-sdk-windows directory.

Two. Create a new directory, for example, create a new directory D:\AndroidEmulator under the D drive. Enter into the D:\android-sdk-windows\tools directory, copy the Emulator.exe to D:\AndroidEmulator, and go to D:\android-sdk-windows\ Platform-tools directory, copy adb.exe and AdbWinApi.dll two files to D:\AndroidEmulator. Note that some SDKs put Adb.exe and AdbWinApi.dll in the D:\android-sdk-windows\tools directory.

Three. Create a new directory images in D:\AndroidEmulator to store the 4 system images mentioned above. For example, to make a Android2.1 simulator, go to the D:\android-sdk-windows\platforms\android-7\images directory and copy all the files inside the D:\AndroidEmulator\ Under the images directory, the D:\android-sdk-windows\platforms\android-7\images directory contains system.img, USERDATA.IMG, Ramdisk.img and Kernel-qemu these 4 files.

Four. In D:\AndroidEmulator new directory skins, used to store the simulator skin files. Continue to make Android2.1 Simulator for example, to the D:\android-sdk-windows\platforms\android-7\skins directory, all the folders inside copy to D:\AndroidEmulator\ In the skins directory, the D:\android-sdk-windows\platforms\android-7\skins directory contains the emulator skin files.

Five. Start the Command Line window and go to the D:\AndroidEmulator directory and execute the following command:

d:\androidemulator>start/b emulator.exe-sysdir D:\AndroidEmulator-system images\system.img-data images\ Userdata.img-ramdisk images\ramdisk.img-kernel images\kernel-qemu-skindir D:\AndroidEmulator\skins-skin HVGA

start/b indicates that emulator is running in the background, and the other emulator command options perform emulator-help viewing. In this way, the simulator is shipped up.

Six. If you want to install the APK program on the emulator, execute the ADB install xxx.apk command when running the ADB install command if you encounter the following output:

d:\androidemulator>adb Install renju.apk
* Daemon not running. Starting it now on Port 5037 *
* Daemon started successfully *
Error:device offline

don't bother, run again until the prompt is successful.

This way, if we write an Android app and want to show it to someone without the Android SDK and Android build environment, you can package D:\AndroidEmulator this folder, With your Android app, you can show it, isn't it convenient.

Attached to my own production of a Android2.1 simulator, can be downloaded using:

Programmer's Joint Development Network: http://www.pudn.com/downloads367/sourcecode/comm/android/detail1590288.html

Sina Love Q: part-1:http://ishare.iask.sina.com.cn/f/16902616.html

Part-2:http://ishare.iask.sina.com.cn/f/16902614.html

Lao Luo's Sina Weibo: Http://weibo.com/shengyangluo, welcome attention!

Make an android emulator that can be distributed independently

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.