Open sorgelig opened 9 years ago
ASUS again updated this function!
now correct function is:
/* For SDK 19+ */
private static Object createResourcesKey(String resDir, int displayId, Configuration overrideConfiguration, float scale, IBinder token, boolean isThemeable) {
try {
return newInstance(CLASS_RESOURCES_KEY, resDir, displayId, overrideConfiguration, scale, token, isThemeable);
} catch (Throwable t) {
XposedBridge.log(t);
return null;
}
}
@rovo89, may i ask you to apply following patch to make it compatible with Zenfone 2? Currently, i have to re-compile every release with this patch:
diff --git a/src/android/app/AndroidAppHelper.java b/src/android/app/AndroidAppHelper.java
index 3467b42..5f85d7b 100644
--- a/src/android/app/AndroidAppHelper.java
+++ b/src/android/app/AndroidAppHelper.java
@@ -94,6 +94,13 @@ public class AndroidAppHelper {
else
return newInstance(CLASS_RESOURCES_KEY, resDir, displayId, overrideConfiguration, scale, token);
} catch (Throwable t) {
+ try {
+ // Zenfone 2 ZE551ML version.
+ return newInstance(CLASS_RESOURCES_KEY, resDir, displayId, overrideConfiguration, scale, token, isThemeable);
+ }
+ catch(Throwable t2) {
+ XposedBridge.log(t2);
+ }
XposedBridge.log(t);
return null;
}
Sorry, I need to look into this a bit deeper to avoid that other ROMs are affected...
You mentioned two variants above, are both needed? Also, is there something in the ResourcesKey class (e.g. additional member that's not in AOSP/CM) to identify which variant is needed without trial and error?
Only last patch is needed. At least all new releases use this variant. Sorry for late reply. I was busy by real life :)
Hey @rovo89 Do you have any idea when will this patch be included in official xposed builds? Then one I'm using right now is an unofficial build based on v65 and doesn't play nice with latest ROM for Zenfone 5. Version 75 installs and seems to work just fine, the only trouble is that it flods the log with those findConstructorBestMatch errors sorgelig mentioned above.
Constructor requested in XposedBridge is not compatible with one used in Zenfone 2 (model ZE551ML). Here is framework.jar (including de-compiled version): http://d-h.st/hnUY
according to framework, parameters look like this:
but after logging, i've found that
XposedHelpers.findConstructorBestMatch
finds constructor with following parameters:one more parameter added to those i've found in framework.
Finally, i've fixed issue by this code in AndroidAppHelper class (i've removed other calls for debugging purpose):