diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java
index a127c156..381470ec 100644
--- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java
+++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java
@@ -967,6 +967,14 @@ public synchronized static Method loadNewMessageMethod(ClassLoader loader) throw
var field = clazzMessage.getDeclaredField("A02");
methodData = clazzData.findMethod(new FindMethod().matcher(new MethodMatcher().addUsingField(DexSignUtil.getFieldDescriptor(field)).returnType(String.class)));
}
+ if (methodData.isEmpty()) {
+ var csClazzData = dexkit.findClass(FindClass.create().matcher(ClassMatcher.create().addUsingString("FMessageSystemScheduledCallStart/setData index out of bounds: "))).singleOrNull();
+ if (csClazzData != null) {
+ var csClazz = csClazzData.getInstance(loader);
+ var field = csClazz.getDeclaredField("A02");
+ methodData = clazzData.findMethod(new FindMethod().matcher(new MethodMatcher().addUsingField(DexSignUtil.getFieldDescriptor(field)).returnType(String.class)));
+ }
+ }
if (methodData.isEmpty()) throw new RuntimeException("NewMessage method not found");
return methodData.get(0).getMethodInstance(loader);
});
@@ -1013,7 +1021,8 @@ public synchronized static Method loadGetEditMessageMethod(ClassLoader loader) t
}
// 21.xx+ method (static)
- if (Modifier.isStatic(invoke.getMethodInstance(loader).getModifiers()) && Objects.equals(invoke.getParamTypes().get(0), methodData.getParamTypes().get(0))) {
+ // 25.xx+ added additional type check
+ if (Modifier.isStatic(invoke.getMethodInstance(loader).getModifiers()) && Objects.equals(invoke.getParamTypes().get(0), methodData.getParamTypes().get(0)) && !Objects.equals(invoke.getParamTypes().get(0), invoke.getDeclaredClass())) {
return invoke.getMethodInstance(loader);
}
}
@@ -1549,20 +1558,24 @@ public synchronized static Method loadTextStatusComposer2(ClassLoader classLoade
addMethod(MethodMatcher.create().paramCount(1).addParamType(TextDataClass))
));
if (result.isEmpty()) {
- result = dexkit.findClass(FindClass.create().matcher(
- ClassMatcher.create().addUsingString("ViewOnce messages can not be forwarded").
- addMethod(MethodMatcher.create().paramCount(1).addParamType(TextDataClass))
- ));
- if (result.isEmpty()) {
- throw new RuntimeException("TextStatusComposer2 class not found");
+ var tscClazzData = dexkit.getClassData("com.whatsapp.statuscomposer.composer.TextStatusComposerFragment");
+ if (tscClazzData != null) {
+ for (var method : tscClazzData.getMethods()) {
+ var tdMethod = method.getInvokes().stream().filter(m -> m.isMethod() && m.getParamCount() == 1 && m.getParamTypes().get(0).equals(dexkit.getClassData(TextDataClass))).findFirst();
+ if (tdMethod.isPresent()) {
+ return tdMethod.get().getMethodInstance(classLoader);
+ }
+ }
}
+
+ throw new RuntimeException("TextStatusComposer2 class not found 1");
}
var foundClass = result.get(0).getInstance(classLoader);
var resultMethod = ReflectionUtils.findMethodUsingFilter(foundClass, method -> method.getParameterCount() == 1 && method.getParameterTypes()[0] == TextDataClass);
if (resultMethod != null)
return resultMethod;
- throw new RuntimeException("TextStatusComposer2 method not found");
+ throw new RuntimeException("TextStatusComposer2 method not found 2");
});
}
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 95c8301f..b9740899 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -120,6 +120,7 @@
- 2.24.23.xx
- 2.24.24.xx
- 2.24.25.xx
+ - 2.24.26.xx
- 2.24.20.xx
@@ -128,6 +129,7 @@
- 2.24.23.xx
- 2.24.24.xx
- 2.24.25.xx
+ - 2.24.26.xx
- image/*