[How-To](UPDATED 11/1/10)Working Marketplace in 2.2 Emulator (no system.img)(ROOTED)

Search This thread

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
This all started out as an experiment to get my nandroid system.img file running in the adb emulator. Well sadly I haven't been able to do that (yet) but I have found something useful. I've Seen several people all over asking how to get a working marketplace app in 2.2 on the adb emulator. After a lot of researching (and trial and error) I've managed to get one. Here are the steps I've taken. (Steps 5 and 6 optional, you can just use the included build.prop if you prefer)

1) Create an avd running 2.2 (froyo,plenty of places explain how to do this so I won't)
2) Download the file (attached below, root files included)
3) Unzip to a location that's easy to remember and find.
4) Load your emulated phone (allow it to load fully)
5) enter this command in a command prompt/terminal window (make sure you "cd" to the directory where you extracted the files)
Code:
adb pull /system/build.prop
6) Remove or comment "ro.config.nocheckin=yes" (no quotes, might be able to just change it to "no" but I haven't tried it that way)
7) enter these commands

Winblows (I mean windows)
Code:
adb remount
adb push build.prop /system/build.prop
adb install GoogleServicesFramework.apk
adb install Vending.apk
adb install Gmail.apk (optional but sometimes signing in here lets the market sign in)
adb shell rm /system/app/SdkSetup.apk
Linux
Code:
adb remount
adb push ./build.prop /system/build.prop
adb install ./GoogleServicesFramework.apk
adb install ./Vending.apk
adb install ./Gmail.apk
adb shell rm /system/app/SdkSetup.apk
8) Sign in. If it works you're done if not reboot and try again, sometimes it takes 3 or 4 reboots to set. If your emulated phone has a data signal from your computer (you'll see a 3G and network icon in the notification area) just wait for it to sign in. The cancel button should grey out within a minute. If it says it can't connect restart the emulator and try again, be patient.

There is a known bug that not all apps show up in the marketplace. I'm not sure why so if someone here knows how to fix that by all means leave a post and let me know. If I see it I'll add it to the first post (provided it works of course :p)

Edit: Working on getting root on the emulator (just for the hell of it:p). So far I have su in the xbin directory and superuser.apk installed. Not 100% sure what else I need to do to get the su requests to go through though, I'll probably PM a more experienced member and post back when I have more. Got root? I do:p (got it working.) Here are the steps you need to take.

Rooting the standard android image on the emulator
1) Open a command prompt (cd to the directoy where you extracted the files)
2) enter these commands
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
adb push su /system/xbin/su
adb shell chmod 06755 /system
adb shell chmod 06755 /system/xbin/su
adb install superuser.apk
That's it! You now have a rooted, market-enabled android emulator.

New! N00b-friendly method
1) create your avd
2) download the emulator files archive attached to this post
3) extract somewhere easy to find
4) open command prompt/terminal and cd to the extracted location
5) start your avd
6) Run your script (windows.bat or linux.sh)
7) sign into market and enjoy root!

Note:
You may have to chmod su again upon restarting the emulator.
To get root back simply run the re-root script for your OS (bat for windows,sh for linux)
To install busybox simply run the re-root script, it will automatically install if you're using the script to install on a new avd.
 
Last edited:

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Post 2

[reserved for updates, explanations, pictures, present/future tweaks in progress, etc]

Pictures:
Superuser list,Marketplace (I like solitaire><), Terminal with su permissions, and re-rooted Terminal
superuser.png
marketplace.png
terminalemulator.png
re-rooted.png


Tweaks:
1: root (done!)
2: busybox (done!)
 
Last edited:
  • Like
Reactions: AlexFcm

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Thank you :) the root resets after reboot, working on making it stick but its not hard to do it again, just start with the "-wipe-data" command and redo the root, market works after reboot though. Still working on getting a dumped system.img to boot, ill post that in its own thread when i get it. Glad you like this.

Sent from my ROOTED T-Mobile myTouch 3G Slide using XDA App

Edit: see first post on how to get root back,no data-wipe!
 
