change ro.boot.vbmeta.digest logic

migrate from system.prop to reset prop due system.prop not working on some device
This commit is contained in:
KOWX712
2024-10-28 19:50:02 +08:00
parent 608f3364af
commit 4a7437705c
4 changed files with 24 additions and 7 deletions

View File

@@ -2,6 +2,11 @@ MODDIR=${0%/*}
COMPATH="$MODDIR/common"
TS="/data/adb/modules/tricky_store"
hash_value=$(grep -v '^#' "$MODDIR/boot_hash" | tr -d '[:space:]')
if [ -n "$hash_value" ]; then
resetprop -n ro.boot.vbmeta.digest "$hash_value"
fi
if [ ! -f "$COMPATH/ninstalled" ] || [ ! -f "$COMPATH/disabled" ] || [ ! -f "$COMPATH/normal" ]; then
sed -i 's/^description=.*/description=Module is corrupted, please reinstall module./' "$MODDIR/module.prop"
exit 1