Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a4c1da1 authored by Alex Light's avatar Alex Light
Browse files

Try to mount and compile system_ext apks.

On newer devices the /system_ext partition often contains apks that
should be compiled by otapreopt_chroot during OTA. This change makes
sure otapreopt_chroot is able to mount that directory in order to
access and compile the apks.

Test: forrest test -l remote --test_bench_config asit/redfin ab::<PBuild>:redfin-userdebug:git_master asit/dexoptota/self_full
Bug: 181601383
Bug: 181182967
Change-Id: Ifdf60f98c2afa373ab0beedd84ffb15cf89aa475
parent 369abe01
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -179,6 +179,11 @@ static int otapreopt_chroot(const int argc, char **arg) {
    // want it for product APKs. Same notes as vendor above.
    TryExtraMount("product", arg[2], "/postinstall/product");

    // Try to mount the system_ext partition. update_engine doesn't do this for
    // us, but we want it for system_ext APKs. Same notes as vendor and product
    // above.
    TryExtraMount("system_ext", arg[2], "/postinstall/system_ext");

    constexpr const char* kPostInstallLinkerconfig = "/postinstall/linkerconfig";
    // Try to mount /postinstall/linkerconfig. we will set it up after performing the chroot
    if (mount("tmpfs", kPostInstallLinkerconfig, "tmpfs", 0, nullptr) != 0) {