Merge "Make the deleteAllKey feature aware of the DSU mode" am: d718c8c577
am: 9c2577b823
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826054 Change-Id: I5236ae0e54e9c95576f1b4b2ac58544d3a0468f0
This commit is contained in:
commit
fc8d1c7d37
1 changed files with 3 additions and 1 deletions
|
@ -113,7 +113,9 @@ static bool read_key(const std::string& metadata_key_dir, const KeyGeneration& g
|
||||||
auto dir = metadata_key_dir + "/key";
|
auto dir = metadata_key_dir + "/key";
|
||||||
LOG(DEBUG) << "metadata_key_dir/key: " << dir;
|
LOG(DEBUG) << "metadata_key_dir/key: " << dir;
|
||||||
if (!MkdirsSync(dir, 0700)) return false;
|
if (!MkdirsSync(dir, 0700)) return false;
|
||||||
if (!pathExists(dir)) {
|
auto in_dsu = android::base::GetBoolProperty("ro.gsid.image_running", false);
|
||||||
|
// !pathExists(dir) does not imply there's a factory reset when in DSU mode.
|
||||||
|
if (!pathExists(dir) && !in_dsu) {
|
||||||
auto delete_all = android::base::GetBoolProperty(
|
auto delete_all = android::base::GetBoolProperty(
|
||||||
"ro.crypto.metadata_init_delete_all_keys.enabled", false);
|
"ro.crypto.metadata_init_delete_all_keys.enabled", false);
|
||||||
if (delete_all) {
|
if (delete_all) {
|
||||||
|
|
Loading…
Reference in a new issue