[One (M7) General] alray:
Your phone is S-ON + running on the latest version and you can't find a RUU of the same version? Instructions how to flash an older RUU with S-ON posted at the end of this post.

YOUR RUU ZIP IS CORRUPTED? -----> READ THIS POST <-------- AND STOP REPORTING.

Cont'd Lollipop RUU’s Collection

HTC One M7 801 Single SIM

5.0.2 Sense 6
​

M7_UL

7.23.502.4

AT&T (Cingular)

MID: PN0712000

CID: CWS__001

Official HTC link

7.21.980.5

Optus AU

MID: PN0714000

CID: OPTUS001

CID: TELNZ001

CID: VODAP021

CID: HTC__039

Link

Big thanks to [MENTION=4657775]kamold[/MENTION] for uploading this one^^ :good: much appreciated!

7.21.841.5

Telstra WWE

MID: PN0714000

CID: TELST001

https://www.androidfilehost.com/?fid=24052804347775861

md5: c029aaf0e7db96c7553d07d16965177a

7.19.61.10

Orange UK

MID: PN0710000

CID: ORANG001

https://www.androidfilehost.com/?fid=24052804347775894

md5: 95a5ad2186235bc346d55ef9d8530dce

7.19.75.9

Orange ES

MID: PN0710000

CID: ORANG309

https://www.androidfilehost.com/?fid=24052804347778577

md5: 976a879aa44a8ec51958ebaa4652ed04

7.19.69.9

Orange PL

MID: Tell me

CID: Tell me

https://www.androidfilehost.com/?fid=24052804347778578

md5: 99f24b3ca7f276f2ce2c820802a9138a

M7_U

6.15.599.101 Not Lollipop but latest available:

HTC L.A. Spanish

Android 4.4.3 Sense 6.0

MID: PN0711000

CID: HTC__332

Link: https://www.androidfilehost.com/?fid=24052804347843559

Md5: 1de22ba415e7281f01d14ecaa3f851a9

M7_WLS

6.23.651.6

Sprint USA

MID: PN0720000

CID: SPCS_001

RUU.exe Official HTC link

6.23.651.7

Sprint USA

MID: PN0720000

CID: SPCS_001

Ruu.exe Official HTC link

6.23.651.10

Sprint USA

MID: PN0720000

CID: SPCS_001

Ruu.exe

Official HTC link

6.23.510.1

ACG USA

MID: PN0720000

CID: Tell me

RUU.exe Official HTC link

RUU.zip (signed) link: https://www.androidfilehost.com/?fid=24052804347778579

md5: f9c86fd8386e0bfdcb3a90720b90b702

6.24.563.2

CellSouth C-Spire WWE

MID: PN0720000

CID: Tell me

RUU.exe official HTC link

RUU.zip (signed) link: https://www.androidfilehost.com/?fid=24052804347778581

md5: 8fdf80948e8bc1725ee4af60fc5ec50f

M7_WLV

6.22.605.3

Verizon

MID: PN0731000

CID:: VZW__001

https://www.androidfilehost.com/?fid=24052804347761412

md5: 52c2473490a03051920713a72aea9b6c

Second Generation Lollipop RUU’s Collection (7.xx.xxx.20 /.21 /.22)

HTC One M7 801 Single SIM

5.0.2 Sense 6​

M7_UL

7.19.401.22

HTC_Europe

MID:PN0710000

CID: HTC__001

CID: HTC__J15

CID: HTC__E11

CID: HTC__203

CID: HTC__102

CID: HTC__405

CID: HTC__Y13

CID: HTC__A07

CID: HTC__304

CID: HTC__032

CID: HTC__016

link

MD5: 2ae37e952f0a5f6fcb7319be2133dfc8

7.17.1540.21

BrightstarUS_WWE (Developer Edition)

MID:PN0712000

CID: BS_US001

link

MD5: 93b5999ecbcec8e8e92eb18fb5444de2

7.18.206.21

O2_UK

MID:PN0710000

CID: 02___001

CID: 02___102

link

MD5: 65a6da2a7afa0e0327394009a3892c51

7.18.161.21

Vodafone_UK

MID: PN0710000

CID: VODAP001

CID: VODAP102

CID: VODAPE17

CID: VODAP405

CID: VODAP304

CID: VODAPD18

CID: VODAP120

CID: VODAP110

link

md5: da17b2877fbe45da5598d2d02d89d4eb

7.19.771.21

H3G_UK

MID: PN0710000

CID: H3G__001

CID: H3G__106

CID: H3G__G04

CID: H3G__402

https://www.androidfilehost.com/?fid=24052804347763965

md5: f85aec5bb544af9bb70f86eed037b859

7.18.1020.21

Bouygues_FR

MID: PN0710000

CID: HTC__247

https://www.androidfilehost.com/?fid=24052804347774398

md5: 44f9801d8a18227ea5d021f21a62a6c1

7.18.709.20

hTC_Asia_TW

MID: PN0714000

CID: HTC__621

https://www.androidfilehost.com/?fid=24052804347774648

md5: 7dda313eda77cb00b16328ab0de599f5

7.18.708.21

hTC_Asia_HK

MID: PN0714000

CID: HTC__622

https://www.androidfilehost.com/?fid=24052804347774672

md5: 9fee784a2ca274b0d76ec2d27152ba1c

7.21.707.21

hTC_Asia_WWE

MID: PN0714000

CID: HTC__044

https://www.androidfilehost.com/?fid=24052804347774688

md5: f63ba7847296343df8000d22d024ee85

7.18.901.21

TIM Italy

MID: PN0710000

CID: TIM__401

link: https://www.androidfilehost.com/?fid=24052804347778582

md5: 1005521389e9bf3281e4bdb3cae79062

M7_U

7.21.707.121

hTC_Asia_WWE

MID: PN0711000

CID: HTC__038

https://www.androidfilehost.com/?fid=24052804347766614

md5: ce50cd152a099456c401c5529413dd26

7.18.709.120

Asia TW

MID: PN0711000

CID: HTC__621

link: https://www.androidfilehost.com/?fid=24052804347778583

md5: 3fe830b6f4f32e3d4abd01be246202a3

Third Generation Lollipop RUU’s Collection (Stagefright fix) (7.xx.xxx.30 /.35)

HTC One M7 801 Single SIM

5.0.2 Sense 6​

M7_UL

7.19.206.30

O2_UK

MID: PN0710000

CID: 02___001

CID: 02___102

https://www.androidfilehost.com/?fid=24052804347813898

7.17.1540.35

BrightstarUS (Dev edition)

MID: PN0712000

CID: BS_US001

Official HTC link

7.19.401.30 S-OFF only (combined ruu)

HTC_Europe

MID:PN0710000

CID: HTC__001

CID: HTC__J15

CID: HTC__E11

CID: HTC__203

CID: HTC__102

CID: HTC__405

CID: HTC__Y13

CID: HTC__A07

CID: HTC__304

CID: HTC__032

CID: HTC__016

Link: https://www.androidfilehost.com/?fid=24052804347813879

MD5: b2330edc755fd81ed2da57b514a00827

thanks to [MENTION=5236274]Slim Jim Guy[/MENTION] for sharing see post 315

7.19.111.30 S-OFF only (combined ruu)

TMO_DE

MID:PN0710000

CID: T-MOB101

Link: https://www.androidfilehost.com/?fid=24385226645962870

MD5: 8C230453418A99FE0F5102A0B099E947

thanks to [MENTION=5236274]Slim Jim Guy[/MENTION] for sharing see post 315

7.19.161.30 S-OFF only (combined ruu)

Vodafone UK

MID: PN0710000

CID: VODAP001

CID: VODAP102

CID: VODAPE17

CID: VODAP405

CID: VODAP304

CID: VODAPD18

CID: VODAP120

CID: VODAP110

Link: https://www.androidfilehost.com/?fid=24385226645962901

MD5: A83A63DA1DF2C90CC0558DD8CE7B25F3

thanks to [MENTION=5236274]Slim Jim Guy[/MENTION] for sharing see post 315

7.18.111.35

TMO_DE

MID: PN0710000

CID: T-MOB101

Link: https://www.androidfilehost.com/?fid=24352994023702663

md5: 5ed72262aa03c47d59df053b829c2e78

credits to [MENTION=5236274]Slim Jim Guy[/MENTION] post #456

4th Generation Lollipop RUU’s Collection (7.xx.xxx.51)

HTC One M7 801 Single SIM

5.0.2 Sense 6​

M7_UL

7.18.206.51

O2 UK

MID: PN0710000

CID: 02___001

CID: 02___102

Link: https://www.androidfilehost.com/?fid=24352994023702662

md5: d3848b3cc8066c11dd2ea8dbaba36d79

credits to [MENTION=5236274]Slim Jim Guy[/MENTION] post #456

7.19.401.51 decrypted (s-off only)

HTC_Europe

MID:PN0710000

CID: HTC__001

CID: HTC__J15

CID: HTC__E11

CID: HTC__203

CID: HTC__102

CID: HTC__405

CID: HTC__Y13

CID: HTC__A07

CID: HTC__304

CID: HTC__032

CID: HTC__016

Download: https://www.androidfilehost.com/?fid=24391638059058241

md5: f71e3fd28627620356a7c1ecb9b90c9e

credits to [MENTION=5236274]Slim Jim Guy[/MENTION]

7.19.401.51 Signed

HTC_Europe

MID:PN0710000

CID: HTC__001

CID: HTC__J15

CID: HTC__E11

CID: HTC__203

CID: HTC__102

CID: HTC__405

CID: HTC__Y13

CID: HTC__A07

CID: HTC__304

CID: HTC__032

CID: HTC__016

Download: https://www.androidfilehost.com/?fid=24369303960689843

md5: 45ee5f80d33719092b4ea5057cff8684

credits to [MENTION=5236274]Slim Jim Guy[/MENTION]

7.18.111.51

TMO_DE

MID:PN0710000

CID: T-MOB101

Download: https://www.androidfilehost.com/?fid=24385226645962876

md5: 894e8b8b19b673163bf724d25d28d82e

credits to [MENTION=5236274]Slim Jim Guy[/MENTION]

Lollipop RUU’s Collection

HTC One M7 802 Dual SIM

5.0.2 Sense 6​

M7C_DWG (802d)

7.17.707.6

HTC Asia Indonesia WWE

MID: PN0751000

CID: HTC__044

link: https://www.androidfilehost.com/?fid=24052804347774362

md5: 2edf0298505344c24a2fff275d218185

7.17.720.6

HTC Asia India

MID: PN0751000

CID: HTC__038

link: https://www.androidfilehost.com/?fid=24052804347774374

md5: 4f69fae8f7123c12493708387c8657a6

7.17.500.9

APTG TW

MID: PN0751000

CID: HTC__621

link: https://www.androidfilehost.com/?fid=24052804347774387

md5: 6d40cbf9e995794f50950dfd932e10a5

7.19.1401.2

MID: PN0751000

MID: PN0752000

CID: HTCCN702

Link: https://www.androidfilehost.com/?fid=24052804347846772

Md5: 76adeb487aeb5e3f7cf04a9cd69a34aa

M7C_DUG (802w)

7.17.401.5

HTC Europe

MID: PN0771000

CID: HTC__001

CID: HTC__A07

CID: HTC__A48

https://www.androidfilehost.com/?fid=24052804347778476

md5: 6de185d48c24a296f53a5b1f25f039f9

7.17.402.5

HTC Nordic

MID: PN0771000

CID: HTC__001

CID: HTC__032

CID: HTC__J15

CID: HTC__Y13

https://www.androidfilehost.com/?fid=24052804347778519

md5: 1a3bf80b9f99510c18f0decd187ae116

7.17.425.5

WWE VNM

MID: PN0771000

CID: HTC__059

https://www.androidfilehost.com/?fid=24052804347778538

md5: 62aae7249d85f9f461beb10bb3c8749e

7.xx.1402.x

There is no lollipop RUU available for this one.

MID: PN0771000

MID: PN0772000

CID: HTCCN703

If you find one, share it otherwise don't ask for it plz
​

M7C_DTU (802t)

7.19.1403.31

MID: PN0780000

CID: HTCCN704

Link: https://www.androidfilehost.com/?fid=24052804347846756

