[Epic 4G Android Development] DRockstar:
DEVELOPER NOTES:

Yes, this time there are developer notes! I will be adding more over the next couple of days.

SOURCES

ClockworkMod Binary:

https://github.com/CyanogenMod/android_bootable_recovery/tree/gingerbread

Epic4G device file sources:

https://github.com/koush/android_device_samsung_epic4g/tree/master

ClockworkMod Recovery kernel sources:

https://github.com/EpicCM/android_kernel_epic4g_gb_official/tree/cwm_5.0.2.7-rfs-ext4

I have put the branch trees in the URLs, since the masters could be subject to change in the future.

WHY CWM 5 WAS A CHALLENGE

ClockworkMod version 5 now stores the backup filesystem in the name of the tar backup files. When I first submitted my device files to koush for ROM Manager support, it became clear that now ClockworkMod would have to support the formatting of rfs volumes for the restores to work properly. This took me a while, but thankfully with the generous advice of mkasick, I wrote the function and pushed to the official source:

https://github.com/CyanogenMod/android_bootable_recovery/commit/a8f265dd6f764188d07ea2637d5638b8c64e4a6b

To experienced C programmers, this is easy stuff, but hey, admittedly, I'm a very new to C programming, and I wanted to learn... and I wanted to get it as correct as possible the first time... so this took me a while :)

RECOVERY KERNEL DETAILS

The important thing with a recovery kernel, is that it only needs to do one thing:

Load ClockworkMod, and anything ClockworkMod might need.

For this reason, there are minimal kernel modifications for the ClockworkMod Kernel. The following details, however, are worthy of note:

* This kernel supports kexec, as in the future, dual boot may become the norm.

* The boot mode for reboot recovery has been modified to reboot the bml8 recovery kernel, and not the boot kernel recovery.

* I left in the keypad timer patch by mkasick, since it really makes a difference in scrolling through the menus in ClockworkMod.

* The initramfs /sbin was modified to only have files needed for ClockworkMod, along with the following scripts and binaries that I often find useful:

bmlwrite - binary to flash kernels

bmlflash - script to flash boot or recovery kernels easily

bclean - script to clean all busybox files from /system

rclean - script to clean all busybox and root related files in /system

FOR BOOT KERNEL DEVELOPERS

It is highly recommended at this time to use this commit, to change boot mode for reboot recovery to boot from bml8 recovery partition:

https://github.com/EpicCM/android_ke...0b05d989bfad59

LESSONS FROM HAVING WORKED ON CLOCKWORKMOD RECOVERY

When I did ClockworkMod 3.1.0.1, I created a custom recovery, with some requested features. However, with time, it became apparent that having an official recovery with ROM Manager support was ultimately more favorable than having a custom one. Furthermore, with just a little effort and cooperation, the official source can be appended to include the most requested features. We're not the only ones asking for those features. I now believe that contributing to the official source benefits the entire community in the end, and not just one or two devices.

Along with my rfs formatting commit, I invited chris41g to contribute as well, and hence his following commit was also accepted, which allows only one "No" to appear in confirmations, when the blank file /sdcard/clockworkmod/.oneconfirm is detected:

https://github.com/CyanogenMod/andr...mmit/a8f265dd6f764188d07ea2637d5638b8c64e4a6b

Again, very simple here, but solves the most requested modification to ClockworkMod probably ever, and now, anyone with ClockworkMod 5.0.2.7+ can enjoy it too!

I really want to thank chris41g for taking the time to contribute. I respect and appreciate his work on the ACS Recovery, and I feel that his work will make even more of a difference in the end- to a lot more people than just the Epic 4G community.

I truly hope that my example can be an inspiration to others, to cooperate with other developers for the benefit of all. This may appear idealistic, but I believe the Epic 4G community has matured and has already started reaping the benefits of this cooperation. I also believe that in learning from others, you are also given the obligation to help others, who will, in turn, help others, and so on. I should hope that the benefits to all are obvious. And with that, I'll stop "preaching"... hehe.