yashsingh1/xdaforums huggingface dataset:
[Sprint HTC EVO 4G LTE] Sneakyghost:
Thanks for your answer. Obviously i didn't make myself clear enough though. Obviously a decrypted zip won't need a decryption.

I was trying to say much rather, that, even though hasoon has already decrypted that RUU, i needed it to work in its encrypted state.

However, when flashing it, it failed when reaching the System.img, which seemed to be the only obfuscated bit.

So i figured, it might be possible, that the older hboots from HTC, of which i was then running one, would maybe lack the required AES Keys to decrypt such a new RUU.

However, by now i believe this is BS, as all hboots always need to be able to run any RUU or else, the Service Centers could not efficiently work on phones sent in with old hboots. it just makes no sense. So i need to go look somewhere else for the cause of my error.

Anyway, thanks for your time.
[Sprint HTC EVO 4G LTE] kmdm:
If that is truly your situation and question then you are:-

a) not a developer and therefore;

b) not in ruuveal's target audience.

I suggest you wait for someone to post the decrypted zip file that you want.

Also: DON'T DO THINGS AS ROOT WHEN YOU DON'T NEED TO
[Sprint HTC EVO 4G LTE] Sneakyghost:
Can support be added for Villeplus (HTC One S Special Edition) based on a hboot raw dump?

I got an S-OFF version as a present from HTC and would like to decrypt the Villeplus thing yet there is only an ASIA JB RUU available as of now.

Any ideas what to do?
[Sprint HTC EVO 4G LTE] kmdm:
Indeed.

Provide the HBOOT dump and the output of:-

$ fastboot getvar product
[Sprint HTC EVO 4G LTE] BanB:
Works fine for the HTC Ville Plus JellyBean 1.14.709.16 RUU.

Thanks mate :)
[Sprint HTC EVO 4G LTE] Sneakyghost:
hboot raw dump (dd if= thingy): http://www.mediafire.com/download.php?mkyb2ir8uvfqiga

ROM.zip: http://www.4shared.com/zip/t4Zv5DJR/ROM_RUU_VILLEPLUS_U_JB_45_hTC_.html

$ fastboot getvar product: "vle" (isn't that equal to the normal One S?

ro.product.device=villeplus
[Sprint HTC EVO 4G LTE] markwoo:
Thank you so much for your informative response. It is unfortunate that someone with your knowledge allows his ego to shape his responses with such arrogance. I do not claim to be a dev. I do enjoy doing things on my own device, as do many others.

A.my computer if I want to use root. My choice my computer

B.audience me
[Sprint HTC EVO 4G LTE] kmdm:
Support should already be present using the "ville" device. There is no different key material in the provided HBOOT.
[Sprint HTC EVO 4G LTE] kmdm:
My response is only as arrogant as your question is ignorant.

To understand that, we must first consider what you were able to accomplish and then we can see the ridiculousness of the question. Your question is very similar to building a car from a kit and then asking the manufacturer why it's not going anywhere - eventually they might ask "But did you get in and drive it - did you actually use it?"

Back to ruuveal: You have a successfully built the ruuveal binary (which given your question is somewhat impressive). I find it sad that you were able to follow the Compilation instructions from the README(.md) file provided at github but failed to scroll just that bit further down to the Usage instructions which would have told you how to actually use ruuveal.

So, to answer your question:-

You have built ruuveal, you now have a ruuveal binary. You have but to run this binary to produce your decrypted zip file. From within your ruuveal-master directory:-

# ./ruuveal DEVICE /path/to/your/encrypted.zip /path/to/where/you/want/your/decrypted.zip

Replace DEVICE with the device code-name for your device (see the Supported Devices section of the README).

If your encrypted zip is located in the current directory (in your ruuveal-master directory) you can omit the fully qualified path.

...Likewise for the decrypted.zip.

I'm afraid I don't know what "audience me" means. The closest approximation I can think of is when babies talk for the first time and express themselves using "me" as their personal pronoun with the absence of complete sentences. With that in mind I'll presume you're trying to respond to my comment regarding target audience and say that you are in ruuveal's target audience: You are not. It is the creator/author who sets the target audience of a product, which you are not. Whilst you could educate yourself into the target audience you are currently not in it. Hopefully the following image (venn diagram) will clear this up:-
[Sprint HTC EVO 4G LTE] Sneakyghost:
Again, that was clear before i or you responded. Purpose: double check and add to your list of supported devices in your readme and git. Thanks for that nice job you did here.
[Sprint HTC EVO 4G LTE] kmdm:
Aha! :) I think we got crossed wires when you asked about support being added etc...

