[One (M7) Q&A, Help & Troubleshooting] MrSolution98:
THIS IS A GUIDE ON HOW TO INSTALL THE LOLLIPOP OTA UPDATE ON A ROOTED INTERNATIONAL HTC ONE M7 WITH A CUSTOM RECOVERY AND A STOCK HTC SENSE ROM

Disclaimer

: I am making this guide to help you if I can. I am doing that because I have spent more than 10 hours trying to upgrade my phone; and because I am new at this, I soft bricked my phone. I did unbrick it and install lollipop eventually but I am making this for the people like me, so that you don’t make the same mistakes. Oh, and, never tick “system” when doing a wipe trough TWRP recovery XD With that said, I am not a pro, but I have learned a lot trough trial and error; so, follow the instructions carefully and be patient!!! I am not responsible if something goes horrendously wrong, good luck! Also, sorry for the weird formatting, I am very new to that as well.

Hey everybody, as you probably know, HTC has started rolling out Lollipop to M7s.

If you are like me and love to have control over your phone and its customization, you probably rooted your device and installed a custom recovery to have more options like full system backups...

Well, now that the update is out, you might have tried to upgrade following the on screen instructions for the OTA (Over The Air) update and found out it can’t be done just like that. I am here to tell you, don’t worry, don’t bang your head against the table, there is a way, and it is simple. This is a collection of some of the things that I have learned in the previous two days:

You will need a couple of things:

*Your International HTC One M7

You can be S-OFF OR S-On

*The Android SDK

Your alternative would be the Minimal ADB and Fastboot because that’s the part of the sdk we will be using for this. I recommend the SDK if you don’t quite now what you are doing because I will be explaining how to use that, otherwise, feel free to use the Minimal ADB and Fastboot. But, if you are going to use the Minimal ADB and Fastboot don’t forget to create a desktop shortcut, it will make things easier later.

*The OTA zip itself

We will need this to get the stock recovery image, I will explain why soon.

*Your htcdev.com account

We will need it to unlock your boot loader later because in order to complete this, you will

temporarily relock your bootloader.

*Your phones drivers ( If you do install the drivers I linked, you should probably uninstall HTC sync,

just to be on the safe side)

*Your PC (I will write for Windows because that’s what I have)

THE LINKS TO EVERYTHING YOU NEED:

-The Tools:

Android SDK (Android Sutdio): http://developer.android.com/sdk/index.html

Minimal ADB and Fastboot: http://xdaforums.com/showthread.php?t=2317790

-The phone drivers:

https://www.youtube.com/watch?v=afrvSGiMAtk (This video is really good, it shows you how you can get the drivers to work so that adb recognizes your phone even in recovery, it is useful for side loading and stuff... I recommend doing this just to be safe, you can install HTC sync later if you want)

Ok, let’s begin:

1.	Download the OTA zip file on to your phone as you normaly would, but don’t click install. Instead, copy the file to a folder on your desktop (name the folder what you want).

2.	Right click the zip and click “Extract to .......” (with the ..... being the name of the OTA file)

3.	In there, there will be another zip file called “firmware.zip”

4.	Extract that one, we will use it to get the stock recovery. Why do we need the stock recovery if the custom one is better? We need it to install the OTA update because of the way that OTA files are made and the way that the stock recovery works. The stock recovery is made to do two things, preform a factory reset and to install OTA updates. The OTA update zips are made to be only installed trough the stock recovery. I don’t know why, but that’s what I found out, simple as that.

5.	Now, Copy that recovery.img file back in to the main folder on your desktop (you don't need the OTA zip on your computer anymore, if you want delete it)

6.	In order to apply the OTA update file, you will need to temporaroly relock your bootloader and flash the stock recovery. To do that:

1)	Boot your phone in to the bootloader by holding Vol Down + Power

2)	Navigate with the volume keys and click the power button to select. Select the “fastboot mode” it should show up red and say fastboot. (fastboot usb if connected to pc)

3)	Connect the phone to the PC via USB 2.0 (USB 3.0 might not work)

4)	Go to folder where you installed Android SDK and go in to the “platform-tools” folder and while holding shift right click in the empty space of the folder and click open command window here .

5)	Type in “fastboot devices” (witouth the quote marks) this will make sure your PC sees your phone.

If a radnom set of numbers appears and by it fastboot or something like that, you are good, if not check the connection and the drivers. I will link to how to get drivers to work because there are known issues when using windows 8/8.1

6)	Next thing is to copy the recovery file from the desktop folder in to the platform-tools folder.

7)	Type in “fastboot flash recovery recovery.img”

8)	Type in “fastboot reboot-bootloader”

9)	Type in “fastboot oem lock” (This will lock the bootloader, we will unlock it again later)

7.	Boot your phone up and normaly install the OTA update.

8.	To reinstall the custom recovery, just download the latest TWRP or Clockworkmoad recovery for the M7 and copy it in to the platform tools folder. Boot the phone in to fastboot again and type in “fastboot flash recovery ****.img” (wher **** is the name of your custom recovery image)

9.	To unlock your bootloader, do the same as you did the first tame you did it, follow the htcdev.com instructions. If you still have the unlock token, just put it in to the platform-tools folder. Boot in to fastboot and type in “fastboot flash unlocktoken Unlock_code.bin”

If for any reason you get into a boot loop, just reboot into recovery trough the bootloader and wipe cache and dalvik cache

That’s it, you should now have a rooted HTC One M7 running stock Lollipop sense.

And, some sugestions:

-Keep the stock recovery somewhere if you ever need it again. I say this because when I was searching for the stock recovery image, people were saying to download one from the internet but to be careful... That would be much more complicated because there is no guaranty that the recovery you download is right for your exact phone! This is the simplest way, and it is guarantied to work because in the OTA zip for your phone is the recovery that is made to work on your phone!

-Keep the unlocktoken in order to easily unlock your bootloader if you ever need to relock it again, it just saves you time.