Md5: 5f700a77a60c136c2d240bced49b42dc

How to "downgrade" with S-ON​

Yes I know, this is very long to read, but do read everything before proceeding.

First, let me explain what the bootloader check before flashing a RUU on an S-ON phone:

The CID of your phone is compared to the CID listed in the android-info.txt file of the RUU. Your CID must match one of the CID listed.

The MID of your phone is compared to the MID listed in the android-info.txt file of the RUU. Your MID must match one of the MID listed.

Since the phone is S-ON, the bootloader must check the signature of the RUU, signature verification is only enabled when the bootloader is (re)locked.

Bootloader version is checked, it must be same or newer than your actual bootloader version (hboot version).

Version-main is checked, it must be same or newer than your actual version-main. (the "os-" line when booted in bootloader mode)

If only one of the above conditions isn't good, the RUU can't be flashed.

Here is an example of an android-info.txt file from the 7.19.401.2 RUU:

modelid: PN0710000
cidnum: HTC__001
cidnum: HTC__J15
cidnum: HTC__E11
cidnum: HTC__203
cidnum: HTC__102
cidnum: HTC__405
cidnum: HTC__Y13
cidnum: HTC__A07
cidnum: HTC__304
cidnum: HTC__032
cidnum: HTC__016
mainver: 7.19.401.2
btype:1
aareport:1
hbootpreupdate:3

Example:

Lets say I want to flash this 7.19.401.2 RUU on my 7.19.401.30 phone which is S-ON and re-locked (see the "fastboot getvar all" output below)

fastboot getvar all
(bootloader) version: 0.5
(bootloader) [COLOR="magenta"][B]version-bootloader[/B][/COLOR]: 1.61.0000 [COLOR="magenta"][B]---> Bootloader version[/B][/COLOR]
(bootloader) version-baseband: 4T.35.3218.16
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) [B][COLOR="Magenta"]version-main[/COLOR][/B]: 7.17.401.30 [COLOR="magenta"][B]---> version-main[/B][/COLOR]
(bootloader) version-misc: PVT SHIP [COLOR="magenta"][B]S-ON[/B][/COLOR]
(bootloader) serialno: -deleted-
(bootloader) imei: -deleted-
(bootloader) meid: 00000000000000
(bootloader) product: m7_ul
(bootloader) platform: HBOOT-8064
(bootloader) [COLOR="magenta"][B]modelid[/B][/COLOR]: PN0710000 [COLOR="magenta"][B]---> MID[/B][/COLOR]
(bootloader) [COLOR="magenta"][B]cidnum[/B][/COLOR]: HTC__001 [B][COLOR="magenta"]---> CID[/COLOR][/B]
(bootloader) battery-status: good
(bootloader) battery-voltage: 4156mV
(bootloader) partition-layout: Generic
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: dirty-9df5faa7
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0

If I try to flash it:

The CID of my phone is compared to the CID listed in the android-info.txt file of the RUU. ---> Good, "HTC__001" is listed

The MID of my phone is compared to the MID listed in the android-info.txt file of the RUU. ---> Good, "PN071000" is listed

Since the phone is S-ON, the bootloader must check the signature of the RUU, signature verification is only enabled when the bootloader is locked or re-locked. ---> Good, my phone is re-locked and the RUU is signed (official HTC ruu)

Bootloader version is checked, it must be same or newer than your actual bootloader version. ---> Good, both the phone and the RUU i want to flash are on bootloader version 1.61

Version-main listed in the RUU is checked, it must be same or newer than your actual version-main ---> Not good, my actual version-main is newer (7.19.401.30) than the one listed in the RUU (7.19.401.2), RUU won't flash

Result:

I can't flash it because my actual version-main is newer than the one listed in the RUU, all others values are matching.

Solution:

The version-main value is stored in the MISC partition (mmcblk0p19).The good thing is that the MISC partition isn't secured so you can write to it even if the phone is S-ON, this will allow us to edit/spoof the version-main and flash the RUU even if its a downgrade.

Prerequisites:

You already know how to use adb/fastboot commands, you already have all the drivers correctly installed on your computer and your phone is correctly detected by it ---> if not, this guide isn't for you, do your homework before proceeding.