It's no problem anyway, was nice to confirm things still work as they should. (The only thing being the change of device codename - which might be my fault or HTC changing their mind xD)
[Sprint HTC EVO 4G LTE] markwoo:
Lol. Thank you nice pic
[Sprint HTC EVO 4G LTE] Onepagebook:
hey dear master joeykrim,

I have sent you PM regarding new htc One supported info,please take time to read and please get back to me ..

I appreciate that.

Onepagebook
[Sprint HTC EVO 4G LTE] joeykrim:
Quoted from the FAQ in the OP:
[Sprint HTC EVO 4G LTE] Onepagebook:
gotcha, thanks very much for the info
[Sprint HTC EVO 4G LTE] joeykrim:
Executing ruuveal with no path in front means you are executing a binary named ruuveal from the environment defined $PATH .

Command not found from your given command means there is no binary called ruuveal in your environment defined $PATH.

To start I would suggest trying to execute the binary from the same local directory you compiled it in by using this command: ./ruuveal or searching for where the binary was installed to.

Hope that helps!
[Sprint HTC EVO 4G LTE] mike1986.:
oh yes, that helped! :)

Anyway I think I'm still doing something wrong, because:

...but rom_enc.zip still gives CRC error. I was sure I managed to run it on Cygwin successfully (I have all necessary packages installed, including libmcrypt) but still no luck. I'll keep trying.

EDIT: I think I know what I was doing wrong. Checking now again.

EDIT 2: Yep, it worked :) Thanks again!
[Sprint HTC EVO 4G LTE] simonsickle:
If I took a gander at why they would be encrypting them, my guess would be to protect against pre-release leaks. We all know that the hboot is what contains the key needed to decrypt the zip thanks to kmdm. With a little logic, you can deduce the following:

if you have a unreleased rom for an unreleased device, then you have no hboot for that device

if you have no hboot for that devvice, then you have no signature

if you have no signature, then you have a useless encrypted rom.zip

if you have a useless rom.zip then you cant port your rom to a new phone before the unreleased one hits market

if you cant port the rom to an already popular phone, then htc gains new sails from people who want the "Newest sense" right then and there

Simple logic, if you ask me :)
[Sprint HTC EVO 4G LTE] sharkie405:
nvmd...
[Sprint HTC EVO 4G LTE] mike1986.:
I got it working already, but thanks anyway!
[Sprint HTC EVO 4G LTE] markwoo:
that was very useful post got me going it took someone else to explain how to make this tool work....it was ur post that helped me figure it out not the maker..
[Sprint HTC EVO 4G LTE] nenebear:
When can we expect the new M7 can be decrypted? Many thanks, I appreciate that. :p
[Sprint HTC EVO 4G LTE] alwayskangel:
M7 decryption expect

My English is not good sorry
[Sprint HTC EVO 4G LTE] kmdm:
https://github.com/kmdm/ruuveal/commit/00d2c792815561a7e4adc74caa5fdd98da98a3d8
[Sprint HTC EVO 4G LTE] mike1986.:
Thanks for the update. Got small problem:

gcc -DPACKAGE_NAME=\"ruuveal\" -DPACKAGE_TARNAME=\"ruuveal\" -DPACKAGE_VERSION=\"0.2.0\" -DPACKAGE_STRING=\"ruuveal\ 0.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DLIBMCRYPT24=1 -I. -D_FORTIFY_SOURCE=0 -I/usr/include -g -O2 -MT htczip.o -MD -MP -MF .deps/htczip.Tpo -c -o htczip.o htczip.c

