From 7a007b342aea83d1a99bc43730c322d8d6bd0df2 Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Sun, 14 Mar 2021 00:32:30 +0800 Subject: [PATCH] Correct comment For file-based encryption, /data/adb is always required to encrypt https://android.googlesource.com/platform/system/extras/+/refs/tags/android-7.0.0_r36/ext4_utils/ext4_crypt_init_extensions.cpp https://android.googlesource.com/platform/system/core/+/68258e8444e0daa967b007edf659e8bb7b38c59f%5E%21/ --- native/jni/core/bootstages.cpp | 2 +- scripts/util_functions.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/native/jni/core/bootstages.cpp b/native/jni/core/bootstages.cpp index 0e153742a..b930e1d9d 100644 --- a/native/jni/core/bootstages.cpp +++ b/native/jni/core/bootstages.cpp @@ -289,7 +289,7 @@ void post_fs_data(int client) { } else { // If the folder is not automatically created by Android, // do NOT proceed further. Manual creation of the folder - // will cause bootloops on FBE devices. + // will have no encryption flag, which will cause bootloops on FBE devices. LOGE(SECURE_DIR " is not present, abort\n"); goto early_abort; } diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 9cdde58f1..4d195c154 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -528,9 +528,8 @@ check_data() { if grep ' /data ' /proc/mounts | grep -vq 'tmpfs'; then # Test if data is writable touch /data/.rw && rm /data/.rw && DATA=true - # Test if DE storage is writable + # Test if data is decrypted $DATA && [ -d /data/adb ] && touch /data/adb/.rw && rm /data/adb/.rw && DATA_DE=true - # Some recovery have broken FDE implementations, which cannot access existing folders $DATA_DE && [ -d /data/adb/magisk ] || mkdir /data/adb/magisk || DATA_DE=false fi NVBASE=/data