2010年11月27日 星期六

[Android] Install Android market in Android emulator 2.2

使用SDK下載回來的avd:
1.Download Android market apk
$ wget http://goo.gl/dz3ZB
2.Create froyo AVD
$ android create avd --target 8 --name froyo
3.Start emulator
$ emulator -avd froyo -partition-size 96
3.Modified build.prop and comment "ro.config.nocheckin=yes"
$ adb pull /system/build.prop
$ vim build.prop
#ro.config.nocheckin=yes
4.Restore to system
$ adb remount /system
$ adb push build.prop /system
5.Remove SdkSetup.apk
$ adb shell rm /system/app/SdkSetup.apk
$ adb push GoogleServicesFramework.apk /system/app
$ adb push Vending.apk /system/app
6.Shut down the emulator
$ adb reboot
7.Remove emulator image
$ cd /path/to/avd
$ rm userdata-qemu.img userdata.img cache.img
8.Restart emulator


使用自己編出來的system.img:
1.直接安裝Vending.apk和GoogleServicesFramework.apk就好了
$ adb install GoogleServicesFramework.apk
$ adb install Vending.apk
2.Restart emulator

reference:
* [Android]在SDK 2.2模擬器中安裝Market

沒有留言: