Merge "Make ANDROID_RUNTIME_ROOT a required env variable" am: 6dc466fd3a am: 84cbaf603e

am: beb24a9764

Change-Id: Iebc2f4a8769f2f2da5459862cb2d6370dd105c83
This commit is contained in:
Neil Fuller
2018-12-04 05:34:21 -08:00
committed by android-build-merger

View File

@@ -1056,12 +1056,18 @@ void AndroidRuntime::start(const char* className, const Vector<String8>& options
if (rootDir == NULL) {
rootDir = "/system";
if (!hasDir("/system")) {
LOG_FATAL("No root directory specified, and /android does not exist.");
LOG_FATAL("No root directory specified, and /system does not exist.");
return;
}
setenv("ANDROID_ROOT", rootDir, 1);
}
const char* runtimeRootDir = getenv("ANDROID_RUNTIME_ROOT");
if (runtimeRootDir == NULL) {
LOG_FATAL("No runtime directory specified with ANDROID_RUNTIME_ROOT environment variable.");
return;
}
//const char* kernelHack = getenv("LD_ASSUME_KERNEL");
//ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);