Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I do this in a more permanent way - instead of installing the APKs each time with <code>adb</code>, permanently add them to the system image that the emulator uses. You will need <a href="http://code.google.com/p/yaffey/">Yaffey</a> on Windows, or a similar utility on other systems, to modify YAFFS2 images. Copy <code>GoogleLoginService.apk</code>, <code>GoogleServicesFramework.apk</code>, and <code>Phonesky.apk</code> (or <code>Vending.apk</code> in older versions of Android) to the <code>/system/app</code> folder of the <code>system.img</code> file of the emulator. Afterwards I can start the emulator normally, without messing with adb, and Play Store is always there.</p> <h1>Obtaining the Google Play app from your device</h1> <p>Downloading Google Apps from some Internet site may not be quite legal, but if you have a phone or tablet with a corresponding Android version, just pull them out of your device:</p> <pre><code>adb -d root adb -d pull /system/app/GoogleLoginService.apk adb -d pull /system/app/GoogleServicesFramework.apk adb -d pull /system/app/Phonesky.apk </code></pre> <p>You must have <strong><em>root-level access</em></strong> (run adb root) to the device in order to pull these files from it. </p> <h1>Adding it to the image</h1> <p>Now start <code>yaffey</code> on Windows or a similar utility on Linux or Mac, and open <code>system.img</code> for the emulator image you want to modify. I modify most often the one in <code>[...]\android-sdk\system-images\android-17\x86</code>.</p> <p>Rename the original <code>system.img</code> to <code>system-original.img</code>. Under yaffey, copy the APK files you pulled from your device to /app folder. Save your modified image as <code>system.img</code> in the original folder. Then start your emulator (in my case it would be Android 4.2 emulator with Intel Atom processor running under Intel HAX, super-fast on Windows machines) and you'll have Play Store there. I did not find it necessary to delete <code>SdkSetup.apk</code> and <code>SdkSetup.odex</code> - the Play Store and other services still work fine for me with these files present.</p> <p>When finished with your testing, to alleviate your conscience guilty of temporarily pirating the Google Apps from your device, you may delete the modified <code>system.img</code> and restore the original from <code>system-original.img</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload