HTC One M8 (htc-m8)

Contributors

 * fooforever
 * CactiChameleon9

Bootloader unlocking
Although HTC supports unlocking the bootloader through an online service on https://www.htcdev.com/, this makes postmarketOS depend on HTC in the long term, which is dangerous. There seems to be some exploit for the M8, which was not tested yet on this device: https://gus33000.me/2019/01/05/secureboot-flaw-for-all-wp-devices-literally/

How to enter flash mode
Hold the Power and Vol- button while the device is off, or hold the Vol- and then hold the Power button while the phone is on so it will force-reboot to the hboot mode, then select fastboot.

Installation
The Device Tree image is not generated by pmbootstarp properly. Copying one from a TWRP boot image into the initramfs then recompiling works. Use this tool (or download the whole dt.img from me) to unpack the TWRP image, then copy the  file to the , rename it to   and. After that, just use  and.