From 2f18d85a9b4ca933b8f534924eb64e697ec9d4cf Mon Sep 17 00:00:00 2001 From: Anirudh Gupta Date: Sat, 15 Oct 2022 15:28:05 +0530 Subject: [PATCH] service: Set shipping level to 32 for devices >=33 If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC setting it to 32 allows for software attestation and passing CTS Signed-off-by: Anirudh Gupta --- magisk/service.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/magisk/service.sh b/magisk/service.sh index 3bdbf78..40d2d20 100755 --- a/magisk/service.sh +++ b/magisk/service.sh @@ -42,4 +42,9 @@ fi # avoid breaking OnePlus display modes/fingerprint scanners resetprop vendor.boot.verifiedbootstate green + + # avoid breaking encryption, set shipping level to 32 for devices >=33 to allow for software attestation. + if [[ "$(getprop ro.product.first_api_level)" -ge 33 ]]; then + resetprop ro.product.first_api_level 32 + fi }&