HTC One X • CM12.1 Installation & Recovery Guide
PROJECT RETR0 • DEVICE GUIDE

HTC One X CM12.1 Installation Guide

A detailed installation, recovery, NewLayout, backup and root guide for the international NVIDIA Tegra 3 HTC One X — codename endeavoru.

DeviceHTC One X
Codenameendeavoru
SoCNVIDIA Tegra 3
TargetAndroid 5.1.1
ROMCyanogenMod 12.1
!
ENDEAVORU ONLY — VERIFY BEFORE FLASHING

Do not follow destructive partition instructions on the Snapdragon HTC One XL (evita), another HTC model, or any device whose partition mapping has not been independently verified. This procedure can erase all data and a wrong format or flash can render the phone unbootable.

01
STEP 1 OF 24

What You Need

Prepare the required files and tools before touching the phone.

DOWNLOAD PACK HTC One X Root Tools Pack Required guide assets • MediaFire
  • Android Platform Tools (ADB and Fastboot)
  • Working HTC / ADB / Fastboot USB drivers
  • twrp-3.1.1-0-endeavoru.img or a suitable initial recovery
  • twrp2853-BiG.img
  • cm-12.1-20160721-UNOFFICIAL-endeavoru.zip
  • Optional ARM / Android 5.1 Google Apps package
  • 7-Zip or similar, plus several GB of PC storage for backups
Before starting: charge the phone to at least 50%. This procedure erases data.
02
STEP 2 OF 24

Verify the Phone is endeavoru

Enable USB debugging, connect the phone, and verify the exact product before continuing.

adb devices
adb reboot bootloader
fastboot devices
fastboot getvar product
Required resultproduct: endeavoru

You can also inspect the bootloader version:

fastboot getvar version-bootloader
If the product is evita, stop. This guide is not for the Snapdragon HTC One XL.
03
STEP 3 OF 24

Unlock the Bootloader

From Fastboot, confirm the connection and obtain the identifier token.

fastboot devices
fastboot oem get_identifier_token

Use the identifier token with HTC’s bootloader unlock process to obtain Unlock_code.bin, then flash the unlock token using the actual path to your file.

fastboot flash unlocktoken "C:\path\to\Unlock_code.bin"
Unlocking wipes the device. Approve the unlock on the phone only after your data is backed up.
04
STEP 4 OF 24

Install Initial TWRP

The initial recovery used by the tested procedure was twrp-3.1.1-0-endeavoru.img.

fastboot flash recovery "C:\path\to\twrp-3.1.1-0-endeavoru.img"

Wait for both Sending and Writing to report OKAY, then enter HBOOT → RECOVERY.

A modern Fastboot may warn about skipping an AVB footer. The One X predates AVB; the successful OKAY results are what matter here.
05
STEP 5 OF 24

Verify Original Partition Layout

In TWRP, inspect the partition table and named mappings. Do not assume another HTC One X has the same mapping.