(NEW)Tool to change the version-main (using example above):

Unlock your bootloader with instructions available at htcdev.com/bootloader

flash twrp 2.6.3.3 (tool was tested with 2.6.3.3, will often hang if used with newer version)

Download Misc_Tool_1.00.zip and save it at the root of your internal storage (/sdcard)

Boot in twrp 2.6.3.3, select the "install" menu then select "Misc_Tool_1.00.zip"

Swipe the bottom slider to start the tool

Follow instructions from pictures below:

Confirm your version-main now changed from 7.19.401.30 to 7.19.401.2 (Values for example above)

Re-lock you bootloader

Flash the RUU using instructions from Post #1

Found any bug using this tool? Report it using Private Message not in this thread.

Instructions how to change your version-main manually (using example above):

Unlock your bootloader (follow instructions @ htcdev.com/bootloader)

Flash a stable custom recovery, better to work with twrp 2.6.3.3

boot in your custom recovery

from your computer, open a terminal window from your adb/fastboot directory.

adb shell
echo -ne "7.19.401.2\x00\x00" | dd of=/dev/block/mmcblk0p19 bs=1 seek=160
exit
adb reboot bootloader

confirm your version-main is now 7.19.401.2 (replace this number in the above command by the number you need for your own situation, ref to important notes below)

relock your bootloader

flash the 7.19.401.2 RUU

Probably a really good idea is to backup your mmcblk0p19 partition just in case you mess it (and save the backup on your computer) before editing it

To backup your MISC partition, use dd if=/dev/block/mmcblk0p19 of=/sdcard/misc_bakup.img and copy the misc_backup.img file from the root of your sd card to your computer

So now here is the new situation:

The CID of my phone is compared to the CID listed in the android-info.txt file inside the RUU. ---> Good, "HTC__001" is listed

The MID of my phone is compared to the MID listed in the android-info.txt file inside the RUU. ---> Good, "PN071000" is listed

Since the phone is S-ON, the bootloader must check the signature of the RUU, signature verification is only enabled when the bootloader is locked or re-locked. ---> Good, my phone is re-locked and the RUU is signed (official HTC ruu)

Bootloader version is checked, it must be same or newer than your actual bootloader version. ---> Good, both the actual versionand the RUU i want to flash are on bootloader version 1.61

Version-main listed in the RUU is checked, it must be same or newer than your actual version-main ---> Good, the phone read 7.19.401.2 (even if its not true) and the ruu will flash.

Limitations

: If you understand what was said above, you probably already understand the limits of what can be done with this. But just in case:

Because you can only edit the version-main, you are limited to downgrade using a RUU that is packed with the same hboot version than the version installed on your phone. So it's only useful to downgrade in small increment. Forget about downgrading from 7.xx.xxx.x to 6.xx.xxx.x, that will requires S-OFF for hboot downgrade. This method is only useful to downgrade from let say 7.xx.xxx.35 to 7.xx.xxx.2 or from .35 to .22 or .22 to .2 which is really useful if your phone is S-ON and you can't find a RUU of the same version or newer than your version-main.

Important notes:

Messing with the MISC partition can brick your phone. Make sure you are using the correct "dd" command. If you are unsure, don't use it and ask questions instead.

I'm not responsible for any brick, you do this at your own risk. Even if using the tool above, there is always some risk to mess your MISC partition.

The version-main value can in theory have 12 characters for example: 7.17.1540.35 or 7.19.401.130 are 12 characters including dots. If the version-main you want to write doesn't have 12 characters, don't forget to add the required "null" values at the end so you have 12 characters total. Null in hexadecimal is expressed by x00. If you don't, it could cause problems

e.g: let say you want to go from 7.17.1540.35 (12 characters) to 7.17.1540.7 (11 characters).

If using this command: echo -ne "7.17.1540.7" | dd of=/dev/block/mmcblk0p19 bs=1 seek=160 you'll end out having a version-main of 7.17.1540.75 because you didn't removed the last character (the last 5). Hence why you have to use echo -ne "7.17.1540.7\x00" | dd of=/dev/block/mmcblk0p19 bs=1 seek=160

This manual method described above is not my idea, only re-sharing what was done in post #299 with extra information.