How to Install Android Market App on the Emulator

Installing Android Market App on Emulator

Android market application cannot be directly downloaded to a computer. But there may be some alternative sites that provide the .apk file of the application. Search in Google. If you got that .apk file downloaded in your system, you can easily install that by the following steps. I usually do like this.

  • First of all copy the .apk file to the android sdk --> 'platform-tools' directory

  • To start the emulator use type the following command on your terminal

    cd /path_to_android_sdk/platform-tools // press enter

    then type the following to start the emulator

    emulator -avd <emulator_name> // press enter

<emulator_name> is the name that you have given when you first created that emulator. If you don't know that name, go to eclipse and click window-->Avd and Sdk manager. On that window you can see the AVD name.

After that wait for a couple of minutes so that the emulator starts. After that, unlock the emulator:

  • Open another tab in terminal or open another terminal and type the following commands

    cd /path_to_android_sdk/platform-tools; ls //press enter

    Now you should see your application name.

    adb install <name_of_the_apk> // press enter
    ./adb install <name_of_the_apk> // for MAC machine

After that you can see a success message.

  • Eventually press on the menu launcher button on the emulator where you can see your application installed. Click on the icon to launch that application.

How to install android market on emulator

As you told me you need this for test-purpose, I think it isn't worth the trouble. Don't you know any person with an Android device to test it? I know this isn't the answer you expect - but as it is recommended to test on a real device anyhow - here my suggestion:

I've been using this code in a few apps which are in the market and it works fine:

public static void goToMarket(Context context){
Intent it = new Intent(Intent.ACTION_VIEW);
it.setData(Uri.parse(context.getString(R.string.playstorelink)));
context.startActivity(it);
}

The link in the string could look like this: market://details?id=com.google.zxing.client.android

To prevent this code from crashing on the emulator (obviously there is no PlayStore) you can wrap this code in a try catch blog:

catch (ActivityNotFoundException e) {
// Do something
}

How to install android market on emulator for all api's

As the person above says, it is not available, but you could extract the apk from the file explorer.

I used this method to install market on api 4 and 8:

If you are using windows, change the "/" to "\" and just type
"android" instead of "./android"

1) go to android sdk path and create a new machine:
* type this in terminal:
cd "/home/<username>/.eclipse/android-sdk/tools"
* then this
./android
* then click on Tools -> Manage AVDs...
* create a new machine

2) start the machine and set the partition size
* go to this path:
cd "/home/<username>/.eclipse/android-sdk/tools"
* open the machine (keep the terminal open)
./emulator @<machine name> -partition-size 96

3) modify some files, root and install apps
* go to this path:
cd "/home/<username>/.eclipse/android-sdk/platform-tools"
* pull the 'build.prop' file in the platform-tools folder
./adb pull /system/build.prop
* remove this line: 'ro.config.nocheckin=yes' and save
* mount the partition to that we can write to it
./adb remount
* replace the edited file
./adb push build.prop /system/build.prop
* install the apps
./adb install "/home/<username>/Emulator files/GoogleServicesFramework.apk"
./adb install "/home/<username>/Emulator files/Gmail.apk"
./adb install "/home/<username>/Emulator files/Vending.apk"

4) root the phone
* go to this path:
cd "/home/<username>/.eclipse/android-sdk/platform-tools"
* mout system files
./adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
* put script for su in system
./adb push "/home/<username>/Emulator files/su" /system/xbin/su
* make system folder writeble
./adb shell chmod 06755 /system
./adb shell chmod 06755 /system/xbin/su
* install super user app to manage permissions
./adb install superuser.apk

5) if apps are not showing in the market:
* go to applications -> manage applications in the emulator
* click on google services framework -> force stop and delete cache
* click on market -> force stop and delete data + cache
* restart device

Android: Installing the Market app on the emulator?

Yes, you can. See my answer to this question, re-quoted below:

This 2 part video walks you through
how to get the marketplace and the
gmail app onto an android 2.2
emulator:
http://www.youtube.com/watch?v=Xe-jA3l3QNA

This link also covers it
(http://anythingsimple.blogspot.com/2010/09/how-to-use-android-market-on-android.html)
but I found the video to be a bit more
useful.

How to install Google Play Market on tablet - Android emulator?

As explained in this answer, https://stackoverflow.com/a/62680047/9905408

You should create a new emulator, before opening it for the first time follow these 3 easy steps:

1- In the AVD Manger go in the Actions overflow menu of the newly created emulator and click on "show on disk". Open "config.ini" with a text editor.

2- change "PlayStore.enabled=false" to "PlayStore.enabled=true"

3- change "image.sysdir.1 = system-images\android-30\google_apis\x86"

to

"image.sysdir.1 = system-images\android-30\google_apis_playstore\x86"

How to install an app from Android market to Android simulator?

Android Market is not available on emulators for security reasons. You may install APKs. Refer to Android Debug Bridge.



Related Topics



Leave a reply



Submit