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

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

    In this article we will add applications from Google.

    You must install Intel Hardware Accelerated Execution Manager .
    Download Google Apps (version CM 10.1)
    Also, via the Android SDK you need to download Intel x86 Atom System Image for Android 4.2.2 (API 17).

    Create an emulator:

    Run the emulator from the console with an enlarged system partition:
    emulator -avd tablet_4.2 -partition-size 512

    We go to the folder where the archive with Google Apps is, and run the script (bash script):
    # извлечение Google Apps в папку gapps
    unzip -d ./gapps
    # перемонтирование системного раздела для записи
    adb remount
    # Удаление пакета, который сбрасывает все настройки при запуске эмулятора.
    adb shell rm /system/app/SdkSetup*
    # Копирование системных приложений из Googe Apps
    adb push ./gapps/system/ /system/
    # Скачиваем mkfs.yaffs2.x86 (
    curl --remote-name
    # Записываем его в эмулятор и делаем образ системы
    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. We now have a full Google Apps system!

    If a message appears that there is a malfunction in the keyboard, 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). The same principle can be done for other versions.

    Good luck in the development!

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

    Also popular now: