ClockworkMod Recovery on Samsung Galaxy S - Vibrant - An Extremely Dangerous Journey

by Stephen Fluin 2011.05.13

One of the things the Froyo update did to the Samsung Galaxy S, Vibrant model, was not only to remove any rooting that was done (which can be overcome with superoneclick), but also to install a new recovery image that only allows signed updates. This means that even if you successfully root your device, by default you will be unable to install a custom recovery image, which would be necessary to backup your system, or to install a custom rom.

Fortunately, the intelligent people over at XDA have found a solution. The solution involves replacing the existing recovery binary with a modified version of the Android 3e recovery image that allows unsigned binaries. This is not a trivial task, so make sure you have a backup and are familiar with ADB, as I am not responsible for bricks.

  1. Download the new Recovery Binary. This is the binary we will be replacing on your system.
  2. Make sure you have a good adb connection to your phone. For me, this means running sudo su to become root, then running adb kill-server and adb start-server. I also typically run adb devices to get a list of the phones connected, and to ensure my phone is there.
  3. Load recovery onto your device using normal USB file transfer.
  4. This step would be easier on windows because the people over on XDA have packaged a windows .bat file that runs these commands in a nice little tool, but as I run linux, I had to open the file and translate the commands. Fortunately they weren't as tricky as I feared. Run the following:
adb shell su

At this point I had to approve SU access using the phone's interface.

mount -o rw,remount /dev/block/stl9 /system mv /system/bin/recovery /system/bin/recovery.bak

You can also delete this file, but I always like to play it safe. The next step would be a simple move, but for some reason I get an error failed on 'recovery' - Cross-device link when I try to move the file directly. Instead, I do a copy/movefrom the sd card.

busybox cp /sdcard/recovery recovery2 mv recovery2 recover chmod 0755 recovery

Now you can quit adb shell by typing quit or pressing CTRL+d

adb reboot recovery

Upon reboot, the updated recovery was loaded and seemed to work fine, so I booted into the system, and used RomManager's ClockworkMod Recovery image flasher. Once it had downloaded and written the appropriate to the filesystem, I rebooted into the updated 3e recovery, clicked on reinstall packages twice, and I was looking at ClockworkMod's Recovery image. From there I could make backups / flash roms / etc. Rebooting in the future also always returned me to the correct ClockworkMod recovery image.