Fix mismatching vendor and system security patch levels

This commit is contained in:
Danny Lin 2021-01-13 19:08:28 -08:00
parent e240121e83
commit 4ba7ac5da3
No known key found for this signature in database
GPG Key ID: 1988FAA1797EE5AC

12
post-fs-data.sh Executable file
View File

@ -0,0 +1,12 @@
#!/system/bin/sh
set -eufo pipefail
system_patch="$(getprop ro.build.version.security_patch)"
vendor_patch="$(getprop ro.vendor.build.security_patch)"
# Fix mismatching security patch levels
if [[ "$system_patch" != "$vendor_patch" ]]; then
resetprop ro.build.version.security_patch "$vendor_patch"
resetprop ro.build.version.real_security_patch "$system_patch"
fi