Skip to content

brizzzzuy/ziyi-port

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ziyi-port

Debloated, performance-tuned HyperOS 3 build pipeline for the Xiaomi 13 Lite / Civi 2 (ziyi)

Telegram brizz.uz ziyi only WSL MIT

Part of my ziyi HyperOS port work — this repo is the build pipeline; released ROMs live on Telegram and brizz.uz.


A fastboot-flashable, aggressively debloated, performance-tuned build of the base package the phone actually runs (stock or a hybrid port), using a donor HyperOS package as a config/reference source. No cross-SoC binaries are ported — read PORTING_GUIDE.md Section 0 for why that is the design, not a shortcut: it is what guarantees the three priority components (in-display fingerprint, all cameras, dual-SIM telephony) keep working.

v2 pipeline: only the product partition is modified; SELinux labels are applied at image-build time (mkfs.erofs --file-contexts), so the build runs fine on WSL1/NTFS hosts; system-resident bloat is handled by a generated post-flash pm disable script instead of system surgery.

Contents

File What it is
PORTING_GUIDE.md The complete step-by-step guide (Sections 0–12). Start here.
debloat_list.txt Manifest of every removal: package | path | reason. Caution rows are !-prefixed and skipped by default. Consumed directly by the patch script.
tweaks_applied.txt Every performance tweak: file | original | new | benefit, including the tweaks deliberately not applied and why.
scripts/setup_wsl.sh One-time WSL tool install (erofs-utils, payload-dumper-go, lpunpack.py…). Idempotent.
scripts/extract_and_patch.sh The build: extracts the base package, debloats, tweaks, repacks product with build-time SELinux labeling + verification, assembles the flash package. Idempotent.
scripts/flash_ziyi.bat Double-click Windows flasher with device-identity gate, unlock gate, and confirmation prompt. Auto-copied into the output package.
scripts/flash_ziyi_full.bat Full-package variant of the flasher.

Quick path (details in the guide)

  1. WSL: run setup_wsl.sh once.
  2. Place the base package at build/base_rom.zip (or set BASE_PKG=...).
  3. Run scripts/extract_and_patch.sh inside WSL.
  4. Output lands in build/out/ziyi_flashpkg/ — double-click flash_ziyi.bat (bootloader must be unlocked; see guide Section 11).
  5. After first boot: run post_flash_disable.cmd, then verify per guide Section 12 (fingerprint, every camera, both SIMs, animation scales via adb).

Safety design

  • Device identity is verified twice (guide pre-flight, and the .bat refuses any device not reporting product: ziyi).
  • vendor, odm, system, boot chain, modem/firmware, persist: never modified; only product is rebuilt, and the rebuilt image must pass SELinux label verification or the build aborts.
  • Telephony/IMS/SIM/payment-attestation/Google paths are hard-refused by the debloat engine no matter what the manifest says.
  • Unbrick path: official ziyi fastboot ROM + MiFlash ("clean all", never "clean all and lock").

Disclaimer

Flashing modified firmware can void your warranty and, done carelessly, brick your device. Everything here gates on product: ziyi and follows the never-touch-vendor design, but you flash at your own risk. Read the guide first. Keep the official fastboot ROM downloaded before you start.

License

MIT — the pipeline and docs. ROM content itself belongs to Xiaomi; this repo ships no ROM binaries.

About

Debloated, performance-tuned HyperOS 3 build pipeline for Xiaomi 13 Lite / Civi 2 (ziyi) - WSL-based, product-only, brick-safe by design

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors