Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,363 Members 44,527 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
dbzfanatic
Old
(Last edited by dbzfanatic; 1st November 2010 at 11:31 AM.) Reason: updated Emulator files.rar,added information
#1  
dbzfanatic's Avatar
Senior Member - OP
Thanks Meter 282
Posts: 1,063
Join Date: Jun 2010

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

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.
Attached Files
File Type: rar Emulator Files.rar - [Click for QR Code] (3.43 MB, 6154 views)
The Following User Says Thank You to dbzfanatic For This Useful Post: [ Click to Expand ]
 
dbzfanatic
Old
(Last edited by dbzfanatic; 1st November 2010 at 11:32 AM.) Reason: added picture and info
#2  
dbzfanatic's Avatar
Senior Member - OP
Thanks Meter 282
Posts: 1,063
Join Date: Jun 2010

 
DONATE TO ME
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


Tweaks:
1: root (done!)
2: busybox (done!)
 
atoml
Old
#3  
Member
Thanks Meter 0
Posts: 38
Join Date: Jan 2008
Wow nice....
 
dbzfanatic
Old
(Last edited by dbzfanatic; 1st November 2010 at 09:46 AM.) Reason: updated info
#4  
dbzfanatic's Avatar
Senior Member - OP
Thanks Meter 282
Posts: 1,063
Join Date: Jun 2010

 
DONATE TO ME
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!
 
bcbaluga
Old
#5  
bcbaluga's Avatar
Junior Member
Thanks Meter 8
Posts: 17
Join Date: Oct 2010
Location: Funchal
so cool!! Good job man!
 
dbzfanatic
Old
#6  
dbzfanatic's Avatar
Senior Member - OP
Thanks Meter 282
Posts: 1,063
Join Date: Jun 2010

 
DONATE TO ME
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
Old
#7  
dbzfanatic's Avatar
Senior Member - OP
Thanks Meter 282
Posts: 1,063
Join Date: Jun 2010

 
DONATE TO ME
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
Old
#8  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: Apr 2010
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
Old
#9  
dbzfanatic's Avatar
Senior Member - OP
Thanks Meter 282
Posts: 1,063
Join Date: Jun 2010

 
DONATE TO ME
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
Old
#10  
Senior Member
Thanks Meter 28
Posts: 380
Join Date: Apr 2010
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.

Tags
2.2, adb, emulator, marketplace, root
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


CyanogenMod 11 M10 Available for Supported Devices

Summer vacation isover for most students out there, and it’s the time to get back to … more

XDA Forums Added for the First Batch of Android One Devices!

Just yesterday, we talked about the highly anticipated launch of the first batch … more

XDA Xposed Tuesday: DonkeyGuard, Don’t Be a Donkey, Control Your Device – XDA Developer TV

Some applications ask for the world … more

Use Facebook Pictures as a LWP with Facebook View

One of the best things that Android has always offeredits users is the ability to tailor … more