FP4T-502 [Monitor][SD format]The DUT reboot when SD card formatting
* Root Cause
add log to monitor
* Solution
add timeout
* Test Steps
NA
* Test Result
pass
Change-Id: I52aaa69fedf1862d3bff1741dc3bfa35fc138929
diff --git a/FsCrypt.cpp b/FsCrypt.cpp
index 59a4828..21b504b 100644
--- a/FsCrypt.cpp
+++ b/FsCrypt.cpp
@@ -864,6 +864,13 @@
if (!prepare_dir(vendor_de_path, 0771, AID_ROOT, AID_ROOT)) return false;
}
+ auto path_test = android::vold::BuildDataPath(volume_uuid);
+ if (android::vold::pathExists(path_test)) {
+ LOG(ERROR) << ">>> Path exists: " << path_test;
+ } else {
+ LOG(ERROR) << ">>> Path does not exist: " << path_test;
+ }
+
if (!prepare_dir(misc_de_path, 01771, AID_SYSTEM, AID_MISC)) return false;
if (!prepare_dir(user_de_path, 0771, AID_SYSTEM, AID_SYSTEM)) return false;
diff --git a/Utils.cpp b/Utils.cpp
index e8049ed..9dd216a 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -475,6 +475,7 @@
}
status_t ForceUnmount(const std::string& path) {
+ PLOG(ERROR) << "ForceUnmount start unmount path is >> " << path;
const char* cpath = path.c_str();
if (!umount2(cpath, UMOUNT_NOFOLLOW) || errno == EINVAL || errno == ENOENT) {
return OK;
diff --git a/model/PrivateVolume.cpp b/model/PrivateVolume.cpp
index 2fc7836..8fea966 100644
--- a/model/PrivateVolume.cpp
+++ b/model/PrivateVolume.cpp
@@ -141,6 +141,7 @@
}
status_t PrivateVolume::doMount() {
+ LOG(ERROR) << "PrivateVolume::doMount start >>";
if (readMetadata()) {
LOG(ERROR) << getId() << " failed to read metadata";
return -EIO;
@@ -205,7 +206,7 @@
PLOG(ERROR) << getId() << " failed to prepare";
return -EIO;
}
-
+ LOG(ERROR) << "PrivateVolume::doMount success >>";
return OK;
}