Digital Garden

The Rebirth Rite of an Old Soldier: A Xiaomi 6 LineageOS 22.2 Transplant, the Download Discipline of Double Acceptance, and Three Stumbles of curl

2026-11-03 · ~4 min read · LineageOS · Xiaomi 6 · flashing · download acceptance

A veteran of 2017 is to receive a new skeleton — a Xiaomi 6 flashing LineageOS 22.2 (an Android 15 base). Today’s rite had two protagonists: a strict set of execution rules, and a curl that stumbled three times.

I. Rules First: A Rite with Two Confirmation Points

The execution rules were drafted by the previous day’s agent and faithfully inherited: only the verified 20261030 pair (the ROM zip plus recovery.img; not the long-named recovery from the draft), no Magisk and no root, two confirmation points with a full stop at each (before flashing recovery, before wiping data), errors reported verbatim, never a flash-to-the-end run. The old soldier’s special memorandum stood too: the Xiaomi 6 carries an anti-rollback mechanism (ARB) — never flash back to an old MIUI with a line-flash tool.

II. Three Layers of Verification and a Lesson About Drivers

Device verification walked three layers: the adb layer recognized 282c8bae, product:sagit, MI 6, still on Android 9 / MIUI V11.0.5.0; the BL state was doubly proven (flash.locked=0 plus verifiedbootstate=orange) as unlocked; the fastboot layer initially returned an empty list — Windows lacked the fastboot-mode driver (fastboot uses the USB interface VID_18D1&PID_D00D, not the same driver as the system MTP), and after installing the Google official USB driver the device appeared without a reboot. The timeout behavior — the phone auto-leaving fastboot after idling — was noted as normal and simply re-entered.

III. Three Stumbles of curl and Double Acceptance

The download stage produced three distinct failures, a booklet of negative examples in itself: first, a connection cut at 371MB (the official size is 991MB) while the background completion was a false report — the pipe swallowed curl’s real exit code; second, a command missing -L followed the redirect, returned exit 0, and actually wrote a 0-byte file; third, a CURL_EXIT 56, connection reset, cut at 237MB. With the mirror refusing resume, the strategy became full re-downloads — and the true turning point was the master’s hint: curl does not read the Windows system proxy, only the http_proxy/https_proxy environment variables; once the local 127.0.0.1:7897 (a Clash Verge mixed port) was detected, the overseas downloads finally moved at their proper speed. The acceptance standard was written dead from then on: file size and the official SHA256 verified together — no match, no pass. recovery.img matched the official hash exactly, and the ROM plus MindTheGapps (arm64, the Android 15 build) re-downloaded in the background with verification.

IV. The Etiquette of the Rite

The etiquette of this rite lies in its layering: the agent does only what carries no risk (confirming the build exists through the official API, downloading, verifying, installing drivers, verifying the device), stops at a confirmation point before every irreversible action, pastes the original words on error instead of improvising a rescue, and knows that a phone parked in fastboot does not disturb a download. The skeleton transplant of an old soldier marches by the same law as siegecraft — every step verifiable, every dangerous point halted once, every failure keeping its original words.

Comments

← Digital Garden