You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
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:
6
module/common/boot_hash
Normal file
6
module/common/boot_hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file is to pass Minotaur native test 'Partition Check Fail'
|
||||
# Download Key Attestation (chiteroman fork recommended)
|
||||
# Link: https://github.com/chiteroman/KeyAttestation/releases
|
||||
# Get your VerifiedBootHash value from Key Attestation app
|
||||
# Ask here if you don't know how to do: https://t.me/kowchannelchat
|
||||
# Paste verifiedBootHash value on next line and save
|
||||
@@ -1,3 +0,0 @@
|
||||
# To pass Minotaur native test Conventional Test (8), you can get your VerifiedBootHash from KeyAttestation app
|
||||
# Put verifiedBootHash after 'ro.boot.vbmeta.digest=' and remove the '#' infront of it.
|
||||
#ro.boot.vbmeta.digest=
|
||||
@@ -100,11 +100,20 @@ elif [ -d "$CONFIG_DIR" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "/data/adb/modules/$MODNAME/system.prop" ]; then
|
||||
mv "$COMPATH/system.prop" "$MODPATH/system.prop"
|
||||
ORG_DIR="/data/adb/modules/$MODNAME"
|
||||
if [ ! -f "$ORG_DIR/boot_hash" ]; then
|
||||
mv "$COMPATH/boot_hash" "$MODPATH/boot_hash"
|
||||
else
|
||||
rm -f "$COMPATH/system.prop"
|
||||
mv "/data/adb/modules/$MODNAME/system.prop" "$MODPATH/system.prop"
|
||||
rm -f "$COMPATH/boot_hash"
|
||||
mv "$ORG_DIR/boot_hash" "$MODPATH/boot_hash"
|
||||
fi
|
||||
|
||||
# Migrate from old version setup
|
||||
if [ -f "$ORG_DIR/system.prop" ]; then
|
||||
hash_value=$(sed -n 's/^ro.boot.vbmeta.digest=//p' "$ORG_DIR/system.prop")
|
||||
if [ -n "$hash_value" ]; then
|
||||
echo -e "\n$hash_value" >> "$MODPATH/boot_hash"
|
||||
fi
|
||||
fi
|
||||
|
||||
kb="$COMPATH/.keybox"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user