Resource library¶
This library prioritizes primary documentation, official tool repositories, and clearly identified community work. A source explains its own platform; it does not automatically prove how Xiaomi integrated that technology into this watch.
Xiaomi/70mai watch application framework¶
Essential¶
- Development tools — Windows IDE setup, project creation, build command, signing setup, and RPK output location.
- Framework specifications — file organization, page routes, resource paths, supported syntax, lifecycle, i18n, and media formats.
- API reference — system modules, synchronous/asynchronous behavior, callbacks, parameters, and error codes.
- Component reference — UI elements, touch/swipe events, images, inputs, lists, and animation components. Some sections are available only on the Chinese-language site.
How to use these sources¶
Use them for RPK app behavior. They support claims such as:
- the homepage route is
pages/index/index; - application logic lives in
app.js; - page lifecycle includes
onInit,onReady,onShow,onHide, andonDestroy; - ordinary application resources can use PNG/JPEG/BMP under documented API versions;
- system functions are imported through modules such as
@system.app.
They do not document the native component-6 TSCFrameImage format, private assistant privileges, firmware signing chain, or internal inter-processor transport.
Python and project isolation¶
- Python
venv— official virtual-environment creation and activation behavior. - Python
hashlib— SHA-256 and other secure hash APIs. - Python
zlib— CRC32 implementation used by the package tools. - Python
struct— explicit byte order and binary field conversion. - Python
argparse— command-line parsing used by repository scripts. - Python
unittest— synthetic regression tests.
Read binary fields with explicit endianness. A host machine's native byte order should never silently decide package interpretation.
Git and GitHub¶
- Installing Git — official Git book installation chapter.
- Git object integrity — useful background for repository hashes, which are different from firmware SHA-256 identity.
- GitHub encrypted secrets — credentials belong in protected settings, never committed files.
- GitHub Pages — hosting and deployment documentation for this guide.
- GitHub security advisories — responsible disclosure workflow for repository tooling issues.
This repository intentionally rejects firmware, packages, keys, and common signing-file extensions in CI.
Ghidra¶
- Official NSA Ghidra repository — releases, installation requirements, source, security advisories, and documentation.
- Ghidra releases — obtain official prebuilt archives; do not confuse source archives with release builds.
- Ghidra beginner guide — official project training material.
- Ghidra security advisories — check before opening unknown binaries.
For this project, raw-binary import settings and the verified base mapping matter more than decompiler prettiness. See Ghidra and ARM workflow.
Capstone¶
- Capstone official site — project overview and releases.
- Python tutorial — architecture/mode setup, instruction iteration, detailed operands, and semantic groups.
- Capstone source repository — code, issues, and version history.
thumb_xrefs.py enables detailed ARM operands because literal loads and MOVW/MOVT construction cannot be found reliably from mnemonic text alone.
Rizin¶
- Rizin official documentation — command-line analysis concepts and commands.
- Rizin source repository — releases and implementation.
- Cutter — graphical interface built around Rizin.
Rizin and Ghidra are alternative analysis environments. Agreement between independent decoders can strengthen an instruction interpretation, but both can share the same wrong base address if configured identically.
ARM architecture¶
- Arm developer documentation — authoritative architecture manuals and instruction references.
- Arm Architecture Reference Manual for A-profile architecture — useful for general instruction semantics; choose the correct profile for the analyzed core.
- CMSIS documentation — Cortex-M software interface and core concepts.
Do not infer the exact MCU or core revision solely from an instruction that exists in several ARM profiles. Device-specific identification requires independent evidence.
STM32 secure boot and firmware update¶
- ST X-CUBE-SBSFU user manual UM2262 — secure boot/update concepts, image authentication, and update flow.
- X-CUBE-SBSFU data brief — official package scope and supported STM32 context.
The observed SFU1 header resembles an SBSFU layout and includes digest/signature-related regions. The ST documents provide format and security context; they do not prove that Xiaomi uses an unmodified reference implementation or identical keys/policies.
TouchGFX¶
- Graphics engine — retained-mode scene model, event collection, scene updates, and rendering loop.
- Code structure — generated and user-code boundaries in standard TouchGFX projects.
- Image widget — bitmap association, sizing, alpha, visibility, and performance.
- Image formats — supported framebuffer and bitmap formats.
- Image compression — official lossless-compression support and version context.
- Widgets and containers — UI hierarchy concepts.
- SVG support — supported and unsupported vector features in recent TouchGFX versions.
The watch firmware contains TouchGFX-related structures and a bitmap database, but the component-6 animated asset layer is not fully explained by standard TouchGFX documentation.
Ambiq and texture compression¶
- Ambiq Apollo4 Display Kit / Nema GUI Builder guide — Nema graphics tooling and embedded display workflow.
- Ambiq Apollo4 Family SDK User's Guide — official SDK context for NemaGFX initialization, memory pools, synchronization, and GPU operation.
PixPresso and Nema tooling help investigate TSC texture payloads. A texture generated by a vendor tool is not automatically a complete Xiaomi TSCFrameImage record.
Documentation diagrams¶
- Material for MkDocs diagrams — official Mermaid integration, supported diagram types, instant navigation, and theme behavior.
- Mermaid flowcharts — official syntax and edge semantics.
- Mermaid sequence diagrams — actor/message timeline syntax.
- Mermaid state diagrams — lifecycle/state modeling.
Project diagrams must still be evidence-backed. Rendering a relationship beautifully does not make it true.
Community research¶
- m0tral/UnpackMiColorFace — community tool for Xiaomi watch-face investigation.
Community projects can provide valuable leads, but check license, supported model, version, and reproducibility. Paid or extracted binaries must not be copied into this repository.
Source evaluation checklist¶
Before adding a technical reference, ask:
- Is it the original vendor/project documentation?
- Which version or date does it describe?
- Does it describe RPK apps, standard TouchGFX, STM32 SBSFU, or this exact watch integration?
- Which claim does it support directly?
- Which part remains an inference?
- Can another contributor access it without purchasing or redistributing protected material?
When a source conflicts with device evidence, preserve both and document the scope difference rather than silently choosing the more convenient statement.