如何在模拟器上安装适用于所有API的Android市场

11

我该如何在Android模拟器上安装Android市场和其他APK文件?我尝试了一些解决方案,但似乎都不起作用或者不太清楚。


4
这不是一个编程问题。 - Thomas Dignan
2个回答

12

如上方所述,该功能不可用,但您可以从文件浏览器中提取apk。

我使用这种方法在api 4和8上安装市场:

如果您使用的是Windows,请将“/”更改为“\”,并只键入“android”而不是“./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

请不要在StackOverflow上倡导侵犯版权。 - CommonsWare
3
我们不会执行他人的版权。然而,前往一些不靠谱的第三方网站下载二进制文件似乎是一个愚蠢的行为。 - user1228

0
Android 市场不适用于模拟器。只有在获得 Google 许可并在硬件上分发时才可用。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接