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

Commit eb72afce authored by Adnan Begovic's avatar Adnan Begovic
Browse files

runtime: Handle prebundles on BOARD_NEEDS_VENDORIMAGE_SYMLINK.

  If a target device (ex: angler) sets BOARD_NEEDS_VENDORIMAGE_SYMLINK,
  the prebundled applications within the system.img will be extracted
  under `system/bundled-app`. Handle this scenario by setting the right
  PREBUNDLED_ROOT environment variable on boot, based on existance
  of a file.

Change-Id: I25a7d6638b0032ecff4bc37124bb2e378950c3b2
TICKET: CYNGNOS-2092
(cherry picked from commit 7690389c)
parent 64c9d324
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class Environment {
    private static final File DIR_ANDROID_STORAGE = getDirectory(ENV_ANDROID_STORAGE, "/storage");
    private static final File DIR_OEM_ROOT = getDirectory(ENV_OEM_ROOT, "/oem");
    private static final File DIR_VENDOR_ROOT = getDirectory(ENV_VENDOR_ROOT, "/vendor");
    private static final File DIR_PREBUNDLED_ROOT = getDirectory(ENV_PREBUNDLED_ROOT, "/vendor/bundled-app");
    private static final File DIR_PREBUNDLED_ROOT = getDirectory(ENV_PREBUNDLED_ROOT, "/bundled-app");

    private static final String SYSTEM_PROPERTY_EFS_ENABLED = "persist.security.efs.enabled";

+10 −0
Original line number Diff line number Diff line
@@ -1034,6 +1034,16 @@ void AndroidRuntime::start(const char* className, const Vector<String8>& options
        setenv("ANDROID_ROOT", rootDir, 1);
    }

    const char* prebundledDir = getenv("PREBUNDLED_ROOT");
    if (prebundledDir == NULL) {
        if (hasDir("/system/bundled-app")) {
            prebundledDir = "/system/bundled-app";
        } else {
            prebundledDir = "/vendor/bundled-app";
        }
        setenv("PREBUNDLED_ROOT", prebundledDir, 1);
    }

    //const char* kernelHack = getenv("LD_ASSUME_KERNEL");
    //ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);