[G1 Android Development] pensive:
Modified nandroid-mobile.sh, ready for prime time, more features.

Ok, I think I made it as idiot-proof as possible. I have to concede, however, I may not be the best idiot out there to fully stress test it. So, I suppose it is possible to misuse and break anything. I find it very useful even when run from the console command line.

The most common things people may want to do are:

nandroid-mobile.sh --backup --subname CMv3.6.8-themename -c|--compress|--bzip2 -level [--autoreboot]

Will backup your phone and compress the result with either gzip or bzip2 naming the backup CMv3.6.8-themename-CBDMRS12-timestamp

where CBDMRS12 signifies which partitions are in this backup. Will optionally reboot into a normal mode without any further action from the

user after a backup.

nandroid-mobile.sh --restore --subname CMv3.6.8

Will look for and restore the latest backup with that subname unless you narrow it down further. If the backup happens to be compressed

it would be decompressed before the restore operation automatically, subject to the space limitations on your sdcard.

nandroid-mobile.sh --webget http://n0rp...../update-cm-3.6.8-signed.zip [--webgettarget] [--autoapplyupdate]

nandroid-mobile.sh --webget http://n0rp...../recovery-cm-1.3.1.img [--webgettarget]

Will put the .zip (within recovery) in /sdcard/update.zip ready to apply.

If the sdcard root already has an update.zip it will be backed up, if the info is available it will be backed to the old name, if not it will be backed up to

OLD-update-timestamp.zip, optional target folder can be provided instead the default /sdcard.

if --autoapplyupdate is switched on the update is fetched directly into /cache, a command is written to /cache/recovery/command and the device is

rebooted back into recovery to automatically apply the update. This is useful if you do not have enough space on the sdcard for the update, or your

device is unable to access the sdcard but can still connect to WiFi.

if the file being retrieved is *.img file the user will be asked if he wants to flash it to boot or recovery, if recovery is chosen the file is installed in

/data/recovery.img and /system/recovery.img . SO, whichever ROM you might be using the new recovery.img should take hold.

nandroid-mobile.sh --delete --subname 3.6.4.1

Will look for and delete the earliest backup which matches, after a confirmation. Repeated application will remove multiple backups which

match, one by one.

nandroid-mobile.sh --help

Will explain everything.

Considering that the last version was viewed only once I have no hope in hell that someone would make an effort to test it or make useful suggestions for improvements.

My own thoughts are:

1) Need a C wrapper for it so that it can get hooked into the UI and actually

talk to UI.

2) Downloading over the air and flashing *.img, updates can now be done

over WiFi within recovery

OK THIS IS DONE, raw images or updates can be downloaded using WiFi.

3) If ftp (not tftp) was part of the recovery, perhaps then backups can be

pushed out over the air to authenticated ftp storage servers.

a. some form of encryption might be useful within the recovery.

4) Package a backup as an update.zip, so that one could easily move the backup

to a different device.

5) Direct download to /cache and application of updates using WiFi

DONE.

Hm, maybe at least someone finds it useful since there was a lot moaning about some of these issues in the thread.