diff --git a/module/install_func.sh b/module/install_func.sh index 744e77a..1175e28 100644 --- a/module/install_func.sh +++ b/module/install_func.sh @@ -41,15 +41,9 @@ migrate_config() { # Migrate security_patch config* if [ ! -s "/data/adb/security_patch" ]; then - echo "#Tricky Addon security patch config" > "/data/adb/security_patch" + echo "#Tricky Addon security patch auto config" > "/data/adb/security_patch" + fi + if ! grep -q "^auto_config=" "/data/adb/security_patch"; then + echo "auto_config=1" >> "/data/adb/security_patch" fi - for value in auto_config custom_config all system vendor boot; do - if ! grep -q "^$value=" "/data/adb/security_patch"; then - if [ "$value" = "auto_config" ]; then - echo "$value=1" >> "/data/adb/security_patch" - else - echo "$value=0" >> "/data/adb/security_patch" - fi - fi - done } diff --git a/module/service.sh b/module/service.sh index 677f4a2..e61fc4f 100644 --- a/module/service.sh +++ b/module/service.sh @@ -48,22 +48,9 @@ set_security_patch() { fi } -# Spoof security patch if older than 1 year +# Spoof security patch if grep -q "^auto_config=1" "/data/adb/security_patch"; then - # Auto config set_security_patch -elif grep -q "^custom_config=1" "/data/adb/security_patch"; then - # Custom config - if ! grep -q "^all=0" "/data/adb/security_patch"; then - echo "all=$(grep "^all=" "/data/adb/security_patch" | cut -d'=' -f2)" > "$TARGET_DIR/security_patch.txt" - else - > "$TARGET_DIR/security_patch.txt" - for value in system vendor boot; do - if grep -q "^$value=" "/data/adb/security_patch"; then - echo "$value=$(grep "^$value=" "/data/adb/security_patch" | cut -d'=' -f2)" >> "$TARGET_DIR/security_patch.txt" - fi - done - fi fi # Reset verified Boot Hash diff --git a/module/webui/index.html b/module/webui/index.html index ab3a9b1..abd0a45 100644 --- a/module/webui/index.html +++ b/module/webui/index.html @@ -12,6 +12,7 @@ + @@ -79,6 +80,7 @@
  • +
  • @@ -193,6 +195,13 @@
    +
  • + + +
  • +