[Optimus One, P500, V General] AxesofEvil:
This probably belongs in the developer section, but I don't have permission to post there yet)

This work is very preliminary. It isn't really anything more than a starting point right now. It DOES NOT yet provide a faithful representation of a custom ROM in the emulator.

Current status:

emulator running 2.6.29 kernel with a combination of frankenstein of the emulator and devoid-franco system image.

I've been working to get a custom ROM working in the Android SDK emulator. There are several reasons for this, but in the end, it makes it a lot easier to test out different tweaks to get the ROM working as I'd like (I need some functions provided on the P509 ROM that aren't provided on any custom ROMS, and reinstalling the APKs isn't sufficient). I spent a lot of time looking for a thread about this, but nothing I could find discusses the specifics of working with a P500 based device

Things I've learned:

a) you need a kernel specifically compiled for the emulator, and the ramdisk image needs to be built to work with an emulator. For the moment i am using the SDK kernel (2.6.29) and ramdisk image to get going

b) the p509 libraries aren't compatible with the emulator, I needed to copy the libraries from the supplied emulator image

Here are some notes I took. I'll try to flush this out more as I make further progress:

Tools you will need:

Android SDK and 2.2 platform files (android-8)

unyaffs

mkfs.yaffs2.x86

a copy of the ROM image to install (devoid.franco.v5 in my case)

before beginning you should build a stock 2.2 emulator env to ensure everything is working (from sdk/tools run):

android list targets

find the id for 2.2 (was '4' for me)

android create avd -n test-froyo -t 4

(I used all defaults, except I set the RAM to 512MB and screen to HVGA)

emulator -avd test-froyo -show-kernel

(this should eventually bring up a running froyo)

you'll need to know where the avd lives. In linux, it should be in ~/.android/avd/test-froyo

I'm working on linux, but this should work in Windows if you can find a compiled version of mkfs.yaffs2 for windows (I've seen a compiled unyaffs version out there)

1) unzip the rom image. it should create a system/ directory.

We should execute the updater-script here, but we'll take a short-cut:

chmod -R 655 system/

2) uncompress the platfrom system image:

in a new dir:

unyaffs <sdk path>/platforms/android-8/images/system.img

3) copy all files from system/ in step-2 to system/ in step-1

we should really need to do this, it is probably sufficient to run the updater-script and then copy the framework/, lib/ and a couple qemu files, but this is just to get things going.

4) make dbus.conf readable:

chmod 644 system/etc/dbus.conf

5) remove system/app/LGSetupWizard.apk

This app relies on custom classes in the firmware that aren't present in the emulator base system. I'm still trying to build a custom firmware.jar that has both.

6) build a new system.img

mkfs.yaffs2.x86 system system.img

7) copy the system image to your avd dir:

cp system.img ~/.android/avd/test-froyo

If everything has gone well, you can now startup the emulator and boot into franco's rom:

emulator -avd test-froyo -show-kernel

Because we copied too much stuff from the default system.img, we've lost his themes and mst of his tweaks, so it isn't really a faithful representation of the ROM at all, but we've cleared the 1st milestone of being able to boot up.

I also booted a stock P509 kernel this way with a few changes:

a) I used nandroid to get the system image, and then unyaffs2 to extract it)

b) I removed all odex files:

find system -name "*.odex" | xargs rm

Again, this isn't really a custom ROM, it is actually the emulator rom with additional apps and customizations. The goal is to get to as close as possible to running a true custom ROM