UniOHOS Graphical Recovery (UniOHOS/recovery)
UniOHOS/recovery (Apache-2.0 core + verbatim MIT LVGL v9.2.2 subset) is a chipset-agnostic graphical recovery engine built for OpenHarmony / HarmonyOS porting workflows.
1. Key Capabilities
- Modern High-Refresh Touch UI: Borderless LVGL v9.2 interface (reference layout tuned for
1440x3200@120fps, adaptable per display backend), OLED pure-black default theme, soft light theme, live English/Chinese switching, 16x analytical SDF icons, edge-back gestures, idle blanking, and slide-to-unlock. - Deterministic Multi-Threaded Intro Renderer (
rec_intro_anim): Dynamic row-chunk worker pool with bit-exact single-thread vs multi-thread output and SIL OFL 1.1Noto Sans Mediumprecomputed Euclidean SDF wordmark data. - Multi-Protocol Boot Control & Flashing: Standard
BCB/BCABplus extensible platform one-shotDJBC(zero physical GPT writes), OpenHarmonyHDC Sideload, streaming Sparse/ZIP64 userspaceFastbootd, andliblplogical partition tooling. - On-Device Maintenance: Partition mount/backup/restore, file manager, touch terminal, on-demand Wi-Fi with strongest-BSSID selection for multi-node Mesh networks, ARMv8 CRC32/SHA-256 verification, and 6-digit PBKDF2-HMAC-SHA256 PIN lock.
2. Host Build & Three-Mode Verification
All 17 modules in core/ compile and test directly on a Linux x86_64 host under Normal, ASan+UBSan+LSan, and TSan with Ubuntu 24.04's -D_FORTIFY_SOURCE=3 hardening:
bash
git clone https://github.com/UniOHOS/recovery.git
cd recovery
# Run hygiene check and 3-mode host verification suite
make CC=clang verify3. Optional Local Build Helpers
- Regenerate the Intro Wordmark SDF Header from any locally installed OpenType/TrueType font (default ships precomputed from SIL OFL 1.1
Noto Sans Medium):bashpython3 scripts/gen_wordmark_header.py --font /path/to/font.ttf --out core/include/rec_intro_wordmark_data.h - Fetch Upstream
f2fs-tools 1.17.0(GPL-2.0-only) outside Git for target recovery image assembly (keepsUniOHOS/recoverypureApache-2.0+MIT):bashbash scripts/fetch_f2fs_tools.sh
4. Adapting Recovery to a New SoC
Never fork UniOHOS/recovery per device. Implement your silicon hardware bindings (DRM/KMS atomic modeset, touchscreen, haptics, USB ConfigFS FunctionFS ACM+HDC+Fastbootd, early .ko loader, and Stage-1 router) under:
text
UniOHOS-Devices/<vendor>-<soc>-bsp/common/recovery-platform/See the reference implementation in UniOHOS-Devices/xiaomi-xring-o1-bsp/common/recovery-platform and the architectural overview in Recovery & Plugin Isolation.