diff options
author | Adnan Begovic <adnan@cyngn.com> | 2016-02-18 17:14:42 -0800 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2016-02-19 10:41:06 -0800 |
commit | 7690389cfbdc1079aacbe3e26f410e271190d7d9 (patch) | |
tree | df95a72d942db28ceec08ace4bc1becf46f54f70 /core/jni | |
parent | c079202dd4426077e27cbad2ec116d4fd01e1164 (diff) | |
download | frameworks_base-7690389cfbdc1079aacbe3e26f410e271190d7d9.zip frameworks_base-7690389cfbdc1079aacbe3e26f410e271190d7d9.tar.gz frameworks_base-7690389cfbdc1079aacbe3e26f410e271190d7d9.tar.bz2 |
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
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index a715c5f..9acdab4 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -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); |