[G1 Q&A, Help & Troubleshooting] jmhecker:
Is there any way to flash a custom rom with ADB? I would assume there is, as ADB can do everything else, heh.

I have read up on the ADB tutorials and such that are on here, as well as the stuff that is supplied with a quick google search, and have not been able to find anything significant to this specific question.

Any advice would be great. Thanks :)

EDIT:

So, digging around in the DroidExplorer source code, I came across this:

public void ApplyUpdate ( string device ) {
/*
mkdir -p /cache/recovery/
echo 'boot-recovery' >/cache/recovery/command
echo '--nandroid' >> /cache/recovery/command
echo '--update_package=SDCARD:update.zip' >> /cache/recovery/command
*/
ShellRun ( device, "mkdir -p /cache/recovery/" );
ShellRun ( device, "echo 'boot-recovery ' > /cache/recovery/command" );
//ShellRun ( device, "echo '--nandroid ' >> /cache/recovery/command" );
ShellRun ( device, "echo '--update_package=SDCARD:update.zip' >> /cache/recovery/command" );
RebootRecovery ( device );
}

So I opened up ADB, and began plunking around.

I started from the recovery menu, in console mode.

C:\Users\Jason>adb shell
/ # recovery --update_package=/sdcard/update.zip
recovery --update_package=/sdcard/update.zip

C:\Users\Jason>

That restarted recovery mode, and attempted to mount/load/verify/flash update.zip. I did not have an update.zip on the SDCard, so naturally it errored out (yay).

Next, I decided to try a few things with the phone booted up:

C:\Users\Jason>adb remount
remount succeeded

C:\Users\Jason>adb shell "echo 'boot-recovery ' > /cache/recovery/command"

C:\Users\Jason>adb shell "echo '--update_package=SDCARD:update.zip' >> /cache/recovery/command"

C:\Users\Jason>adb shell "reboot recovery"

C:\Users\Jason>

That in turn rebooted the G1, and again, attempted to install the update.zip.

Complete output of the RA-Dream-v1.5.2 is as follows:

Build : RA-dream-v1.5.2
Finding update package...
Opening update pacakge...
E:Can't open /sdcard/update.zip
(No such file or directory)
Installation aborted.

That leads me to believe that this process should work flawlessly, as long as I point to the correct .zip file (update.zip, or SuperD-AOSP...zip).

Now, another thing that I need to do is to figure out how to perform the wipe actions that the recovery menu has. Does anyone know what is ran when I choose any of the 3 wipe options? (I assume they are just rm -rf on the appropriate directories, but I would like to be sure first)

EDIT2:

Gotta love open source :) After quite a bit more googling, this is what I found (located in the source code for ra-dream-v1.5.2):

* The arguments which may be supplied in the recovery.command file:
* --send_intent=anystring - write the text out to recovery.intent
* --update_package=root:path - verify install an OTA package file
* --wipe_data - erase user data (and cache), then reboot
* --wipe_cache - wipe cache (but not user data), then reboot

As well as:

recovery.c(849): "/sbin/wipe dalvik",
recovery.c(859): "/sbin/wipe ext",
recovery.c(869): "/sbin/wipe battery",
recovery.c(879): "/sbin/wipe rotate",

Using that information, I think I can finally start my lil applicatoin, heh. Thanks for letting me answer my own questions :) (I wont argue with a good learning experience)