I need to load an app into my AVD, but Google Play isn't included in the built-in system images. What do I do to get the app so I can install it?
Step to install APK in Emulator : Step 1 -> Run the emulator step 2-> Paste the apk in SDK manager tools and platform-tools folders. Step 3->Run this command adb install AppNaem. APK . Wait for 2 min it's show Success Message.
Now, as soon as your emulator restarts you should be able to see the Google Play Store icon in the apps drawer. You can use it to download apps in the emulator or test any other functionality that you require.
Run on an emulator In Android Studio, create an Android Virtual Device (AVD) that the emulator can use to install and run your app. In the toolbar, select your app from the run/debug configurations drop-down menu. From the target device drop-down menu, select the AVD that you want to run your app on. Click Run .
You can ofcourse just run the application from the UI which will automatically install it. “To install an APK file on the emulated device, drag an APK file onto the emulator screen. An APK Installer dialog appears. When the installation completes, you can view the app in your apps list.
Please note that this package will only work for Android 4.3.
Let’s begin by launching the SDK manager. We’ll first need to ensure that Android 4.3 (API 18) is installed.
[pyoor@localhost tools]$ ./android sdk
If not, check the top level element, “Android 4.3 (API 18)”, click “Install 6 Packages”, and accept the license agreement.
Once installed, close the SDK manager and launch the AVD manager. Here we’ll need to create a new AVD which utilizes the Android 4.3 platform and has snapshots enabled so that any changes we make are persistent.
[pyoor@localhost tools]$ ./android avd
Next we need to pull down the appropriate Google Apps package. Using Android 4.3 (API 18) we must use the “20130813” package.
https://www.androidfilehost.com/?fid=23060877490000124
Once downloaded, extract the archive. In order to install Google Play, we’ll need to push the following 3 APKs to our AVD (located in ./system/app/):
GoogleServicesFramework.apk
GoogleLoginService.apk
Phonesky.apk
However, before we do, we need to make some minor modifications to our AVD. Let’s launch the newly created AVD using the following command. Note that we’ve specified a partition size of 512MB. This is to ensure that our AVD has enough capacity to install the Google Play Store and its dependencies.
[pyoor@localhost tools]$ ./emulator -avd Test -partition-size 512 -no-boot-anim
This may take several minutes the first time as the AVD is created. Once started we need to remount the AVD’s partition and modify the permissions of “/system/app/” as this is where our packages will be installed to.
[pyoor@localhost platform-tools]$ ./adb remount
[pyoor@localhost platform-tools]$ ./adb shell chmod 777 /system/app
And finally, we can push these APKs to our AVD:
[pyoor@localhost platform-tools]$ ./adb push ~/system/app/GoogleServicesFramework.apk /system/app/
[pyoor@localhost platform-tools]$ ./adb push ~/system/app/GoogleLoginService.apk /system/app/
[pyoor@localhost platform-tools]$ ./adb push ~/system/app/Phonesky.apk /system/app/
Now if your emulator is as slow as mine it may take a few minutes for the package to be installed. You’ll know if the installation hasn’t yet completed if the launcher process repeatedly crashes on you ;)
After a few minutes, we should see the Google Play package appear within the menu launcher. After associating a Google account with this AVD we now have a fully working version of Google Play running under your emulator.
Please refer to this link since goo.im
is no longer maintened: http://www.flinkd.org/2013/12/installing-google-play-on-the-android-emulator-api-18/
That should do the work.
Any reason to not use Genymotion instead of the official Android emulator?
Genymotion has virtual devices with Google Apps preinstalled. Not all of them, but a few let you load the Play Store app and download apps as if it were a real device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With