⬆️ ⬇️

Adding Google Apps to the Android emulator (Intel x86 Atom System Image)





All Android developers know how slow the emulator works. Last June, Intel introduced Android, which runs in x86 mode (without ARM emulation). And of course, the speed of the emulator has become amazing. But there are no Google Apps in the system images of these emulators (Maps, GMail, Calendar, Google Play, Google account, ...).



In this article, we will add apps from Google.



You need to install Intel Hardware Accelerated Execution Manager .

Download Google Apps (version CM 10.1)

Also, through the Android SDK, you must download the Intel x86 Atom System Image for Android 4.2.2 (API 17).

')

Create an emulator:





Run the emulator from the console with an increased system partition:

emulator -avd tablet_4.2 -partition-size 512 


Go to the folder where the archive is from Google Apps, and run the script (bash script):

 #  Google Apps   gapps unzip gapps-jb-20121212-signed.zip -d ./gapps #      adb remount #  ,       . adb shell rm /system/app/SdkSetup* #     Googe Apps adb push ./gapps/system/ /system/ #  mkfs.yaffs2.x86 (https://code.google.com/p/android-group-korea/downloads/detail?name=mkfs.yaffs2.x86) curl --remote-name https://android-group-korea.googlecode.com/files/mkfs.yaffs2.x86 #         adb push mkfs.yaffs2.x86 /system/app adb shell chmod 777 /system/app/mkfs.yaffs2.x86 adb shell /system/app/mkfs.yaffs2.x86 /system /sdcard/system.img #   SD   ( ) adb pull /sdcard/system.img #       cp system.img ~/.android/avd/tablet_4.2.avd/ 


Next, restart the emulator in normal mode. Now we have a system with a full set of Google Apps!



If a message appears that the keyboard has failed, then you can install any other.



The resulting image can be saved and used when creating new emulators on Android 4.2 (just copy it to the avd folder of the corresponding emulator). By the same principle can be done for other versions.



Successes in development!



Update:

As Cancel suggests, you can not bother with yaffs2. While the emulator is running, the file with the image of the system partition can be copied from / tmp / android- ...

Source: https://habr.com/ru/post/180507/



All Articles