[Fascinate Android Development] djp952:
GeeWiz Gingerbread Recovery

Background

GeeWiz Recovery is the project I started working on back in the day before trying to get into ROMs at all. I wanted to learn some of the ins and outs of Android/Linux development, but am also one of those annoying "non-Java" guys. Playing around with Kernels and ultimately a Recovery system was a much more comfortable fit for me.

Like all things I seem to try to do, it doesn't have extreme ambitions for cool new things never seen before, it's just supposed to do what it claims to do and do those things well. When compared with something like ClockworkMod, for example, it is a rather limited toolset. That said, I think it also can suit the needs of most folks that are just looking for a tool that will allow them to install updates, create and restore volume backups, properly wipe their devices, or convert from the RFS filesystem to EXT4 (so far anyway!)

GeeWiz Recovery is based on the Android AOSP 2.3.5 Recovery code and is not a derivative work of any other recovery. Many features are undeniably common, and I would be lying if I claimed I didn't need to look at projects like ClockworkMOD for assistance on more than one occasion. GeeWiz recovery is specifically written for the STOCK Samsung SCH-I500 (Fascinate/Mesmerize) device and cannot be properly used on any other devices without modifications. This tool also cannot be properly used on SCH-I500 devices that have been converted to "MTD" (CyangoenMOD, MIUI, etc).

-------------------------------------------------------------------------------------------------------

>> NAVIGATION <<

VOLUME UP: Move menu item selection bar up

VOLUME DOWN: Move menu item selection bar down

MENU: Go back to previous menu

HOME: Go back to main menu

BACK: Select highlighted menu item

SEARCH: No operation

-------------------------------------------------------------------------------------------------------

>> MENUS <<

MAIN MENU

Install Update Package - Opens an SDCARD file browser and allows you to select an Update-Zip package to be installed to your device

Wipe Device Data - Shows the Wipe Device Data Menu

Manage Volumes - Shows the Manage Volumes Menu

Tools - Shows the Tools Menu

Exit - Exits recovery and reboots the device

WIPE DEVICE DATA MENU

Wipe Cache - Wipes (formats) the CACHE volume of the device

Wipe Dalvik Cache - Wipes (deletes) the DALVIK-CACHE from the device. Use this option after flashing any non GeeWiz ROM to your device (GW does it automatically)

Wipe Battery Statistics - Wipes (deletes) the battery statistics file from the device. Use this option with a fully charged battery to reset your battery meter.

Wipe all user Data (Factory Reset) - Executes a Factory Reset operation. All user data not on the SDCARD will be deleted, and all data volumes will be formatted. This option will reformat data volumes with either RFS or EXT4, depending on what file system is already in place. To convert file systems, please see MANAGE VOLUMES MENU below.

MANAGE VOLUMES MENU

Mount Volumes - Allows you to specifically mount a device volume by name. This operation is not required for other Recovery operations, they will automatically mount or unmount volumes as needed

Unmount Volumes - Allows you to specifically unmount a device volume by name. This operation is not required for other Recovery operations, they will automatically mount or unmount volumes as needed

Backup Volumes - Allows you to generate a backup of a device volume by name. Please see BACKUP/RESTORE below for more details.

Restore Volumes - Allows you to restore a volume from a backup generated by this Recovery. Please see BACKUP/RESTORE below for more details.

Convert Volumes - Allows you to convert device volumes to and from the RFS and EXT4 file systems. Volumes with only one valid target file system are not shown in this list.

Format Volumes - Allows you to format device volumes with either the RFS or EXT4 file systems. Volumes with more than one valid target file system will prompt with an additional selector to allow you to choose the desired file system.

TOOLS MENU

Restart ADBD Service - Restarts the Android Debug Bridge (ADBD) service. Select this option if you are having difficulty connecting to the device through ADB while Recovery is running

-------------------------------------------------------------------------------------------------------

>> BACKUP/RESTORE <<

