keymaster restore: warn when pin, password or pattern is enabled
Starting in Android 10, zygote relies on stored inodes in order
to find packages in the user's CE directories. Since TWRP cannot
force inode creation on restore, we warn the user to remove their
pin before restoring their backup. Otherwise zygote may not load
properly in Android. This will force the system to update the
inode cache.
The user can then re-add their security settings to android.
Change-Id: I8f07962d07304dee54c08318efc500dca424b6c0
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 9e42318..9e37463 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1269,6 +1269,9 @@
UnMount_Main_Partitions();
time(&rStop);
gui_msg(Msg(msg::kHighlight, "restore_completed=[RESTORE COMPLETED IN {1} SECONDS]")((int)difftime(rStop,rStart)));
+ TWPartition* Decrypt_Data = Find_Partition_By_Path("/data");
+ if (Decrypt_Data && Decrypt_Data->Is_Encrypted)
+ gui_msg(Msg(msg::kWarning, "reboot_after_restore=It is recommended to reboot Android once after first boot."));
DataManager::SetValue("tw_file_progress", "");
return true;