summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Luo <royluo@google.com>2024-04-01 23:42:09 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-01 23:42:09 +0000
commitc429e8be8003b9db3cecce1db5dc6e3ecf3c65bc (patch)
treeb9067c12ac97b26aa70c22f371b3850cb190ca5d
parente6db5c8d4a185eba70fbe718c7086a88075c1414 (diff)
parent21105d052e349b5f61bc0317b5d37de7d104a558 (diff)
downloadapex-c429e8be8003b9db3cecce1db5dc6e3ecf3c65bc.tar.gz
Merge "Support boot config to make adbd bootstrap" into main
-rw-r--r--apexd/apexd.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/apexd/apexd.cpp b/apexd/apexd.cpp
index a09e3d55..d22cebc5 100644
--- a/apexd/apexd.cpp
+++ b/apexd/apexd.cpp
@@ -167,11 +167,21 @@ static const std::vector<std::string> kBootstrapApexes = ([]() {
static constexpr const int kNumRetriesWhenCheckpointingEnabled = 1;
bool IsBootstrapApex(const ApexFile& apex) {
+ static std::vector<std::string> additional = []() {
+ std::vector<std::string> ret;
+ if (android::base::GetBoolProperty("ro.boot.apex.early_adbd", false)) {
+ ret.push_back("com.android.adbd");
+ }
+ return ret;
+ }();
+
if (IsVendorApex(apex) && apex.GetManifest().vendorbootstrap()) {
return true;
}
return std::find(kBootstrapApexes.begin(), kBootstrapApexes.end(),
- apex.GetManifest().name()) != kBootstrapApexes.end();
+ apex.GetManifest().name()) != kBootstrapApexes.end() ||
+ std::find(additional.begin(), additional.end(),
+ apex.GetManifest().name()) != additional.end();
}
void ReleaseF2fsCompressedBlocks(const std::string& file_path) {