Device-specific KernelSU / Magisk / APatch module for HUAWEI MediaPad M5 (CMR-W09, hi3660) that aligns verified-boot (ro.boot.vbmeta.* and ro.boot.flash.locked) properties with /dev/block/by-name/vbmeta and keeps /data/adb/boot_hash updated.
Runs in post-fs-data.sh (before zygote) and service.sh (after sys.boot_completed=1):
- Reads the SHA-256 digest of
/dev/block/by-name/vbmeta(with verified fallback). - Sets via
resetprop -n:ro.boot.vbmeta.digestro.boot.vbmeta.hash_alg=sha256ro.boot.vbmeta.avb_version=1.0ro.boot.vbmeta.size=4096ro.boot.vbmeta.invalidate_on_error=yesro.boot.vbmeta.device_state=lockedro.boot.flash.locked=1
- Writes the digest to
/data/adb/boot_hash(consumed byOh My KeyMint/Tricky Store/ omk-pif-suite).
Specific to CMR-W09 (AVB 1.0 / 4096-byte vbmeta):
- Other devices may use
vbmeta_system/vbmeta_vendor,8192-bytevbmeta,sha512, or already populatero.boot.vbmeta.digestfrom the bootloader. Do not flash on unrelated devices without adjustingvbmetaparameters.
- Download
vbmeta_sync.zipfrom Releases. - Flash in KernelSU / BakaSU / Magisk / APatch and reboot.