FORUMS
Remove All Ads from XDA

[DECRYPT ROM.ZIP] RUUVEAL - Decrypt the rom.zip file included in the RUU

1,974 posts
Thanks Meter: 1,323
 
By joeykrim, Recognized Developer on 5th January 2013, 10:30 PM
Post Reply Email Thread
Credits:
kmdm (AlphaRev/Revolutionary Member: built the tool and supported this post!)

Background:
HTC encrypted the rom_01.zip file inside the latest RUU - RUU_JEWEL_CL_JB_45_S_Sprint_WWE_3.15.651.16_Radio_ 1.12.11.1119_NV_2.87_003_25007_release_299302_sign ed.exe .
Due to the new encryption, ROM developers were unable to decrypt the ROM.zip for use as a stock ROM base.

Solution:
kmdm worked to reverse the process and built a tool, ruuveal, to decrypt the encrypted ROM.zip files from the RUU.exe.

Result:
Now, anybody can use the simple tool ruuveal to decrypted the ROM.zip.
Example uses for a decrypted ROM.zip are: a base for a stock ROM, selectively flashing the latest software to specific partitions (radio.img, system.img, etc) and researching to understand the latest stock software.

Download:
https://github.com/kmdm/ruuveal/

Directions (taken from README.md and kmdm tips below):
Compile (terminal commands in bold):
1) sudo apt-get install libmcrypt-dev automake autoconf libtool libssl-dev
(libmcrypt-dev package is required. if not previously installed, bash autogen.sh will throw "`AM_PATH_LIBMCRYPT' not found". other errors will be thrown when running autogen if the automake, autoconf and libtool packages haven't been installed. openssl/aes.h requires libssl-dev package)
(kmdm: To run the autotools step (autogen.sh) you, um, need the autotools installed... E.g. (in the very least): automake, autoconf, libtool.)
2) bash autogen.sh
3) ./configure ; make

Alternative Route (kmdm provided):
Snapshot tarballs are available for download from: (kmdm: There's no difference to the source tree except you don't need autotools and can just run configure and make.)
http://psi.kennynet.co.uk/software/ruuveal

Usage:
ruuveal jewel rom_01.zip rom_01_decrypted.zip

FAQ:
How to obtain the rom.zip?
Recommended: https://github.com/kmdm/unruu

Can my HTC device be added?
Three Requirements:
1) Hboot file
2) RUU file
3) Device identification. Example: adb shell getprop ro.product.device OR fastboot getvar product
Open an issue tracker on the github site and provide this information.

Does this tool work in Windows?
Quote:
Originally Posted by kmdm

Step 1: Install a proper OS
Step 2: Follow already provided instructions

Running Ubuntu in a virtual machine is fairly simple. Recommend using VirtualBox.

Can the .zip file be encrypted?
Quote:
Originally Posted by kmdm

ruuveal can encrypt the zip just fine since it uses symmetric encryption.

Quote:
Originally Posted by kmdm

Of course you'll still need s-off to flash a modified encrypted zip since you can't sign it correctly without htc's private key *

The zip file can be encrypted but will only be flashed on a device with s-off.
To encrypt and flash a zip file on a device w/o s-off, htc's private key is required to encrypt the zip file.


Good luck ROM developers!
The Following 91 Users Say Thank You to joeykrim For This Useful Post: [ View ]
 
 
6th January 2013, 12:37 AM |#2  
kmdm's Avatar
Retired Recognized Developer
Thanks Meter: 501
 
More
Minor update...

Snapshot tarballs are available for download from:-

http://psi.kennynet.co.uk/ruuveal/

There's no difference to the source tree except you don't need autotools and can just run configure and make.
The Following 46 Users Say Thank You to kmdm For This Useful Post: [ View ] Gift kmdm Ad-Free
6th January 2013, 12:39 AM |#3  
steal25's Avatar
Recognized Developer
Flag Behind a dumpster in the Los Angeles Harbor
Thanks Meter: 6,936
 
Donate to Me
More
Thank you for this!!
The Following User Says Thank You to steal25 For This Useful Post: [ View ]
6th January 2013, 01:16 AM |#4  
Senior Member
Thanks Meter: 2,917
 
More
Very nice indeed. Thank you.
The Following User Says Thank You to SteelH For This Useful Post: [ View ] Gift SteelH Ad-Free
6th January 2013, 01:41 AM |#5  
NineInchNails's Avatar
R.I.P. - We'll see you around, bud...
Flag Minnesota
Thanks Meter: 5,528
 
