diff options
| author | 2016-03-16 10:09:29 -0700 | |
|---|---|---|
| committer | 2016-03-16 10:09:29 -0700 | |
| commit | 9fb85b0667235ebfdea00ea345febc8f6eb203d2 (patch) | |
| tree | 668c074f27bb5cb217382276b3b560f3fcffe3d4 | |
| parent | 49380be2cfbc43adb79ef559b7bd8578040948cc (diff) | |
Otapreopt: Remove b_mount_path
The final chosen design runs the tool in a chroot, no B mount path
required.
Bug: 25612095
Change-Id: Iba920455799da1aff97f759afc784ce43c4bf0b1
| -rw-r--r-- | cmds/installd/otapreopt.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp index 3aac48baf9..da454a7d31 100644 --- a/cmds/installd/otapreopt.cpp +++ b/cmds/installd/otapreopt.cpp @@ -138,7 +138,7 @@ private: // // Note: It seems we'll get access to the B root partition, so we should read the default.prop // file. - // if (!system_properties_.Load(b_mount_path_ + "/default.prop") { + // if (!system_properties_.Load("/default.prop")) { // return false; // } system_properties_.SetProperty("dalvik.vm.image-dex2oat-Xms", "64m"); @@ -147,7 +147,7 @@ private: system_properties_.SetProperty("dalvik.vm.dex2oat-Xmx", "512m"); // TODO(agampe): Do this properly/test. - return system_properties_.Load(b_mount_path_ + "/system/build.prop"); + return system_properties_.Load("/system/build.prop"); } bool ReadEnvironment() { @@ -165,7 +165,7 @@ private: if (root_path == nullptr) { return false; } - system_properties_.SetProperty(kAndroidRootPathPropertyName, b_mount_path_ + root_path); + system_properties_.SetProperty(kAndroidRootPathPropertyName, root_path); return true; } @@ -239,9 +239,7 @@ private: // TODO: Delete files, just for a blank slate. const std::string& boot_cp = *system_properties_.GetProperty(kBootClassPathPropertyName); - std::string preopted_boot_art_path = StringPrintf("%s/system/framework/%s/boot.art", - b_mount_path_.c_str(), - isa); + std::string preopted_boot_art_path = StringPrintf("/system/framework/%s/boot.art", isa); if (access(preopted_boot_art_path.c_str(), F_OK) == 0) { return PatchoatBootImage(art_path, isa); } else { @@ -254,7 +252,7 @@ private: // This needs to be kept in sync with ART, see art/runtime/gc/space/image_space.cc. std::vector<std::string> cmd; - cmd.push_back(b_mount_path_ + "/system/bin/patchoat"); + cmd.push_back("/system/bin/patchoat"); cmd.push_back("--input-image-location=/system/framework/boot.art"); cmd.push_back(StringPrintf("--output-image-file=%s", art_path.c_str())); @@ -279,7 +277,7 @@ private: const char* isa) { // This needs to be kept in sync with ART, see art/runtime/gc/space/image_space.cc. std::vector<std::string> cmd; - cmd.push_back(b_mount_path_ + "/system/bin/dex2oat"); + cmd.push_back("/system/bin/dex2oat"); cmd.push_back(StringPrintf("--image=%s", art_path.c_str())); for (const std::string& boot_part : Split(boot_cp, ':')) { cmd.push_back(StringPrintf("--dex-file=%s", boot_part.c_str())); @@ -305,8 +303,7 @@ private: "--compiler-filter=", false, cmd); - cmd.push_back(StringPrintf("--image-classes=%s/system/etc/preloaded-classes", - b_mount_path_.c_str())); + cmd.push_back("--image-classes=/system/etc/preloaded-classes"); // TODO: Compiled-classes. const std::string* extra_opts = system_properties_.GetProperty("dalvik.vm.image-dex2oat-flags"); @@ -468,10 +465,6 @@ private: } } - // The path where the B partitions are mounted. - // TODO(agampe): If we're running this *inside* the change-root, we wouldn't need this. - std::string b_mount_path_; - // Stores the system properties read out of the B partition. We need to use these properties // to compile, instead of the A properties we could get from init/get_property. SystemProperties system_properties_; |