htczip.c:24:27: bits/byteswap.h: No such file or directory

Makefile:341: recipe for target `htczip.o' failed

make: *** [htczip.o] Error 1
​

It's looking for byteswap.h but it's in the default location - \usr\include\.

EDIT:

I edited htczip.c and changed

#include <bits/byteswap.h>
​

to

#include <byteswap.h>
​

But now it gives following output:

mv -f .deps/htczip.Tpo .deps/htczip.Po

gcc -DPACKAGE_NAME=\"ruuveal\" -DPACKAGE_TARNAME=\"ruuveal\" -DPACKAGE_VERSION=\ "0.2.0\" -DPACKAGE_STRING=\"ruuveal\ 0.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_ URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB _H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DLI BMCRYPT24=1 -I. -D_FORTIFY_SOURCE=0 -I/usr/include -g -O2 -MT devices.o -MD - MP -MF .deps/devices.Tpo -c -o devices.o `test -f 'htc/devices.c' || echo './'`h tc/devices.c

htc/devices.c:35:2: warning: no newline at end of file

mv -f .deps/devices.Tpo .deps/devices.Po

/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o ruuveal.exe main.o htcaes.o htckey.o htczip.o devices.o -L/usr/lib -lmcrypt

libtool: link: gcc -g -O2 -o .libs/ruuveal.exe main.o htcaes.o htckey.o htczip.o devices.o -L/usr/lib /usr/lib/libmcrypt.dll.a

htczip.o: In function `htc_zip_read_header':

/home/ruu/htczip.c:30: undefined reference to `___bswap_co nstant_16'

htczip.o: In function `htc_zip_write_header':

/home/ruu/htczip.c:30: undefined reference to `___bswap_co nstant_16'

/home/ruu/htczip.c:30: undefined reference to `___bswap_co nstant_16'

collect2: ld returned 1 exit status

