Clockwork recovery has hit the DROID X courtesy of Koush who made the exciting announcement on Twitter. Previously demonstrated as a proof of concept earlier this week, the app that modifies the boot process and enables this custom recovery mode is now available as an apk from Koush’website for free or from the Android Market for $2. A minor fee that serves to support the efforts of these worthy hackers who make Android an exciting platform to be a part of. Straight from Koush’s website, here are details on his custom recovery:
This is not a *real* recovery. The way this recovery works is by hijacking portions of your boot process during system initialization and starting into recovery instead. So, if you hose your system *COMPLETELY* you will need to SBF. Specifically, if your logwrapper, logwrapper.bin, or hijack binary are missing from /system/bin, you will be screwed.
So can we now install custom ROMs?
Yes, but you can’t replace the kernel or boot image. But really, once you have access to /system, anything is possible. It will just take a little hackery.
How does this work?
When your device boots up, there is a init.rc script in your boot image that runs various components found in /system. The Droid X recovery bootstrap mimics the “logwrapper” binary. The hijacker then looks for “/data/.recovery_mode”, and if it finds it, it unmounts /system to prevent android from starting. It then starts up recovery instead.
How do I boot into recovery?
You can manually create the /data/.recovery_mode via a terminal file and simply reboot, and you will be in recovery. Or you can use the handy Droid X Recovery Bootstrap application to reboot into recovery.
What if my phone won’t boot? How do I get into recovery without the app?
When the hijacker runs, it will automatically create the “/data/.recovery_mode” file after it finishes. This tells the system that the next time it boots, it should boot into recovery. But, when the system starts, the Droid X Recovery Bootstrap will then delete that file when Android is fully started, to prevent you from booting into recovery. So what does this mean? If you fail to boot, simply pull your battery, and your next boot will be into recovery (unless your /system is *really* hosed, in which case you need to SBF).
Why does the Droid X Recovery Bootstrap start on boot?
As mentioned above, it needs to log that your phone booted successfully and recovery mode is not necessary. It also replaces your “adb daemon” with one that has root permissions, allowing for easier usage of the adb command.
Will this work with ROM Manager?
Yes, but not yet. I need to make some minor updates to ROM Manager first to support this recovery. Future recovery updates will come through ROM Manager.
Is this open source?
This recovery mode paves the way for custom ROMS to hit the handset and is presumably a thorn in the side of Motorola which has publicly stated that “preventing a non-Motorola ROM image from being loaded, has been our common practice for many years”. Right now ROM Manager is not supported but will be in the near future and all recovery updates will be delivered through the ROM manager application. Any Droid X owners happy to finally have a nandroid backup and anxious for some custom ROMS?