Last edited:

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Thanks ^_^ let me know if you find any problems that I haven't already mentioned and I'll see if I can fix them or if they're just an emulator quirk.
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Sorry for the double post but I wanted to let you all know busybox is now included! Installation can be performed through scripts (included in the "Emulator Files.rar" archive) or manually. If you wish to do it manually simply open the script in a text editor to see what's going on and enter the commands in a command prompt/terminal window.
 

ropi313

Member
Apr 9, 2010
8
0
I'm not able to make this work, not with a toolkit downloaded yesterday anyway.

Pulling of build.prop works, but pushing fails with a directory related error.
"adb shell" followed by "cd /system" and "ls -l" gives a list of files that does not include build.prop, neither as a file nor as a directory.
"ls -l build.prop" works though, and lists a file with 0644 permissions.

Install of all apks different from Gmail fails, with an error that says that those apks are already installed. Uninstalling them through adb doesn't work, netting instead a simple generic error.

Does anyone know whether I'm doing something wrong or Google has modified the emulator images so to render the Market workaround unusable? If so, where could I download an earlier version of the 2.2 system image?

Many thanks
Rocco
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
I actually had this issue as well. Try re-making the avd, worked for me. You could also try running the scripts to install, might work. If it doesnt post back and ill post the system.img from my sdk.

Sent from my ROOTED T-Mobile myTouch 3G Slide using XDA App
 

Pickx

Senior Member
Apr 23, 2010
426
44
I have the same problem as ropi. Remade the avd several times with different properties, still no go.

I would really appreciate it if someone could upload a fully set-up avd somewhere.
 

ropi313

Member
Apr 9, 2010
8
0
I'll try again late this afternoon (I'm on CEST). Hope it works. If not, I'd be happy too if some kind soul would upload a link to a working avd :)

Thanks for the kind help

Rocco
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
I have no idea why people are having so many problems :/. I had the problem and once I remade the avd it went away. Try starting with the -partition-size 96 option and see if that helps. If not here are the files, just extract to your avd directory, it has the ini and img files you need and it's already setup. Just run re-root to get root back and sign into market and you're good to go.

http://hotfile.com/dl/79959332/3efbade/froyo-avd.rar.html

Edit: I just downloaded the latest revision and everything seems to be working fine :/ As I've said before try starting with -partition-size 96 and also try using the scripts I've provided. That should fix the issues, but if it doesn't there's always the hotfile link I've provided :p (or if you're just lazy lol)

Edit 2: also,just thought of this, make sure before you push the build.prop you adb remount. Pulling will work fine without doing that but pushing won't. No one said if they had done this and still received the errors so I'm trying to cover all bases. If remount fails try the adb shell mount command posted on the first page.
 
Last edited:

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Glad it worked for ya. Let us know how everything works.

Sent from my ROOTED T-Mobile myTouch 3G Slide using XDA App
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Yeah, I've mentioned that,firs post. It's a known bug. Nothing I can do to fix it at the moment. You could download the apk on your phone then pull it then install it in the emulator. Bit of a roundabout way of doing things but it's all we can do on the emulator for the time being, at least from what I know.
 
Last edited:

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Ok after a bit of poking around (sorry it took so long) I found out a bit about the market. It seems it's not just your region that it uses to show apps but things like your carrier, presence/absence of a SIM card, Android version, etc. It uses the filters to choose which apps to show and which to exclude (not showing an American user Japanese apps, not showing someone on Verizon T-Mobile apps, etc) so this explains part of the problem. I also found out that the SIM card and IMEI numbers were(are?) hard-coded into the emulator binary, changing these may allow us to see a few more apps. I looked through the binary file a bit and didn't find anything but I'll look more closely in a bit (new job, yay <- read as "groan"). I don't know how to emulate or spoof a carrier so that will still cut us back on some of the apps being seen. If anyone knows how to do this please post here and let us know! It would also be beneficial if a user who has already modified their IMEI and SIM numbers in the emulator to compare the apps list to the one you see in the standard, non-modded emulator binary and let us know if there is a difference or not. The more apps we can see in the marketplace the better!
 

Pickx

Senior Member
Apr 23, 2010
426
44
Just wanted to confirm that I've tried Market Enabler a few days ago and it doesn't seem to work.
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Alright thanks for the feedback. Ill keep working on it.

