Implementation method of making independent Android simulator

If we write an Android application and want to show it to others on a machine without Android SDK or build environment, what should we do? Usually, when we develop Android applications, we use simulators to run the programs, either in the SDK environment or in the source code build environment. In the SDK environment, it is convenient to use the simulator in combination with eclipse and ADT. In the build environment, it is also easy to use the emulator command. For details, please refer to the article downloading, compiling and installing the latest Android source code on Ubuntu. This article introduces another method to use Android simulator in Windows environment. It does not depend on SDK or build environment and can be distributed and used independently.

To run the Android simulator emulator, you only need to have four system images, namely system img、userdata. img、ramdisk. IMG and kernel QEMU, these four files can be obtained from the SDK environment. In addition, it is better to add simulator skin and ADB tools to complete the function. The specific preparation method is described below.

I 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 deleted. You can search on the Internet and download it in other ways. After downloading, run the SDK manager tool to download the complete SDK. Suppose the SDK is placed in the D: \ Android SDK windows directory.

II Create a new directory. For example, create a new directory D: \ androidemulator under disk D. Enter the D: \ Android SDK windows \ Tools Directory and the emulator Copy exe to D: \ androidemulator, enter D: \ Android SDK windows \ platform tools directory and copy ADB Exe and adbwinapi DLL two files into D: \ androidemulator. Note that some SDKs use ADB Exe and adbwinapi DLL in D: \ Android SDK windows \ Tools Directory.

III Create a new directory images in D: \ androidemulator to store the four system images mentioned above. For example, to make Android 2 1 simulator, go to D: \ Android SDK windows \ platforms \ android-7 \ images directory, copy all the files in it to D: \ androidemulator \ images directory, and D: \ Android SDK windows \ platforms \ android-7 \ images directory contains system img、userdata. img、ramdisk. IMG and kernel QEMU.

IV Create a new directory skins in D: \ androidemulator to store the simulator skin files. Continue to make Android 2 1 simulator as an example, go to D: \ Android SDK windows \ platforms \ android-7 \ skins directory and copy all folders in it to D: \ androidemulator \ skins directory. D: \ Android SDK windows \ platforms \ android-7 \ skins directory contains simulator skin files.

V Start the command line window, enter the D: \ androidemulator directory, and execute the following commands:

Start / b means to run the emulator in the background. For other emulator command options, please execute emulator - help to view. In this way, the simulator is shipped.

Vi If you want to install the APK program on the simulator, execute ADB install XXX Apk command. When running ADB install command, if the following output is encountered:

Ignore it and run 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 Android SDK and Android build environment, we can package the folder D: \ androidemulator and bring your Android application. Is it very convenient.

The above is the introduction to the implementation process of making your own Android simulator. Thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>