Skip to content

Commit 6a90f8f

Browse files
committed
feat: set security patch props instantly when compact is supported
1 parent 127f7e8 commit 6a90f8f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

module/security_patch.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ cat << EOF > $MODDIR/system.prop
6767
ro.build.version.security_patch=$SECURITY_PATCH
6868
ro.vendor.build.security_patch=$SECURITY_PATCH
6969
EOF
70+
71+
if resetprop --help | grep "compact" > /dev/null; then
72+
resetprop -n ro.build.version.security_patch "$SECURITY_PATCH"
73+
resetprop -n ro.vendor.build.security_patch "$SECURITY_PATCH"
74+
resetprop -c
75+
fi

webui/assets/scripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function applyButtonEventListeners() {
101101
}
102102

103103
securityPatchBtn.onclick = async () => {
104-
await exec(`sh ${moddir}/security_patch.sh --${securityPatchBtn.selected ? 'enable' : 'disable'}`);
104+
await exec(`sh ${moddir}/security_patch.sh --${securityPatchBtn.selected ? 'enable' : 'disable'}`, { env: { PATH: "/data/adb/magisk:/data/adb/ksu/bin:/data/adb/ap/bin:$PATH" }});
105105
await loadAutoSecurityPatchConfig();
106106
appendToOutput(`[+] ${securityPatchBtn.selected ? translations.output_enabled : translations.output_disabled} auto security patch.`);
107107
}

0 commit comments

Comments
 (0)