Skip to content

Commit

Permalink
Don't force apps to compile during the boot process
Browse files Browse the repository at this point in the history
This change reverts the following commits:
  01c3244
  f5967d5

They have become obsolete by a change in Xposed's ART libraries which
allows the system to use the dex from .odex files in interpret-only mode
(i.e. the compiled code is ignored).

This works out-of-the-box on stock ROMs where the image checksums match
(because the image hasn't been recompiled) and no Xposed version check
prevents the usage of the .odex file.
  • Loading branch information
rovo89 committed Apr 19, 2016
1 parent 21c8ea5 commit 01aa8bb
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions app/src/main/java/de/robv/android/xposed/XposedBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XC_LoadPackage.callAll(lpparam);

if (Build.VERSION.SDK_INT >= 21) {
// Force dex2oat while the system is still booting to ensure that system content providers work.
findAndHookMethod("com.android.server.pm.PackageManagerService", cl, "performDexOpt",
String.class, String.class, boolean.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Object instance = (Build.VERSION.SDK_INT >= 23)
? getObjectField(param.thisObject, "mPackageDexOptimizer") : param.thisObject;
if (getObjectField(instance, "mDeferredDexOpt") != null)
param.args[2] = true;
}
});

// Huawei
Class<?> clsHwPackageManager = findClassIfExists("com.android.server.pm.HwPackageManagerService", cl);
if (clsHwPackageManager != null) {
Expand Down

0 comments on commit 01aa8bb

Please sign in to comment.