[Android Apps and Games] chrstdvd:
I figured it out!

I figured out how to root and get the Market on the and AVD that is permanent; however, you must create a system.img and paste it into your AVD which is what the OP did not want to do. I debated whether to start a new thread or post it here. I decided that since I used OP original files and modified them, that I should post here.

Create you AVD the normal way, I usually make my SD card be 512 Meg, leave the skin at default, make my RAM size 512 and in the Hardware section click "New" and choose SDCard support. Then Create.

Download the zip folder containing the files required:

http://dl.dropbox.com/u/35546129/Emulator Files.zip

Unzip the folder and place on your desktop for easy access.

There is a file, rootavd.bat, that you can run which will do all the command input for you. You must pay close attention because there are things you must do along the way. I stop the execution with pauses and give instructions that must be done by you before you hit a key and proceed.

If you want to enter the instructions on your own, the content of the .bat file are listed here with instructions. Read the instructions and complete them whichever method you choose.

1. emulator -avd RootedMarket -partition-size 200

Change the RootedMarket to the name of your avd.

If you run the bat file you must right click the rootavd.bat and click edit. The file opens and you change the name of the avd then save it: File > Save.

pause

This tells the .bat file to stop and wait until you are ready to proceed with the installation. You do not have to type it in if you are doing manual installation. The point is to wait until your avd is fully loaded before we proceed.

2. adb remount

3. adb pull /system/build.prop

pause

Minimize the avd and the command window and open the folder Emulator Files. Find build.prop file, right click and choose edit. Toward the bottom of the file you will see the line: ro.config.nocheckin=yes

Highlight it and erase it then save the file.

Bring up the command window and hit a key. (If you are running the bat file)

4. adb remount

5. adb push build.prop /system/build.prop

6. adb shell rm /system/app/SdkSetup.apk

7. adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system

8. adb install com.android.apkinstaller-1.apk

9. adb shell chmod 777 /system/app

10 adb push GoogleServicesFramework.apk /sdcard/.

11 adb push com.android.vending-3.1.3.apk /sdcard/.

12. adb push gmail.apk /sdcard/.

13 adb push vending.apk /system/app/.

14. adb push su /system/xbin/su

15. adb push busybox /system/xbin/busybox

16. adb push installbusybox.sh /system/xbin/installbusybox.sh

17. adb shell chmod 06755 /system/*

18. adb shell chmod 06755 /system/xbin/*

19. adb install superuser.apk

20. adb shell installbusybox.sh

21. adb push mkfs.yaffs2.arm /system/xbin/mkfs.yaffs2.arm

22. adb shell chmod 777 /system/xbin/mkfs.yaffs2.arm

23. adb shell /system/xbin/mkfs.yaffs2.arm /system /data/system.img

Here is where we build a copy of the new rooted system file.

24. adb pull /data/system.img

Now we are pulling the system.img file (a large file) to the folder Emeuator Files. It will take about 25 to 30 minuets. Be patient and wait for the message that says how many bites in how many seconds were transferred.

Close the command window and the avd.

Open File Emulator folder and copy system.img (should be about 95 Meg)

Navigate to C: Users > (your name) > .android > AVD > (the name of the avd) and paste the system image into this folder.

Navigate to your sdk avd manager and start the avd the normal way.

Here is where my method varies from all others. I pushed all the files that gave me problems to the sd card. I found that pushing vendor.apk, GoogleServicesFramework.apk, and Gmail.apk to /system/app would not work.

I sent them to the sd card and installed the apk installer app.

In your app drawer Open APK Installer and choose the GoogleServicesFramework.apk and choose Install. Then do the same with Gmail.apk, and com.android.vending-3.1.3.apk.

Back up by hitting the "esc" key on your keyboard untill you are in the app drawer. Click on the Market or Gmail app which will take you to the sigh in screen. Log into Google and complete the procedure.

Then you should be able to go to the Market.

To test if you are rooted, go to Dev Tools and scrool to Emulator at the bottom. Open the emulator and you should be asked to grant superuser rights. Choose yes and then type su into the emulator. You should be rewarded with a "#" prompt.

I wanted to install Root Explorer in this set up; however, it is a paid app that you should purchase on your own and install.

That is it. Everytime you load this avd it will be rooted and you will have access to the Market. The Market is limited, not like on a real phone because the AVD does not associate with a particular phone which causes the filters at the market from presenting you with all apps available.

---------- Post added at 12:15 PM ---------- Previous post was at 11:59 AM ----------

And by the way, the above does not work for Ice Cream 4.0.3. I am working on that in a few weeks. My brain is dead from figuring out the above.