This version of GeeWiz Recovery allows you to back up and restore the individual volumes of the device to the SDCARD, using a handful of different formats. Currently, the destination location of these backups on the SDCARD is fixed as /sdcard/backup/volume and cannot be changed. Future versions of GeeWiz recovery will provide for complete device backup/restore operations.

BACKUP FILE NAMES/FORMATS

When generating a volume backup, you will be prompted to choose from one of four different formats, which are listed below. All backup files will be generated with the filename format of VOLUME-YYYYMMDD[-N].EXT, where VOLUME is the volume name, YYYYMMDD is the current date, -N is an optional unique number used to differentiate between multiple backups made on the same day, and EXT is the default file extension for the selected backup type and compression setting. (Currently compression cannot be disabled)

EXT4 IMAGE [.ximg/.ximg.gz] - This option will generate an EXT4 image of the selected volume. These images can be used to create volume images that can be mounted and manipulated on other Linux systems. The generated image (uncompressed) will be of equal size to the source volume.

EXT4 SPARSE IMAGE [.simg/.szimg] - This option will generate a 'Sparse' EXT4 image of the selected volume. These images are similar to a full EXT4 image, but are only as large as the data on the volume requires. An android tool called simg2img is required to convert these back into a standard EXT4 image before they can be used on other Linux systems. When compression is enabled (.szimg files), a custom tool is required to unpack them into standard EXT4 images; this tool is available upon request, however I did contribute the necessary code changes back to AOSP with the hopes it will someday be included in Android.

RAW DUMP [.img/.img.gz] - This option will create a raw dump image file from the selected volume. If the volume is EXT4, the output is very similar to an uncompressed EXT4 IMAGE. If the volume is RFS, this image becomes an ODIN-compatible dump of the volume.

YAFFS2 IMAGE [.yimg/.yimg.gz] - This option creates a YAFFS2 image file from the selected volume extremely similar to, if not identical to, the backup files made by ClockworkMOD Recovery. These images are used for general-purpose backup and restore needs; they provide the fastest means of backing up and restoring a device volume. GeeWiz Recovery uses this format internally when converting volume file systems to provide the fastest possible conversion.

It is not necessary to know what format was used to generate a backup when it's being restored or if it has been compressed or not. The restore code will automatically determine this, and can successfully restore any format listed above. Backup files generated by other means or recovery systems are not guaranteed to be able to be restored with GeeWiz Recovery.

-------------------------------------------------------------------------------------------------------

>> INSTALLATION <<

GeeWiz Recovery can either be installed by flashing it directly with ODIN or if you already have an Edify-compatible custom Recovery like ClockworkMod installed you can use that as well. Install it as you would any flash update with these tools, I wouldn't dream of being able to provide better direction than what already exists out here on the Internet for using them.

Download links for GeeWiz Recovery are included as part of the main post above, and will be maintained/updated in that post.

-------------------------------------------------------------------------------------------------------

>> SOURCE CODE <<

All Source Code for GeeWiz recovery is included as part of my SCH-I500 Gingerbread Kernel GIT. Explanation as to how to compile it or what tools you need to compile are beyond the scope of this post, but please feel free to contact me if you give it a try and run into difficulties. (hint: start with build.sh and see if it works!). Enterprising types that see I also have a Froyo version out there, please be warned it's not up to date and exposes some potentially harmful functionality. This GB version was sanitized a bit.

https://github.com/djp952/sch-i500-gingerbread

-------------------------------------------------------------------------------------------------------

>> REUSE <<

If anyone finds this recovery of value and would like to include it their SCH-I500 ROMs or KERNELs, please feel free to do so. Link back here, include it in your updates, compile your own and change the menu colors to purple, whatever you want to do with it is fine with me. If you want to mention my name, that'd be cool, but is certainly not a requirement of any kind. If I didn't want it to be used, I wouldn't have posted all the source code (so far) to github!!