diff options
author | Charles Lin <charleslin@realtek.com> | 2020-12-28 09:11:27 +0000 |
---|---|---|
committer | Charles Lin <charleslin@realtek.com> | 2020-12-28 16:16:56 +0000 |
commit | a777944a5eb8fc8bd783ad51001a76420333df39 (patch) | |
tree | 62f524239f6f4c778722efa2c2d68c7c7e979c16 | |
parent | d5163650db082dc105d4d1cbd32e58668469544f (diff) | |
download | base-a777944a5eb8fc8bd783ad51001a76420333df39.tar.gz |
mkdir .incomplete in backing storage to fix CTS/GTS failures
Linux kernel included a commit 17efe505a4c3df88d3e13051f421d27d7178d47f
that creates .incomplete folder on mounting incfs. However .incomplete
folder is only accessible for root with 0700 permission. So system_server
has no permission to access it.
By creating .incomplete folder with 0777 permission in system_server,
incfs won't have to create incomplete folder implicitly.
Bug: 176400491
Test: CtsIncrementalInstallHostTestCases
CtsContentTestCases android.content.pm.cts.PackageManagerShellCommandIncrementalTest
CtsStatsdHostTestCases android.cts.statsd.atom.UidAtomTests#testPackageInstallerV2MetricsReported
GtsIncrementalInstallProxyHostTestCases
Change-Id: Icb7babe3b482a089019f981fe149de7d619ce87e
-rw-r--r-- | services/incremental/IncrementalService.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index a5f0d045948c..338ede283e1a 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -476,6 +476,9 @@ StorageId IncrementalService::createStorage(std::string_view mountPoint, if (!mkdirOrLog(path::join(backing, ".index"), 0777)) { return kInvalidStorageId; } + if (!mkdirOrLog(path::join(backing, ".incomplete"), 0777)) { + return kInvalidStorageId; + } auto status = mVold->mountIncFs(backing, mountTarget, 0, &controlParcel); if (!status.isOk()) { LOG(ERROR) << "Vold::mountIncFs() failed: " << status.toString8(); |