From 26aabfd1ed6a7afcc70692a3fb7f1c66e2f209e2 Mon Sep 17 00:00:00 2001 From: Paul Crowley Date: Fri, 16 Aug 2019 12:39:17 -0700 Subject: [PATCH] Move layout_version to /data/misc/installd Bug: 139543295 Test: Boot, ensure file is properly created Change-Id: I919b5599484b4c77f222e640a1f1b5d65198a0c7 --- rootdir/init.rc | 1 + sdcard/sdcard.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 4d34b67d3..b78032d48 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -532,6 +532,7 @@ on post-fs-data mkdir /data/misc/profiles/ref 0771 system system mkdir /data/misc/profman 0770 system shell mkdir /data/misc/gcov 0770 root root + mkdir /data/misc/installd 0700 root root mkdir /data/preloads 0775 system system diff --git a/sdcard/sdcard.cpp b/sdcard/sdcard.cpp index 2b358197a..622de5b7a 100644 --- a/sdcard/sdcard.cpp +++ b/sdcard/sdcard.cpp @@ -315,7 +315,8 @@ int main(int argc, char **argv) { PLOG(ERROR) << "setting RLIMIT_NOFILE failed"; } - while ((fs_read_atomic_int("/data/.layout_version", &fs_version) == -1) || (fs_version < 3)) { + while ((fs_read_atomic_int("/data/misc/installd/layout_version", &fs_version) == -1) || + (fs_version < 3)) { LOG(ERROR) << "installd fs upgrade not yet complete; waiting..."; sleep(1); }