diff options
Diffstat (limited to 'runtime/native/java_lang_VMClassLoader.cc')
-rw-r--r-- | runtime/native/java_lang_VMClassLoader.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/native/java_lang_VMClassLoader.cc b/runtime/native/java_lang_VMClassLoader.cc index 11e02a2ce4..27dd9709bd 100644 --- a/runtime/native/java_lang_VMClassLoader.cc +++ b/runtime/native/java_lang_VMClassLoader.cc @@ -143,8 +143,10 @@ static jobjectArray VMClassLoader_getBootClassPathEntries(JNIEnv* env, jclass) { const DexFile* dex_file = path[i]; // For multidex locations, e.g., x.jar!classes2.dex, we want to look into x.jar. - const std::string location(DexFileLoader::GetBaseLocation(dex_file->GetLocation())); - + std::string location(DexFileLoader::GetBaseLocation(dex_file->GetLocation())); + if (Runtime::SimulatorMode()) { + location = getenv("ANDROID_PRODUCT_OUT") + location; + } ScopedLocalRef<jstring> javaPath(env, env->NewStringUTF(location.c_str())); if (javaPath.get() == nullptr) { DCHECK(env->ExceptionCheck()); |