Session 24 — 2026-03-27g — Touch Fix; FDE Decrypt Chain (6/7 Layers)

Session 24 — 2026-03-27g

FieldValue
Date2026-03-27
Phase03b — TWRP
Duration~3 h

Touch Rotation Fix

v3.2’s X-flip was wrong. Raw touch coordinates from getevent: ABS_MT_POSITION_X range 0–1871 (long axis), ABS_MT_POSITION_Y range 0–1403 (short axis) — landscape orientation. The correct fix is a full 90° rotation applied in gui.cpp after vk_tp_to_screen scaling:

int px = x, py = y;
int W = gr_fb_width() - 1;   // 1403
int H = gr_fb_height() - 1;  // 1871
x = py * W / H;              // swap: Y→X, scale H→W
y = H - px * H / W;          // swap: X→Y, invert, scale W→H

Physical orientation: raw_X 1871=TOP, 0=BOTTOM; raw_Y 0=LEFT, 1403=RIGHT. Applied in v3.3.

FDE Decrypt Dependency Chain

#LayerFixStatus
1Vendor partition not mountedMount vendor in init.rcFixed
2qseecomd not runningAdd qseecomd service to init.rcFixed
3keymaster@4.0 not startedAdd keymaster HAL service to init.rcFixed
4libion.so missing from ramdiskAdd to recovery/root/system/lib64/Fixed
5VINTF manifest missingMinimal /system/etc/vintf/manifest.xmlFixed (manual push, not yet in build)
6health@2.0 HAL not startedStart TWRP’s built-in health HALFixed (manual test)
7dm-crypt “IV mechanism required”Unknown — IV mode missing from cipher stringBLOCKER

dm-crypt IV error (Blocker)

Kernel 4.4.194 reports device-mapper: table: 252:0: crypt: IV mechanism required. TWRP’s cryptfs.cpp (AOSP 12.1 vold) passes a cipher spec without IV mode (e.g., aes-xts instead of aes-xts-plain64). The kernel requires cipher-chainmode-ivmode format. Fix: patch cryptfs.cpp to append IV mode to cipher string.

VINTF Manifest Discovery

AOSP 12.1’s servicemanager requires /system/etc/vintf/manifest.xml to validate service registration. Without it, keystore2 fails with UNKNOWN_ERROR. This check did not exist in earlier Android versions.

More posts