[HTC U12+ Guides, News, & Discussion] 5m4r7ph0n36uru:
[Guide] How-To's

[IMG="Guideline"]https://c1.staticflickr.com/1/765/32567527592_36bafaa846.jpg[/IMG]​

0. How-To reboot to download mode

As there are digital buttons by now, we might take a look at first things first. So how do we reboot the device to download mode. Well there are two methods of doing it, so lets start.

0.1 Method 1 - From a fully booted system

Hold the power button pressed until the screen goes off by itself.

Just after the screen goes dark you will feel a short vibration. In this very moment you got to release the Power button and press the Volume Down immediately.

If you did everything correctly, you'll now see the bootloader mode.

Use the Volume Down key to navigate through the menu, until "DOWNLOAD MODE" is showing on the top of the screen.

Press Power once to enter it.

0.2 Method 2 - Device is powered off entirely

Hold the power button pressed to power up your U12+.

Keep the Power button pressed, and wait for the very first vibration.

In this very moment you got to release the Power button, press the Volume Up button immediately and hold it until the bootloader shows up .

If you did everything correctly, you'll now see the bootloader mode.

Navigate with the Volume Down key, until "DOWNLOAD MODE" is showing on the top of the screen.

Press Power once to enter it.

1. How-To flash a RUU using the SD card method

reboot to download mode

perform

htc_fastboot getvar all

and note down your original software version

download the latest Stock RUU for your device.

flash your RUU to revert to stock

rename RUU to 2Q55IMG.zip

copy 2Q55IMG.zip to root directory of SD card (external SD cards must not exceed 32GB of size / fat32 & extFAT file system are going to work)

reboot to download mode

press Volume Up button to confirm flash of RUU

As soon as your RUU has been flashed sucessfully, that's it. Your are now Full Stock again, or updated to lates software version respectively!

2. How-To flash *.img-files, with seamless update support

There are a number of commands that apply exclusively to A/B partition systems. You can switch your active slot and the flash to specific slots. If you have a Project Treble compatible smartphone, such as our beloved HTC U12+, and want to learn how to flash Generic System Images, you should be familiar with these commands:

Get current active slot: fastboot getvar all | grep "current-slot" (ATTENTION: If you're on a Windows PC, the "grep" command won't work.)

Set other slot as active: fastboot set_active other

Set specified slot as active: fastboot set_active $OR: fastboot -set-active=_$slot; where $ is either a or b

Flash image to the specified partition in the current slot: fastboot flash partition.img

Flash image to the specified partition in the specified slot: fastboot flash partition_a partition.img / fastboot flash partition_b partition.img

Note: On A/B devices you can either specify a partition in a specific slot to flash to, or you can omit the slot suffix and it flashes to the currently active slot. For example, you can replace "partition" with "system", "system_a" or "system_b" in the Flash command.[/STRIKE]

3. How-To restore a stock system flashing stock /system and /boot images

What you'll need to restore a pristine system that will again be able to receive and install official OTA updates, is a stock /system and /boot image.

Download the RUU for ur device

Download Universal HTC RUU/ROM Decryption Tool form link given in the OP

Decrypt the RUU, extraction firmware and system

Place stock boot.img and system.img into your fastboot/adb directory on PC

Connect your HTC U12+ to this very PC, using a USB-C data-transfer-cable

open up a CMD and navigate to your fastboot/adb directory

reboot to bootloader mode

adb reboot bootloader

boot download mode

do a fastboot getvar all, to get you current active slot

restore your stock images

flash boot.img to current active slot (e.g. a), using

fastboot flash boot_a boot.img

flash system.img to current active slot (e.g. a), using

fastboot flash system_a system.img

(this one takes a while to start, and will be flashed in three steps, so give it some time!)

As soon as you restored your stock images you are Full Stock, and able to apply updates Over-the-Air again!

4. How-To restore a stock system using a TWRP backup

This method currently doesn't work, due to an error within TWRP, leading to TWRP not restoring /boot and /system correctly, and Check_Lifetime_Writes check failing on A/B devices. Read mor about that very issue on the TWRP GitHub. As soon as this bug has been solved I'll update this part of the guide again.

What you'll need to restore a pristine system that will again be able to receive and install official OTA updates, is a stock /system and /boot image, as well as stock data of the /vendor image.

I assume in the following that you have read and followed the OP, and have created images as a backup of the untouched boot and system partitions, as well as the vendor image and vendor data in TWRP.

connect your HTC U12+ to a PC running fastboot/adb, using a USB-C data-transfer-cable

open up a CMD and navigate to your fastboot/adb directory

place the latest TWRP image, found here, within you fastboot/adb directory on your PC

boot to TWRP custom recovery

reboot to bootloader mode

adb reboot bootloader

boot recovery image

htc_fastboot boot nameoftwrp.zip

restore your Nandroid.

unzip the according Nandroid

copy Nandroid to TWRP/Backup/SerialNo/Nameofbackup on your extSD

in TWRP chose RESTORE

choose the above copied Nandroid

restore /boot, /system, and /vendor data (NOT the vendor.img)

As soon as you restored the Nandroid you are now Full Stock, and able to apply updates Over-the-Air again!