Sent from my ROOTED T-Mobile myTouch 3G Slide using XDA App
 

ropi313

Member
Apr 9, 2010
8
0
Despite several tries, I've so far been unsuccessful in using this method to install the marketplace on a 2.2 avd. Many thanks for having provided ready-made avds, then!

I've been able to install marketplace on the Galaxy Tab images provided by Samsung, though!

Keep up the good work
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    This all started out as an experiment to get my nandroid system.img file running in the adb emulator. Well sadly I haven't been able to do that (yet) but I have found something useful. I've Seen several people all over asking how to get a working marketplace app in 2.2 on the adb emulator. After a lot of researching (and trial and error) I've managed to get one. Here are the steps I've taken. (Steps 5 and 6 optional, you can just use the included build.prop if you prefer)

    1) Create an avd running 2.2 (froyo,plenty of places explain how to do this so I won't)
    2) Download the file (attached below, root files included)
    3) Unzip to a location that's easy to remember and find.
    4) Load your emulated phone (allow it to load fully)
    5) enter this command in a command prompt/terminal window (make sure you "cd" to the directory where you extracted the files)
    Code:
    adb pull /system/build.prop
    6) Remove or comment "ro.config.nocheckin=yes" (no quotes, might be able to just change it to "no" but I haven't tried it that way)
    7) enter these commands

    Winblows (I mean windows)
    Code:
    adb remount
    adb push build.prop /system/build.prop
    adb install GoogleServicesFramework.apk
    adb install Vending.apk
    adb install Gmail.apk (optional but sometimes signing in here lets the market sign in)
    adb shell rm /system/app/SdkSetup.apk
    Linux
    Code:
    adb remount
    adb push ./build.prop /system/build.prop
    adb install ./GoogleServicesFramework.apk
    adb install ./Vending.apk
    adb install ./Gmail.apk
    adb shell rm /system/app/SdkSetup.apk
    8) Sign in. If it works you're done if not reboot and try again, sometimes it takes 3 or 4 reboots to set. If your emulated phone has a data signal from your computer (you'll see a 3G and network icon in the notification area) just wait for it to sign in. The cancel button should grey out within a minute. If it says it can't connect restart the emulator and try again, be patient.

    There is a known bug that not all apps show up in the marketplace. I'm not sure why so if someone here knows how to fix that by all means leave a post and let me know. If I see it I'll add it to the first post (provided it works of course :p)

    Edit: Working on getting root on the emulator (just for the hell of it:p). So far I have su in the xbin directory and superuser.apk installed. Not 100% sure what else I need to do to get the su requests to go through though, I'll probably PM a more experienced member and post back when I have more. Got root? I do:p (got it working.) Here are the steps you need to take.

    Rooting the standard android image on the emulator
    1) Open a command prompt (cd to the directoy where you extracted the files)
    2) enter these commands
    Code:
    adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
    adb push su /system/xbin/su
    adb shell chmod 06755 /system
    adb shell chmod 06755 /system/xbin/su
    adb install superuser.apk
    That's it! You now have a rooted, market-enabled android emulator.

    New! N00b-friendly method
    1) create your avd
    2) download the emulator files archive attached to this post
    3) extract somewhere easy to find
    4) open command prompt/terminal and cd to the extracted location
    5) start your avd
    6) Run your script (windows.bat or linux.sh)
    7) sign into market and enjoy root!

    Note:
    You may have to chmod su again upon restarting the emulator.
    To get root back simply run the re-root script for your OS (bat for windows,sh for linux)
    To install busybox simply run the re-root script, it will automatically install if you're using the script to install on a new avd.
    1
    Post 2

    [reserved for updates, explanations, pictures, present/future tweaks in progress, etc]

    Pictures:
    Superuser list,Marketplace (I like solitaire><), Terminal with su permissions, and re-rooted Terminal
    superuser.png
    marketplace.png
    terminalemulator.png
    re-rooted.png


    Tweaks:
    1: root (done!)
    2: busybox (done!)
    1
    I'll attach a version here sure and thanks for the link but I already knew all that stuff :p. It doesn't seem to like working with anything above a 1.6 system.img file, not sure why.