Makefile:325: recipe for target `ruuveal.exe' failed

make: *** [ruuveal.exe] Error 1
​
[Sprint HTC EVO 4G LTE] kmdm:
Windows is not supported.
[Sprint HTC EVO 4G LTE] mike1986.:
Well, I have set up all necessary environment in cygwin, including libmcrypt. Also, all was working fine with previous build of ruuveal.
[Sprint HTC EVO 4G LTE] kmdm:
Windows. Is. Not. Supported.

What that means is that I do not test that it works on Windows (or even care if it does so). It means I am under no obligation to ensure that any change does not break Windows compilation[1]. If it worked for you in the past - great, but that by no means implies it'll work in the future.

I will, however, accept any pull request for Windows support that introduces a vcproj file (or similar) with required code changes. (Notably this excludes cygwin and mingw32).

[1] That aside, the recent commit would not have caused the errors you are seeing - just look at the diff. Of-course, if you never tried the encrypt branch before... then that changeset would have broken it.
[Sprint HTC EVO 4G LTE] nenebear:
Thanks very much for the hard work, it's fully working. :good: :good: :good:
[Sprint HTC EVO 4G LTE] matt95:
thank you very much :) now i can unzip the m7 RUU correctly

here's what i get:

$ unzip rom_decrypted.zip
Archive: rom_decrypted.zip
inflating: hboot_signedbyaa.img
inflating: android-info.txt
inflating: radio.img
inflating: rcdata.img
inflating: boot_signed.img
inflating: recovery_signed.img
inflating: system.img
inflating: splash1.nb0
inflating: dzdata_16g.img
inflating: dzdata_32g.img
inflating: dzdata_16g.hdr
inflating: sbl2.img
inflating: sbl3.img
inflating: tz.img
inflating: rpm.img
inflating: adsp.img
inflating: pg2fs_spcustom.img
inflating: ramdisk.img
inflating: tp_SYN3202.img
inflating: sbl1-1.img
inflating: sbl1-2.img
inflating: sbl1-3.img
inflating: dzdata_64g.hdr
inflating: dzdata_32g.hdr
inflating: dzdata_64g.img
[Sprint HTC EVO 4G LTE] benny3:
Thanks Guys for this tool

This is my first crack at this and im not all that witty with linux right now im still learning. Anyways this what i got

benny@bennybox:~/Downloads/ruuveal-0.2.0$ ./ruuveal --device m7_wls rom_01.zip rom_01 decrypted
ruuveal
-------

Decrypted RUU (zip) written to: rom_018
benny@bennybox:~/Downloads/ruuveal-0.2.0$

But for the life of me i can not find the rom_018. Did i screw up?...lol
[Sprint HTC EVO 4G LTE] matt95:
it should be in the ruuveal folder
[Sprint HTC EVO 4G LTE] -viperboy-:
Just caught up on this thread. Been an entertaining read, that's for sure :) funny how you have to say things multiple times because people either can't read or choose not to read the OP. Not sure why people are so afraid of Linux either, but still choose to use an Android phone. Makes me chuckle :)

Thanks for your contributions to this tool though sir.
[Sprint HTC EVO 4G LTE] NineInchNails:
I think what you mean to say is how many times you had to read it over Derek :cool::beer:
[Sprint HTC EVO 4G LTE] Homeboy76:
issue tracker

I tried to open a issue tracker to no avail.

I want to request Ruuveal for HTC vivid/ph39100 holiday
[Sprint HTC EVO 4G LTE] hasoon2000:
Vivid isn't encrypted.

Sent From My HTC One via Someone's Room ;)
[Sprint HTC EVO 4G LTE] Homeboy76:
Thanks for the information. I am learning how to develop roms. So, you're saying I need to do more research? lol
[Sprint HTC EVO 4G LTE] hasoon2000:
You need to do A LOT more research. They starting encrypting ROMs not to long ago. The vivid is an older device now and no new RUUs have been released since it received ICS last year.

Sent From My HTC One via Someone's Room ;)
[Sprint HTC EVO 4G LTE] Homeboy76:
I appreciate your honesty. Where would you suggest an aspiring developer begin researching 'encrypted roms/ruu'?
[Sprint HTC EVO 4G LTE] showjechar:
encrypt output.zip is not correct

i used WinHex view the encrypted output.zip found Less than 0x100 bytes and use fastboot flash zip output.zip failed

sending 'zip' (441132 KB)...

OKAY [ 41.808s]

writing 'zip'...

FAILED (remote: 12 signature verify fail)

finished. total time: 41.839s

thank you for this tool

i'm sorry my english is so bad
[Sprint HTC EVO 4G LTE] kmdm:
If only there was a github repository and associated issuetracker for such things....

That aside:

1. If you're saying that the output from ruuveal -E is 0x100 bytes less than the source zip - that is expected and correct.

2. If you are some combination of S-ON and/or (RE)LOCKED - It won't flash either.
[Sprint HTC EVO 4G LTE] showjechar:
thank you for answer me

my htc is LOCKED
[Sprint HTC EVO 4G LTE] pashaa:
some one can share compiled unruu?

Thanks.
[Sprint HTC EVO 4G LTE] pashaa:
no body cant compiled this?

in our country i cant git that source(because of https protocol).

i need that.
[Sprint HTC EVO 4G LTE] Sneakyghost:
There are snapshot tarballs in post one. Did you try them? I don't think they're on github.

Can you not use any https where you are?

[EDIT]

And a lot later i realize you were asking for unruu and not ruuveal. Sorry i misread your post. there are no tarballs for unruu i believe.

Help yourself by running the RUU on a windows machine and grab the ROM.zip from the /TMP folder. It'll be easier for now as i am not able to make a compiled unruu for you. My linux is still inaccessible. Didn't get around fixing my netbook's Bootloader. Also, i am not sure i am good enough with linux yet to easily provide a working compile of a github clone. I am not even quite sure yet which terms mean what :D could be that i would have to play around with it for hours and curse a lot before i get what you want. ;)

Otherwise i would of course want to help out.
[Sprint HTC EVO 4G LTE] pashaa:
yes i try that one but no success,

please give me compiled file

Thanks.
[Sprint HTC EVO 4G LTE] Sneakyghost:
I currently don't have access to my Linux system as it's on my wife's laptop. Also I'm not familiar enough with Linux to be able to tell you how to use the files I build from the instructions in post #1.

I'm not sure I can help you.

mobile post
[Sprint HTC EVO 4G LTE] cichy20a:
Any way to add HTC One S [S3 CPU] it's Ville C2. Output ot fastboot getvar product = villec2

HBoot from latest WWE OTA.

Encrypted rom.zip from JB Vodafone RUU (Only one RUU for VilleC2 that I could find). I've tried ville model to decrypt it but no chance it still gives encrypted zip file.

--- Edit

Added by kmdm after opening issue @ github. Thanks a lot for support :)
[Sprint HTC EVO 4G LTE] monitorstudioworker:
Could this tool turn the modified zip into encrypted zip ?

Or how can I do it ?

Thanks for helping !!!
[Sprint HTC EVO 4G LTE] joeykrim:
I'm not sure this is possible. My understanding is this encryption model follows the standard public and private key setup.

To decrypt a .zip file, the public key is used. To encrypt a .zip file, the private key is used. The private keys are not distribute and I would imagine are closely guarded making the process of creating an encrypted .zip very difficult and unlikely to be properly created soon without some kind of exploit.
[Sprint HTC EVO 4G LTE] sunnyyen:
Ruuceal: command not found

Total noob here. Heard about this ruuveal and followed links to this thread, only to find I have to use Linux. Installed Ubuntu and got it running today, downloaded ruuveal-master.zip, unzipped, work in the unzipped directory in terminal, pasted all the terminal commands line by line and saw many many lines of prompts talking about installation of lots of stuff I don't understand, untill in the end when I got to the Usage part, when I pasted the line "ruuveal jewel rom_01.zip rom_01_decrypted.zip" and got a prompt "ruuveal: command not found". What did I do wrong?

Edit: Wait, I think I found the answer in earlier posts. Thanks!
[Sprint HTC EVO 4G LTE] kmdm:
ruuveal can encrypt the zip just fine since it uses symmetric encryption.
[Sprint HTC EVO 4G LTE] joeykrim:
excellent! very good to know, symmetric encryption. one key for encrypting and decrypting makes an interesting security model...

OP FAQ updated
[Sprint HTC EVO 4G LTE] kmdm:
Ofcourse you'll still need s-off to flash a modified encrypted zip since you can't sign it correctly without htc's private key ;)
[Sprint HTC EVO 4G LTE] joeykrim:
Alright, that seems to be the rest of the concept. I've added this to the OP FAQ as well to clarify the process for both devices with soff and devices without.
[Sprint HTC EVO 4G LTE] paul_59:
Whilst this site may have started as way for Android developers to share ideas and help each other, I suspect that there are now a significant proportion of members who aren't developers. Indeed I believe that the majority of members are now people who enjoy flashing custom roms and modules and learning as they go along.

If irrespective of your views on what constitutes as "a proper operating system", you wished your tool to have the maximum usefulness then you might consider that the majority of XDA members probably use Windows or MacOS.

I am sure many more members would like to use your decrypt tool if it were available to run on Windows. Would the development effort to port this tool to Windows be excessive ?

Yours hopefully

Paul
[Sprint HTC EVO 4G LTE] horsetastic:
I've been using unruu and ruuveal with great success using Cygwin for ages now.... It took a while getting everything working smoothly but tbh it works perfectly. Yes as the OP states windows is not supported, but this doesn't mean it doesn't work.
[Sprint HTC EVO 4G LTE] triaqu:
The ruuveal support decrypt CP2DUG（htc t528w),but there is an error to unzip after decrypted the latest version of 4.11ROM.

use the ./ruuveal -I ,the old version show：

ruuveal

-------

encrypted zip info:-

keyindex: 0x00aa

chunks: 0x0a

mainver: 1.13.1402.2

the new version of ROM show:

ruuveal

-------

encrypted zip info:-

keyindex: 0x00ba

chunks: 0x0a

mainver: 2.16.1402.1

help me, need I upload the new hboot?
[Sprint HTC EVO 4G LTE] cstayton:
Largezip format detected

I am trying to ruuveal an HTC rom.zip for the AT&T HTC one X+ and I amrecieving he following messages when decrypting:

ruuveal tells me it has found a largezip format containing 3 zip files

it seems to decrypt the file and creates 3 sequentially named zip files.

I can open and view each zip file and can see that what I need is inside them.

however I am not able to extract the contents neither on a linux dev pc nor on a windows PC with 7zip
[Sprint HTC EVO 4G LTE] joeykrim:
the easiest (quickest) solution would be to upload and link us to both the encrypted and decrypted zip files. if we're able to decrypt the encrypted file and open the resulting decrypted file, or open your decrypted file, then we can say there is some issue on your end.

if we're not able to open the decrypted file, there might be some issue with the actual ruuveal process, which can be more time consuming to troubleshoot and resolve.

thanks for raising this issue! i'm sure if others have this issue, they can chime in on how they've approached/resolved.
[Sprint HTC EVO 4G LTE] cstayton:
ok, here is the link to the files: it contains the encrypted rom.zip as well as the 3 decrypted files:

http://www.androidfilehost.com/?fid=23311191640114634

I am able to open and view the decrypted archives but cannot extract them it just gives me an unexpected error has occured.

thanks for looking into this
[Sprint HTC EVO 4G LTE] joeykrim:
I'm able to extract all the files from 03_decrypted.zip, but only a partial set from 01 and no files from 02. There does appear to be some type of issue, "bad zipfile offset" with the 01 and 02 decryped .zip files that ruuveal creates. I've pasted the results below from using the command line unzip in Ubuntu.

unzip 01*
Archive: 01_decrypt_rom.zip
file #1: bad zipfile offset (local header sig): 0
file #2: bad zipfile offset (local header sig): 197
file #3: bad zipfile offset (local header sig): 989702
file #4: bad zipfile offset (local header sig): 989924
file #5: bad zipfile offset (local header sig): 993557
file #6: bad zipfile offset (local header sig): 1039446
inflating: wlan.img
inflating: rawpt_16g.img
inflating: rawpt_32g.img
inflating: pg3fs_spcustom.img
inflating: mdm9k.img
error: invalid compressed data to inflate
inflating: bct.img
inflating: rawpt_64g.img
inflating: boot_signed.img
error: invalid compressed data to inflate
inflating: recovery_signed.img

unzip 02*
Archive: 02_decrypt_rom.zip
file #1: bad zipfile offset (local header sig): 0
inflating: android-info.txt

I wasn't able to test the decrypt.zip file with ruuveal without knowing which device setting you're using in ruuveal. If you provide the exact device name as listed by ruuveal that you're using, I can also try it on my end, although I don't think there should be any difference between our set ups.
[Sprint HTC EVO 4G LTE] cstayton:
my device is evitare_ul

the command line i used was "./ruuveal --device evitare_ul rom.zip decrypt_rom.zip", i am assuming that is correct?
[Sprint HTC EVO 4G LTE] kmdm:
HTC have probably changed the keys... Please submit hboot and ruu zip links to the bugtracker.
[Sprint HTC EVO 4G LTE] cstayton:
I have submitted the RUU and HBOOT links in a new issue report on github, thanks for looking into this.
[Sprint HTC EVO 4G LTE] cstayton:
Has there been any progress on this yet?
[Sprint HTC EVO 4G LTE] cstayton:
I re-submitted the correct hboot for this RUU just checking to see if there has been any updates
[Sprint HTC EVO 4G LTE] gamblor01:
HAHAHAHAHAHAHAHAHAHAHAHAHAHA. Awesome -- thank you for this!