HTC One S (htc-ville)

Based on Qualcomm Snapdragon S4 Plus (MSM8960).

Enter fastboot
Hold while booting to go into bootloader mode, then choose Fastboot with  button.

alone is sufficient to get into bootloader mode, e.g. if your device bootloops. If the device is turned off, hold and press.

Alternatively, use  command when running Android.

See https://www.htcdev.com/bootloader/rom_flashing_guide for official instructions.

Flashing
Fastboot sometimes refuses to flash the system image, like this

It is possible to try using  option of   command to break the image into smaller chunks.

The device always reboots after flashing the system partition, so you have to flash the kernel first.

A more reliable way to flash the system partition is to use TWRP recovery. Compress the images and upload them to :

Then, in, execute:

Be very careful, number of partition ( mmcblk0 p33 ) can be different, check it with !

The following trick does not work, at least with TWRP 3.5.1_9-0: It simply replaces the destination, whether specified as  (device) or   (symlink), with a regular file, instead of pushing to the device.

LineageOS/CyanogenMod references
This section contains links to the latest sources used to build LineageOS for this device. It can be used as a reference, for example to lookup the kernel source.


 * Downstream kernel: https://github.com/LineageOS/android_kernel_htc_msm8960/tree/cm-14.1
 * Android Device tree: https://github.com/LineageOS/android_device_htc_ville
 * Android Common part of device tree: https://github.com/LineageOS/android_device_htc_s4-common (dependency of )
 * TWRP recovery: https://github.com/TeamWin/android_device_htc_ville

Proprietary file lists:
 * https://github.com/LineageOS/android_device_htc_ville/blob/cm-14.1/device-proprietary-files.txt
 * https://github.com/LineageOS/android_device_htc_s4-common/blob/cm-14.1/proprietary-files.txt
 * https://github.com/LineageOS/android_device_htc_s4-common/blob/cm-14.1/common-proprietary-files.txt

Proprietary firmware: https://github.com/TheMuppets/proprietary_vendor_htc/tree/cm-14.1 ( +  )

Mainlining?
Mainline Linux has  device tree in. There is no  file yet. The only available file to be used as a starting point is, where CDP refers to the Core Development Platform.

Downstream kernel does not provide the device tree, instead relevant  files are stored in   and can be used as a reference for mainlining.