[HTC U Ultra ROMs, Kernels, Recoveries, & Other Dev] tarkzim:
Frequently Asked Questions

Frequently Asked Questions (FAQ)

1. Why is this device different than my previous HTC device?

With newer devices, HTC has moved to a block-based OTA system. This means that even mounting system as read-write (as TWRP typically does during startup checks) will nullify the device's ability to take an OTA. Any other changes to the system partition will also cause an OTA to fail (even if that check is removed from the OTA zip) due to "unexpected contents."

2. Which version of TWRP am I supposed to use?

The best version to use is the latest official (3.2.3-0) from twrp.me.

3. Why is there a "System" backup option and a "System Image" backup option now?

The "System" option is the standard tar backup. "System Image" is a dd backup of the entire system block device (/dev/block/bootdevice/by-name/system). The "System Image" option is only relevant if your system is unmodified. This allows you to make a fully stock backup that can be restored later to take an OTA.

NOTE: You only need to choose ONE of these options when making a backup!!

[*]NOTE 2: If you are using a FAT32-formatted card, a "System Image" backup may fail, due to the 4GB file limit on that format. For a successful System Image backup, internal storage or NTFS/exFAT-formatted external storage must be used (either SD card or USB-OTG)

4. How am I supposed to root?

Since this device has dm-verity enabled and forces encryption by default, root can only be achieved using a "systemless" root method. Magisk is the recommended root solution, as it is actively developed and up-to-date. It also allows devices to pass Google's SafetyNet API for working contactless payments. See the below thread for full details.

Magisk

5. How do I backup stock recovery prior to flashing TWRP?

You can't. The "fastboot boot" command appears to be disabled/broken on this device's ABOOT, so TWRP must be fastboot flashed over stock recovery. You can however, extract the stock recovery.img from the OTA firmware.zip when it's received and use that to install the OTA.

An alternate method to obtain a stock recovery is listed below, but it requires 2 devices (either owned by you, or help from someone else in the forum):

Someone fastboot flash twrp and immediately make a backup of boot and upload it to XDA.

Once the above is available, someone else download that boot.img to their device, and fastboot flash twrp to the BOOT partition of their device.

Once the above is done, reboot the device, which will bring up TWRP, and then backup stock RECOVERY in TWRP, and upload to XDA.

Then, from within TWRP, use the Image install feature in TWRP to flash the stock boot.img.

6. How do I restore stock system so that I can accept an OTA?

Check the "Mount system as read-only" box in the Mount menu.

Restore stock "System Image" backup (This will only work if you've made a System Image backup prior to making any modifications to /system).

Fastboot flash stock recovery (fastboot flash recovery recovery_signed.img)

NOTE: It is also possible to restore stock recovery via the TWRP GUI. Rename the stock recovery file to "recovery.emmc.win" and place in the backup folder with the stock system image. Recovery will then show as a restore option. MAKE SURE YOU REALLY WANT TO DO THIS, AS TWRP WILL BE GONE WHEN YOU REBOOT OUT OF RECOVERY!!

[*]NOTE 2: It is possible to install an OTA without using stock recovery (i.e. installing it with TWRP). TWRP will not flash the firmware.zip included in an OTA file. Please see here for a detailed description of the process.

Reboot to system, install OTA.

7. What if I have an RUU? Do I need to worry about all this OTA nonsense?

Not if you don't care about losing all your data. If you're S-ON and have an RUU available for your exact variant (model ID and CID must match) and software number (main version must be the same or newer), then you can get back to a fully stock state by relocking (fastboot oem lock) and flashing an RUU. However, if you'd prefer to take an OTA to keep your data intact, the method stated above is how to do so. Or, you can just run a custom ROM and wait for your ROM chef to update their ROM to the latest software (though you'll still have to find a way to update your firmware if you're not S-OFF)

8. After I go through all this and successfully apply an OTA, how do I make sure I have a clean starting point again?

After the OTA is applied and TWRP is flashed, it will once again detect an untouched system, which will mount system read-only and allow you to make a fully stock backup and start the process over again, this time with the new base.

9. After I restored my Data backup and boot back to Android, I'm entering the correct PIN/password, but it's telling me the password is wrong. What happened, and how do I fix it?

It appears that sometimes after restoring a backup of Data where security was enabled (such as a PIN or password lock), the device does not recognize the correct password. There are two ways to avoid this issue:

Disable security in Android before making a backup of data.

After restoring Data, while still in TWRP, use the TWRP File Manager to navigate to /data/system and delete all the locksettings.* files (such as locksettings.db, etc). When you reboot, the password will be gone.