Donate to Me
More
Atta boy kmdm!! VERRRRY useful and much appreciated sir. Great Job.
The Following User Says Thank You to NineInchNails For This Useful Post: [ View ] Gift NineInchNails Ad-Free
6th January 2013, 04:30 AM |#6  
Senior Member
Thanks Meter: 227
 
More
I want to know I enter sudo apt-get install libmcrypt-dev Installation is complete

Then enter sh autogen.sh The following message appears
boa@boa-VirtualBox:~/android/kernel/ruuveal$ sh autogen.sh
autogen.sh: 2: [: unexpected operator
autogen.sh: 10: autogen.sh: autoreconf: not found

Then enter ./configure ; make The following message appears
bash: ./configure: Not a file or directory
make: *** No targets specified and no makefile found. Stop.

How to solve it? Someone told me?

I want to decompose in HTC One S 4.1.1 RUU ROM.ZIP
Thank you very much
The Following User Says Thank You to boa19861105 For This Useful Post: [ View ] Gift boa19861105 Ad-Free
6th January 2013, 08:01 AM |#7  
kmdm's Avatar
Retired Recognized Developer
Thanks Meter: 501
 
More
Quote:
Originally Posted by boa19861105

I want to know I enter sudo apt-get install libmcrypt-dev Installation is complete
Then enter sh autogen.sh The following message appears
boa@boa-VirtualBox:~/android/kernel/ruuveal$ sh autogen.sh
autogen.sh: 2: [: unexpected operator
autogen.sh: 10: autogen.sh: autoreconf: not found

So, a few things things:-

1. If it's the autogen.sh step that's not working for you you could have at least read my reply like about 4 short posts above yours giving the link to the snapshot downloads where I clearly state that the autogen.sh step is not required.

2. Your first problem is that you're not following my compilation instructions but joeykrim's (and I didn't notice the subtle difference): "sh autogen.sh" vs "./autogen.sh". autogen.sh clearly states it wants to be run by bash (#!/bin/bash), your default shell is clearly not bash. (If I were to guess I'd say it was dash.)

3. To run the autotools step (autogen.sh) you, um, need the autotools installed... E.g. (in the very least): automake, autoconf, libtool.
The Following 3 Users Say Thank You to kmdm For This Useful Post: [ View ] Gift kmdm Ad-Free
6th January 2013, 08:23 AM |#8  
Senior Member
Thanks Meter: 227
 
More
Quote:
Originally Posted by kmdm

So, a few things things:-

1. If it's the autogen.sh step that's not working for you you could have at least read my reply like about 4 short posts above yours giving the link to the snapshot downloads where I clearly state that the autogen.sh step is not required.

2. Your first problem is that you're not following my compilation instructions but joeykrim's (and I didn't notice the subtle difference): "sh autogen.sh" vs "./autogen.sh". autogen.sh clearly states it wants to be run by bash (#!/bin/bash), your default shell is clearly not bash. (If I were to guess I'd say it was dash.)

3. To run the autotools step (autogen.sh) you, um, need the autotools installed... E.g. (in the very least): automake, autoconf, libtool.



Is there a way to unlock the "butterfly X920D the ROM.ZIP it?
6th January 2013, 12:16 PM |#10  
kmdm's Avatar
Retired Recognized Developer
Thanks Meter: 501
 
More
Quote:
Originally Posted by mike1986.

To add support for new devices its enough to edit main.c and devices.h ?

No.

(which device? Link to the hboot for it that can read the encrypted zips)

Sent from my Nexus 7 using Tapatalk 2
The Following 3 Users Say Thank You to kmdm For This Useful Post: [ View ] Gift kmdm Ad-Free
6th January 2013, 01:31 PM |#11  
mike1986.'s Avatar
Recognized Contributor
XDA-Developers
Thanks Meter: 77,098
 
Donate to Me
More
Quote:
Originally Posted by kmdm

No.

(which device? Link to the hboot for it that can read the encrypted zips)

Sent from my Nexus 7 using Tapatalk 2

Let's say HTC One X (Tegra) and One X+ (Tegra as well).

Links:

One X
One X+
Post Reply Subscribe to Thread

Tags
decrypt rom.zip

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes