Monday, September 06, 2010

How to use Android Market on Android Emulator 2.2

After some digging, finally I got android market working on Android emulator 2.2 running on Windows Vista. Here is the steps,:
  • Start SDK Setup.exe and create an AVD - android-2.2
  • Copy system.img coming with the SDK platform to the newly created AVD.
cd c:\Users\dliu\.android\avd\android-2.2.avd
copy c:\labs\android-sdk-windows\platforms\android-8\images\system.img .
  • Start the emulator by using command line:
c:\labs\android-sdk-windows\tools>emulator -avd android-2.2 -partition-size 96
  • Pull build.prop from the emulator for editing:
c:\labs\android-sdk-windows\tools>adb.exe pull /system/build.prop .
  • Comment out ro.config.nocheckin=yes line from the build.prop file just pulled out from the emulator.
  • Push back the updated build.prop file to the emuloator
C:\labs\android-sdk-windows\tools>adb.exe remount
C:\labs\android-sdk-windows\tools>adb.exe push build.prop /system/build.prop
C:\labs\android-sdk-windows\tools>adb.exe push c:\labs\r21-update-nexusone-modacocustomcustomrom-withadditions-chinese-signed\system\app\GoogleServicesFramework.apk /system/app
C:\labs\android-sdk-windows\tools>adb.exe push c:\labs\r21-update-nexusone-modacocustomcustomrom-withadditions-chinese-signed\system\app\Vending.apk /
system/app
C:\labs\android-sdk-windows\tools>adb shell rm /system/app/SdkSetup.apk
  • Stop the emulator and delete the files: userdata-qemu.img, userdata.img, cache.img
  • start the emulator by using command line again, you should get the Android Market in your emulator.