Extracting ROM files from a HTC Android RUU

Official HTC ROM updates are released as RUUs (RUU = ROM Update Utility), which you run on your (Windows) PC to get the target device updated automatically. However convenient, RUUs have a major fault in the context of ROM customization: they don't support any. Some of the big brains in the Android community release RUUs re-packaged into signed update files, which in turn allow for whatever ROM customization you can imagine.

In this entry I will show you how to extract ROM files from a RUU image, which you can then customize and use to flash your device without the fear of a new bootloader possibly making your device unrootable.

Prerequisites:

This how-to is based on the 2.73.405.5 RUU for HTC Hero (GSM) released in late 2009, but has been verified as 100% working on the latest Android 2.1 RUU released in mid-2010.

The process of extracting ROM files from a RUU is really straightforward. The idea behind it is that the self-contained update utility first needs to unpack the update payload into a temporary folder before pushing it onto the device - and this is when we capture the ROM file.

First download the official RUU and then start Process Monitor. Next set the data filter inside Process Monitor to include all entries which contain "rom.zip" in the file path. You may also want to set a filter on process name to the RUU file name, as below:


Click "OK" to set the filter and then run the RUU file. Once the utility starts switch back to Process Monitor and look for an entry  in the "Path" column that ends with "\rom.zip". Right click on that line and select "Jump to..." - this will open a Windows Explorer window in the folder which contains the zipped ROM files.



Copy the "rom.zip" file to some other folder, outside of the temp RUU folder tree. Once copied, close Process Monitor and the RUU utility - we have what we came for. The copied "rom.zip" file contains the following files:
  • android-info.txt - list of CIDs this RUU will flash to,
  • boot.img - root file system image,
  • hboot (followed by a version string) - boot-loader update,
  • radio.img - radio driver update,
  • recovery.img - recovery partition image,
  • splash1_Hero_320x480.nb0 - boot loader splash image,
  • system_rel.img - system partition image,
  • userdata.img - data partition image.
You can now, among many other things, root the ROM and then flash the updated boot.img and all the other image files on to your device using Amon RA or some other custom recovery image, or become the next MoDaCo ;)

Whatever you do, make sure you know WHAT and WHY you are doing or you WILL end up owning an expensive brick.

3 comments:

Zeak said...

Thanks a lot! You made my day!

Rift said...

Thanks, very helpful tip. :-)

Dooly00000 said...

Guide still good. Thanks :)