adb devices
adb shell cat /proc/partitions
adb shell ls -l /dev/block/platform/*/by-name/
APP / p12system
CAC / p13cache
ISD / p14old HTC internal storage
UDA / p15old userdata
LNX / p4boot / kernel
SOS / p5recovery
adb shell blkid

On the tested device, p14 originally appeared as LABEL="HTC STORAGE" TYPE="vfat".

06
STEP 6 OF 24

Make Raw Stock Backups

Create and preserve raw stock images before performing the NewLayout conversion. Store the copies on your PC.

For the verified device: LNX = boot, APP = system, and UDA = userdata. The tested clean image sizes were 8,388,608 bytes (boot), 1,342,177,280 bytes (system), and 2,302,672,896 bytes (userdata). Verify your own device independently.
07
STEP 7 OF 24

Hash the Backups

Hash every backup and save the results alongside the images.

certutil -hashfile "C:\path\to\boot-clean.img" SHA256
certutil -hashfile "C:\path\to\system-clean.img" SHA256
certutil -hashfile "C:\path\to\userdata-clean.img" SHA256

The hashes in the original procedure are specific to that backup. Your own hashes are the authoritative ones for your own files.

08
STEP 8 OF 24

Install NewLayout TWRP

Flash twrp2853-BiG.img, which identifies as TWRP 2.8.5.3.BiG NEW LAYOUT.

fastboot devices
fastboot flash recovery "C:\path\to\twrp2853-BiG.img"

Wait for successful Sending and Writing results, then enter HBOOT → RECOVERY.

09
STEP 9 OF 24

Understand NewLayout

The old layout uses p14 / ISD as the large FAT32 “HTC STORAGE” area and p15 / UDA as roughly 2.2 GB userdata. NewLayout expects:

mmcblk0p14/data • ext4 • ~25 GB
mmcblk0p15/xtradata • ext4

Installing NewLayout TWRP does not itself convert p14 from FAT32 to ext4.

10
STEP 10 OF 24

Verify NewLayout Expectations

Read TWRP’s filesystem table and confirm that the recovery expects the same mapping before converting anything.

adb shell cat /etc/fstab
Tested mapping/dev/block/mmcblk0p12 /system ext4 rw /dev/block/mmcblk0p13 /cache ext4 rw /dev/block/mmcblk0p14 /data ext4 rw /dev/block/mmcblk0p15 /xtradata ext4 rw
11
STEP 11 OF 24

Try TWRP’s Normal Conversion First

In TWRP go to Wipe → Advanced Wipe → Data → Repair or Change File System → Change File System → EXT4.

If this succeeds, skip the manual formatting step. Verify the result:

adb shell blkid /dev/block/mmcblk0p14

If it still reports TYPE="vfat", the conversion did not happen.

12
STEP 12 OF 24

Manual P14 Conversion — Dangerous

This is the most dangerous stage of the guide. Formatting the wrong block device can make the phone unbootable and destroy data.

Before the format command is revealed, confirm every item below. These checks do not make an unverified device safe.

First check that the formatter exists and inspect its version:

adb shell which mke2fs
adb shell /sbin/mke2fs -V
🔒 Complete every verification checkbox to reveal the destructive command.
13
STEP 13 OF 24

Verify Conversion

Confirm p14 is now ext4, mount /data, and inspect the mount.

adb shell blkid /dev/block/mmcblk0p14
adb shell mount /data
adb shell "cat /proc/mounts | grep ' /data '"
Successful mount resembles/dev/block/mmcblk0p14 /data ext4 rw,...
14
STEP 14 OF 24

Install CyanogenMod 12.1

Keep cm-12.1-20160721-UNOFFICIAL-endeavoru.zip intact. In TWRP choose Advanced → ADB Sideload → Swipe to Start Sideload.

adb devices
adb sideload "C:\path\to\cm-12.1-20160721-UNOFFICIAL-endeavoru.zip"
Do not reboot yet. A transfer result of Total xfer: 1.00x confirms transfer, but TWRP itself must still be checked for installer errors.
15
STEP 15 OF 24

Install Google Apps — Optional

If you want Google services, use an ARM / Android 5.1 GApps package. Open GApps Pico was used in the tested procedure.

Start TWRP’s ADB Sideload mode again, confirm adb devices reports sideload, then:

adb sideload "C:\path\to\open_gapps-arm-5.1-pico.zip"
16
STEP 16 OF 24

Verify Google Apps

Return to ordinary recovery mode, mount system and check for the installed framework and Play Store components.

adb shell mount /system
adb shell ls /system/priv-app/GoogleServicesFramework
adb shell ls /system/priv-app/Phonesky
17
STEP 17 OF 24

Extract boot.img

For an S-ON HTC One X, extract only boot.img from the root of cm-12.1-20160721-UNOFFICIAL-endeavoru.zip. The tested boot image was 4,538,368 bytes.

18
STEP 18 OF 24

Flash boot.img

Reboot into HBOOT → FASTBOOT and verify that Fastboot shows a real serial number.

fastboot devices
If Fastboot shows ????????????, do not flash. Fix the USB/driver connection first.
fastboot flash boot "C:\path\to\boot.img"
19
STEP 19 OF 24

First Boot

The phone should now have the CM12.1 system and boot image, NewLayout /data, and optional ARM Android 5.1 GApps.

In TWRP choose Reboot → System. The first boot can take several minutes.

20
STEP 20 OF 24

Root Access

Open Settings → About phone and tap Build number seven times. Then go to Developer options → Root access → Apps and ADB and enable Android/USB debugging.

adb devices
adb shell
su
id
Tested root resultuid=0(root) gid=0(root) context=u:r:sudaemon:s0
21
STEP 21 OF 24

Why su Doesn’t Work in Windows CMD

su exists on Android, not as a normal Windows command. Enter the Android shell first:

adb shell
su
22
STEP 22 OF 24

Troubleshooting

ADB worked in TWRP but not CM

Enable Developer options and Android debugging again. Installing a new ROM resets USB debugging configuration and authorisations.

MTP works but adb devices is empty

Check Device Manager, reconnect USB, then restart the ADB server.

adb kill-server
adb start-server
adb devices
Fastboot displays ????????????

Do not flash. Reconnect USB, re-enter FASTBOOT USB and fix the driver/connection until the actual serial appears.

TWRP says /data is 0 MB

Check p14. On a verified endeavoru/NewLayout setup, a remaining vfat filesystem means the old HTC Storage filesystem has not been converted.

adb shell blkid /dev/block/mmcblk0p14
mkfs.ext4 cannot be found

The tested recovery used /sbin/mke2fs rather than mkfs.ext4.

su returns 255

Set Developer options → Root access → Apps and ADB.

ADB sideload says connection failed: closed

Start TWRP’s Advanced → ADB Sideload mode first. adb devices should report sideload.

23
STEP 23 OF 24

Keep a Permanent Recovery Kit

Keep a permanent offline archive containing your clean backups, hashes, recoveries, ROM, extracted boot image, optional GApps package and your own HTC unlock file.

boot-clean.imgsystem-clean.imguserdata-clean.imgSHA256.txttwrp-3.1.1-0-endeavoru.imgtwrp2853-BiG.imgcm-12.1-20160721-UNOFFICIAL-endeavoru.zipboot.imgGApps ARM 5.1 Pico ZIPHTC Unlock_code.bin
24
STEP 24 OF 24

Final Working Configuration

DeviceHTC One X
Codenameendeavoru
SoCNVIDIA Tegra 3
Android5.1.1
ROMCyanogenMod 12.1
RecoveryTWRP 2.8.5.3.BiG
/datap14 • ext4 • ~25 GB
RootCyanogenMod su • uid=0
Final safety note: never copy the p14 formatting command merely because a phone says “HTC One X”. Verify fastboot getvar product, the by-name mapping and NewLayout fstab first.
HTC One X (endeavoru) • CyanogenMod 12.1 • Android 5.1.1
Make backups first. Verify the exact device, partition mapping and recovery expectations before destructive operations.

Scroll to Top