From 20ed24fc0cbbada36e84dc1f1e86946db6e6c5a4 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Wed, 20 Apr 2016 14:07:43 -0700 Subject: [PATCH] Make fake libart for misbehaving apps be loaded. Bug: 27775991 Change-Id: Ie4eba211e876ec0643ce6ecf6a110f3cb5e0f57e --- core/java/android/app/LoadedApk.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index e090aa442d8ea..df4e82c3d9b2c 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -372,6 +372,11 @@ public final class LoadedApk { // Add path to libraries in apk for current abi. Do this now because more entries // will be added to zipPaths that shouldn't be part of the library path. if (aInfo.primaryCpuAbi != null) { + // Add fake libs into the library search path if we target prior to N. + if (aInfo.targetSdkVersion <= 23) { + outLibPaths.add("/system/fake-libs" + + (VMRuntime.is64BitAbi(aInfo.primaryCpuAbi) ? "64" : "")); + } for (String apk : outZipPaths) { outLibPaths.add(apk + "!/lib/" + aInfo.primaryCpuAbi); }