HTC One S (htc-ville)

From postmarketOS Wiki
HTC One S
HTC One S
HTC One S
Manufacturer HTC
Name One S
Codename htc-ville
Released 2012
Type handset
Hardware
Chipset Qualcomm Snapdragon S4 Plus (MSM8960)
CPU 1,5 GHz Dual-Core
GPU Adreno 225
Display 540x960
Storage 16 GB
Memory 1 GB
Architecture armv7
Software
Original software Android
Original version 4
postmarketOS
Category testing
Pre-built images no
Mainline no
Features
Flashing
Works
USB Networking
Works
Internal storage
SD card
Battery
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Audio
Camera
Camera Flash
Connectivity
WiFi
Works
Bluetooth
GPS
NFC
Modem
Calls
SMS
Mobile data
Miscellaneous
FDE
Works
USB OTG
HDMI/DP
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Haptics
Barometer


Based on Qualcomm Snapdragon S4 Plus (MSM8960).

Users owning this device


Enter fastboot

Hold Volume Down while booting to go into bootloader mode, then choose Fastboot with Power button.

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

Alternatively, use adb reboot bootloader 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

$ cd /tmp/postmarketOS-export
$ fastboot flash system htc-ville.img
Sending 'system' (990208 KB)                       FAILED (remote: 'data length is too large')
fastboot: error: Command failed

It is possible to try using -S option of fastboot flash 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 /sdcard:

$ pmbootstrap export
$ cd /tmp/postmarketOS-export
$ xz <htc-ville.img >htc-ville.img.xz
$ adb push htc-ville.img.xz /sdcard
$ rm htc-ville.img.xz

Then, in adb shell, execute:

$ xz -d </sdcard/htc-ville.img.xz >/dev/block/mmcblk0p33

Be very careful, number of partition ( mmcblk0p33 ) can be different, check it with adb shell readlink /dev/block/platform/msm_sdcc.1/by-name/system!

The following trick does not work, at least with TWRP 3.5.1_9-0:

$ pmbootstrap export
$ adb push /tmp/postmarketOS-export/htc-ville.img /dev/block/platform/msm_sdcc.1/by-name/system

It simply replaces the destination, whether specified as /dev/block/mmcblk0p33 (device) or /dev/block/platform/msm_sdcc.1/by-name/system (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.

Proprietary file lists:

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

Mainlining?

Mainline Linux has msm8960 device tree in arch/arm/boot/dts/qcom-msm8960.dtsi. There is no qcom-msm8690-htc-ville.dts file yet. The only available file to be used as a starting point is qcom-msm8960-cdp.dts, where CDP refers to the Core Development Platform.

Downstream kernel does not provide the device tree, instead relevant board-ville*.c files are stored in arch/arm/mach-msm/htc/ville/ and can be used as a reference for mainlining.

See also