diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index bc1d5cc7e1c64..f9879ccc18c98 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -1056,12 +1056,18 @@ void AndroidRuntime::start(const char* className, const Vector& 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);