How to install android market (android market for emulator, download android market apk file)(★★★)

Posted: January 3, 2011 in Android

Android Emulator is a virtual mobile that is packaged along with the Android SDK. It runs on your computer and can be used to prototype, develop and test applications without having to buy a physical device. Almost all of the hardware and software features of a typical mobile device are mimicked in the Android emulator. However, if you want to try out some apps from the Android market, you can’t do that with the emulator as it does not include ‘Android market’. Here is a step-by-step guide to enable Android market in the emulator.

Steps to enable Android market in the emulator

1. Download and install the latest Android SDK (Android 2.2, API 8, revision 2) from here. This comes up with all the tools needed for development and testing of your application. Make sure the driver ‘ADB interface’ is installed on your machine. In most of the cases, the driver will be installed directly once you plug-in the device. [The SDK installation location will be referred to as SDK_LOCATION in the rest of the article]

2. Next step is to create a Android Virtual Device. Select ‘Virtual Devices’ from the left pane of the Android SDK and AVD Manager. Create a new virtual device with the details mentioned in the screenshot below. The screen might be frozen for few minutes while the virtual device is being created.

 

3. After the device is created, go to the location ‘%userprofile%/.android/avd’. You will find a folder named ‘DemoDevice.avd’. Copy the system image ‘system,img’ from ‘SDK_LOCATION/platforms/android-8/images’ to the folder ‘DemoDevices.avd’.

4. Start the emulator specifying the partition size. From cmd: emulator –avd DemoDevice –partition-size 100. (100 MB will be allotted for user space). Emulator opens up and it looks like the one below. Note: If the command emulator is not recognized, add SDK_LOCATION/tools to the PATH variable.

5. From cmd, execute ‘adb pull /system/build.prop .’. This will copy the file build.prop to your current working directory. Open it with your favorite text editor and change the property ‘ro.config.nocheckin=yes’. This is needed to fix the freezing of market downloads. Related article.

6. Now, we have to push back the modified build.prop. This is not as easy as pulling it out. First, you have to mount the /system partition in read-write mode. Check out this to know how to do that. After the partition is remounted, execute the adb push command to push back the build.prop ‘adb push build.prop /system/.

7. The next thing is to install the Market application. Download ‘Vending.apk’ from this thread. Google Services framework is a pre-requisite for Android market. To get ‘GoogleServicesFramework.apk’, download upload.zip from here and extract the zip to find the .apk file inside /system/app. Push both these .apk to the device. ‘adb push Vending.apk /system/app/.’ ‘adb push GoogleServicesFramework.apk /system/app/.’. Also, delete the  SdkSetup.apk from the device. ‘adb shell rm /system/app/SdkSetup.apk’. Make sure the SdkSetup.apk is deleted otherwise the emulator will be reverted back to its original stage.

8. Close the emulator. Delete the images userdata.img, userdata-qemu.img and cache.img from ‘%userprofile%/.android/avd/DemoDevice.avd’. Start the emulator again from Android SDK and AVD Manager. Android Market will be available on the emulator now. On opening the market, you will be prompted to connect with your Google account. Connect with your Google account and install your favorite apps on the emulator.

 

Note: Installation of apps from Android market seems to be very slow in the emulator. Market app crashed couple of times before I get the chance to install the apps. Also, I could not find the most popular Android game ‘Angry Birds’ in the market. Installing the same from its .apk didn’t work either. I am trying to tweak the emulator to make it work smoothly with Android Market. If you have any tips for the same, please post them as comments here.

Update: Uttam Hoode has tried this approach with Android 2.3 SDK and it worked fine. 

 
 

Artical from: http://blog.varunkumar.me/2010/11/how-to-install-android-market-in-google.html

=====================================================================

Step 4, there I explain my situation.
I put the SDK on my desktop. So when I link the folder. I do like this:

C:\Users\Ethan\Desktop\Android\android-sdk_r08-windows\android-sdk-windows\tool
s> emulator.exe -avd Android -partition-size 100

There, if you didn’t put the SDK on desktop, you could use “cd” to change the folder to your tools existing folder. Such as:
C:\user\Administors\ cd d:\Documents\
It will change to your Documents folder.

And then, you just type: emulator.exe -avd Android -partition-size 100
There, you should note is: command “Android”, is my AVD NAME at Step 2, I created.
Then press “Enter”, open the emulator.

=====================================================================

Step 5, cuz I update the SDK to the Android 2.3 .
So, something changed. The “adb” file is not in the “tools” folder, but in “platform-tools” folder. So you still need to change the Adress to this.

For me is :

cmd

C:\Users\Ethan\ cd C:\Users\Ethan\Desktop\Android\android-sdk_r08-windows\android-sdk-windows\platform-tools

Then it should like this:
C:\Users\Ethan\Desktop\Android\android-sdk_r08-windows\android-sdk-windows\platform-tools\ adb pull /system/build.prop [Press “Enter”]

Next, go to “platform-tools” find out “build.prop” file, use TXT edit it.

=====================================================================

Step 6, When you open the “build.prop” file, then you should add ” ro.config.nocheckin=1 ” this after the whole text. And save, quit.

For the push it back, there are 2 commands: (below the folder of “platform-tools” )
adb remount
adb push build.prop /system/

After push build.prop back, we should download the Android Market files to install on our AVM.

These are: GoogleServicesFramework.apk and Vending.apk
Here is the downloading webpage, you can enter and download.

Download android market apk files

After you download and uncompress the files, put them to “platform-tools” folder.
Next, Also need to use cmd.
(under “platform-tools” folder)
adb push GoogleServicesFramework.apk /system/app
adb push Vending.apk /system/app
adb shell rm /system/app/SdkSetup.apk
(PS: there you can type this command again to ensure SdkSetup.apk has been deleted.)
adb shell rm /system/app/SdkSetup.apk

At last, you should go to user file, eg: C:\user\Administors\
for me is C:\Users\Ethan\. Find out your avd folder,
and delete

image: userdata-qemu.img,
userdata.img,
cache.img

Finish the whole thing. Now you can close your AVM, and use the normal way to start your AVM (SDK Manager).
After loading, you will have Android Market on your panel.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s