android-logoHere's a confession. My inner geek woke me up the next morning at 3:00 wondering whether my android build had completed. In the end sanity took hold again, and I went back to sleep. Quite lucky really as when I checked in the morning, the java compiler had crashed with a meaningless error.

An exception has occurred in the compiler (1.5.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.

java.lang.AssertionError: writePool E

at com.sun.tools.javac.jvm.ClassWriter.writePool(ClassWriter.java:513)
at com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1333)
at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1211)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:325)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:474)
at com.sun.tools.javac.main.Main.compile(Main.java:592)
at com.sun.tools.javac.main.Main.compile(Main.java:544)
at com.sun.tools.javac.Main.compile(Main.java:58)
at com.sun.tools.javac.Main.main(Main.java:48)
make: *** [out/target/common/obj/APPS/VpnServices_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....

After trying the most recent update of Java 1.5 I made a cry for help in the XDA forums. The answer seemed simple enough, try JDK1.6. I installed it and modified /home/ben/mydroid/build/core/main.mk, commenting out the lines that checked for Java 1.5. Then after a "make clean", and another "make -j2" (-j4 made my laptop burn up ...) it was building again, and this time finished!

I make a nandroid backup and wiped to factory settings (using Amon_RA's recovery image) flashed the resulting boot.img and system.img to my phone using fastboot:

fastboot flash boot boot.img
fastboot flash system system.img
fastboot reboot

Rebooted my device, and it worked! A very basic system though, no Market or Google Apps.

Next steps ... getting root, creating an update.zip, making my own kernel with compcache ... the list is actually endless, it's nice just to get this far.

In fact next step could be building from Cyanogen's Eclair sources. Will give it a go and post if it works...