[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
Seems like in the GoogleAPI version they disabled the install but the push method still works to get it on the system. I'm just not sure how to get them to show up in the appdrawer after a push. I'll look around and see how and I'll also see if I can delete the apps that are supposedly on there.
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
I'm still looking into the appdrawer issue but I also have another idea. If the security is so much tighter on the GoogleAPI version we might just be able to pull the /system and /lib folders then push them to a 2.2 standard avd and get the same functionality without all the issue of market not working. I'll explore that idea in a bit but if someone else wants to that's fine with me. I'm probably going to be leaving my house in about 2 hours and I'll be gone for a while so I might not have time to try everything.

Edit: I think we're boned in terms of getting stock GoogleAPI to run market. Even if we get the apk on there and registered if we run in partition-size 96 it won't connect to the machine's network. If you start without that option network connects just fine but it will give you the "out of memory" or "read-only filesystem" errors. I think the best option is to pull the /lib and /system folders then push them to a standard 2.2 avd. At least if we want improved functionality. Might also need a system.img file to keep the changes but I'm not 100% on that one, and I'm not going to really try since this is supposed to be a no system.img file needed thread :p.
 
Last edited:

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Just had kind of a funny thought that I can't test since I'm using my phone to tether and it won't show up in ADB (I'm not losing my internet) so could someone else please test? Or if you've already done it let me know the results?

Code:
adb pull /system
adb -e push system/* /system
Basically pull the system folder from your real phone and push it to the emulator (while it's running of course).

Edit: Just thought I'd give you guys a heads-up. I got the network connection to work with the -partition-size 96 parameter (somehow :S) and I thought I'd try using flash_image to flash a system.img file I had from an old nandroid backup. Unsurprisingly it didn't work but only because it said "could not find /system partition" with
Code:
flash_image /system /sdcard/system.img
I got a different error, "error writing system: No space left on device" when I used
Code:
flash_image system /sdcard/system.img
This leads me to believe one of two things, either I f*ked up the command (wouldn't surprise me :p) or flash_image just simply will not work while the system is running normally (again, wouldn't surprise me). I have another idea I'll try and update here but for now I've got no luck.

Edit 2: Well as I suspected my idea didn't work. Just so you don't waste your time (not saying don't try if you want to I'm just saying don't try thinking it's guaranteed to work) what I tried was loading up with a larger partition size, 150 actually. Still said "out of room" even after remounting so that didn't work and it's kinda ticking me off><
 
Last edited:

Xplorer4x4

Senior Member
Mar 12, 2010
1,039
323
OnePlus 9
Thanks for this but for some reason it doesnt see my emulated device. I can start the emulator and avd using emulator -avd android_2.2 but I get this error when running the windows.bat file
hxxp://img254.imageshack.us/img254/1433/rootfail.jpg
Would you mind explaining where I went wrong?
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
You let the device load up completely right? You might also want to make sure adb is running,just because the emulator is doesn't mean adb is. Also if you have your phone plugged in it may be causing a conflict, try adding -e after adb in the commnds.
 

Xplorer4x4

Senior Member
Mar 12, 2010
1,039
323
OnePlus 9
Yes, the device is completley loaded. I did adb start-server to make sure ab was running then ran windows.bat, still failed. I edited the bat to include -e and it still failed. Nor do I have my phone plugged in to my computer.

Thanks for the quick response!
 

Xplorer4x4

Senior Member
Mar 12, 2010
1,039
323
OnePlus 9
Ok looks like restarting adb did the trick. I did get the out of memory error, but I remember a fix for that earlier in the thread, but despite that it seems to work anyways. Thanks again for the great tut! I hope you get your nandroid working. I tried this to with no luck.
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Yeah I hope I get it working too :p. Glad everything got sorted out, feel free to tell your friends about this, the more people that try it the more ideas the community will have to try. Google may have a hundred or so developers, but we've got the entire planet potentially >:)
 

Xplorer4x4

Senior Member
Mar 12, 2010
1,039
323
OnePlus 9
I already put in a link @ M3 as I had originally asked for something like this on 2.1 over there. Hope it helps. ;)

I started with a clean img this time(created by the sdk), and ran through it again with the partition fix, this time I had this error:
http://img441.imageshack.us/img441/4999/busyj.jpg

Busybox isnt ocmpletley nesscescary though is it? Because I cant seem to log in to the market. I keep trying and it says, it can't establish a reliable data connection.
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Busybox helps with stuff, if you run the bat script busybox will be installed automatically along with root and market. As far as the data connection i discussed that in the op so go see if those solutions work for u :)
 

Xplorer4x4

Senior Member
Mar 12, 2010
1,039
323
OnePlus 9
I missed the data soltuions in the OP. Sorry, but I found a beter one:
MENU -> SETTINGS -> Accounts & sync -> Add account -> <select> Google -> create or log in
No need to restart.

As for busybox, that was the outbut from the bat. I just ran the bat from a cmd so I could verify the results of each command, otherwise if you just execute the bat, it flys by to quick to see anything and then the cmd window closes.
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
I know thats the bat output but you can ignore the error, busybox still works. Sometimes the network wont sync with the emulator properly which does require a reboot so thats why i put that there.
 

mazodude

Senior Member
Sep 24, 2010
179
98
Just thought I would let you know that this also works for the 2.3 sdk.
tested and working by me :D
 

dbzfanatic

Senior Member
Jun 21, 2010
1,063
284
Oh, really? Thanks for telling us. :)

Edit: Just thought of something. Is it the marketplace fix, the root method, or both that work on the 2.3 SDK?
 
Last edited:

mazodude

Senior Member
Sep 24, 2010
179
98
Both work.
but hardly any apps show up.

also still have to re-root on every boot
 
Last edited:

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.