From 7e38a3a3c82fd0e824e6fbfb96d4aa4e12e52592 Mon Sep 17 00:00:00 2001 From: xzj Date: Fri, 12 Oct 2018 10:17:11 +0800 Subject: [PATCH] fix data encryption fail when ENCRYPTION_FLAG_NO_UI is set cause: data partition not being umount before real encryption Change-Id: If5cc084c182d96c6205359b76ee0c474f6a77a2e --- cryptfs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptfs.cpp b/cryptfs.cpp index 400a616..dc3a26c 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -2253,6 +2253,7 @@ int cryptfs_enable_internal(int crypt_type, const char* passwd, int no_ui) { * /data, set a property saying we're doing inplace encryption, * and restart the framework. */ + wait_and_unmount(DATA_MNT_POINT, true); if (fs_mgr_do_tmpfs_mount(DATA_MNT_POINT)) { goto error_shutting_down; }