Home > Linux > Extracting rom.zip from RUU update in Linux

Extracting rom.zip from RUU update in Linux

June 24th, 2010

I’ve written a quick rough and ready tool that can extract the rom.zip file from a RUU update from HTC.

The instructions are located in the extractrom.c file itself and reproduced here for clarity:-

 * REQUIREMENTS
 * This program requires a patched unshield 0.6 to correctly support newer
 * installshield cab files.
 *
 * $ wget http://bit.ly/aWIjG2 (used bit.ly link for blog due to styling issues)
 * $ tar xzf unshield-0.6.tar.gz
 * $ cd unshield-0.6
 * $ patch -p1 < ../unshield.patch
 * $ ./configure --prefix=/usr && make && sudo make install
 * 
 * COMPILATION
 * $ gcc -Wall -lunshield -o extractrom extractrom.c 
 * 
 * USAGE
 * $ ./extractrom /path/to/RUU.exe
 *
 * If successful it will create rom.zip in your current directory.
 *

(pay some attention to the NOTES and TODO sections - at the moment the tool doesn't clean up its temporary directory...)

Example Usage:-

$ ./extractrom RUU_Bravo_O2_UK_1.20.207.1_Radio_32.36.00.28U_4.06.00.02_2_release_124865.exe 
Extracting data1.cab...
Extracting data1.hdr...
Extracting rom.zip...
Done!
$ ls -lh rom.zip
-rw-r--r-- 1 kenny kenny 147M 2010-06-24 13:06 rom.zip

You can download it from here: extractrom-0.1.tgz.

Update (2011-12): This is now maintained in github at: https://github.com/kmdm/unruu/

Linux , , ,

  1. Emil
    | #1

    Works on Mac OS X too. If u have dev tools installed. (I did everything manually instead of running the script, had to choose file to patch because the script didn’t find it)

  2. Emil
    | #2

    Emil :
    Works on Mac OS X too. If u have dev tools installed. (I did everything manually instead of running the script, had to choose file to patch because the script didn’t find it)

    Sorry. Turns out the extraced zip file is bad and cannot be flashed.

  3. | #3

    If you used the extractrom tool I posted that’s because there’s 256 bytes of junk data at the start (Linux unzip ignores it).

    (I’ve got that fixed my end, just not published the updated version)

  4. Emil
    | #4

    Really? Interesting. How would I go about to fix that on my version of your extractrom tool? Thanks

  5. | #5

    I’ve pushed to:-

    https://code.launchpad.net/~kmdm/unruu/trunk

    …but not had time to attach here I’m afraid. Feel free to branch from there.

  6. Emil
    | #6

    Thank you for uploading the latest script. I recompiled and pushed the new rom.zip to my phone. Unfortunally it is not working. It tries to install the rom but quickly (before I can read) returns to the recovery menu.

  7. Emil
    | #7

    Nevermind, the method probably works. Seems like the RUU was bad to start with. Thanks for the help!

  8. Will
    | #8

    I run the script, but the zip it creates appears to have a totally different structure and does not apply when i choose rom.zip as the zip to apply from clockwork recovery

  1. | #1