Create an android simulator that can be independently distributed

Source: Internet
Author: User

What should we do if we write an Android Application and want to display it to others on a machine without the android SDK or build environment? Generally, when developing Android applications, we use simulators to run programs, either in the SDK environment or in the source code build environment. In the SDK environment, combined with eclipse and ADT, It is very convenient to use the simulator. In the build environment, you can simply use the emulator command, for more information, see download, compile, and install the latest Android source code on Ubuntu. This article introduces another method to use the android simulator in a Windows environment. It can be independently distributed and used without relying on the SDK or build environment.

To run the android simulator emulator, you only need to have four system images, namely system. IMG, userdata. IMG, ramdisk. IMG and kernel-qemu can all be obtained from the SDK environment. In addition, it is best to add the simulator skin and ADB tool so that the functions are complete. The following describes the specific manufacturing method.

1. Download the android SDK. Official download tips. This link may have been in harmony. You can search for it online and download it using other methods. After the download, run the SDK manager tool to download the complete SDK. Assume that the SDK is stored in the D: \ Android-SDK-Windows directory.

2. Create a directory. For example, create a directory D: \ androidemulator under drive D. Go to the D: \ Android-SDK-Windows \ toolsdirectory, copy emulator.exe to D: \ androidemulator, and enter the D: \ Android-SDK-Windows \ platform-toolsdirectory, beibeibeiadb.exe and adbwinapi. DLL files to D: \ androidemulator. Finally, sdkstores adb.exe and adbwinapi. dll in the D: \ Android-SDK-Windows \ tools directory.

3. Create the images directory in D: \ androidemulator to store the four system images mentioned above. For example, to create an android2.1 simulator, copy all the files in the Directory D: \ Android-SDK-Windows \ platforms \ Android-7 \ images to D: under the \ androidemulator \ images directory, the D: \ Android-SDK-Windows \ platforms \ Android-7 \ images directory contains the system. IMG, userdata. IMG, ramdisk. IMG and kernel-qemu files.

4. Create the directory skins in D: \ androidemulator to store the simulator skin files. Take the android2.1 simulator as an example. Go to the D: \ Android-SDK-Windows \ platforms \ Android-7 \ skins directory and copy all the folders to D: under the \ androidemulator \ skins directory, the D: \ Android-SDK-Windows \ platforms \ Android-7 \ skins directory contains the simulator skin file.

5. Start the command line window, enter 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 to run emulator in the background. To view other emulator Command Options, run emulator-help. In this way, the simulator will run.

6. If you want to install the APK program on the simulator, run the ADB install xxx.apk command and run the ADB install command. If the following output is displayed:

D: \ androidemulator> ADB install renju.apk
* Daemon not running. Starting it now on port 5037 *
* Daemon started successfully *
Error: Device offline

Ignore it and run it again until the prompt is successful.

In this way, if we write an Android Application and want to display it to others on a machine without the android SDK and Android Build Environment, We can package the D: \ androidemulator folder, with your Android Application, you can see it. Is it very convenient.

An android simulator created by myself can be downloaded and used:

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

Sina love question: 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 to the attention!

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.