|
55 | 55 | import java.util.TimerTask;
|
56 | 56 | import java.util.stream.Collectors;
|
57 | 57 |
|
| 58 | +import de.robv.android.xposed.XposedBridge; |
58 | 59 | import de.robv.android.xposed.XposedHelpers;
|
59 | 60 |
|
60 | 61 | public class Unobfuscator {
|
@@ -215,7 +216,7 @@ public synchronized static Method loadReceiptOutsideChat(ClassLoader classLoader
|
215 | 216 | public synchronized static Method loadReceiptInChat(ClassLoader classLoader) throws Exception {
|
216 | 217 | return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> {
|
217 | 218 | var method = loadReceiptMethod(classLoader);
|
218 |
| - var methodDataList = dexkit.findMethod(new FindMethod().matcher(new MethodMatcher().addUsingString("callCreatorJid").addUsingString("reject").addUsingNumber(6175).addInvoke(DexSignUtil.getMethodDescriptor(method)))); |
| 219 | + var methodDataList = dexkit.findMethod(new FindMethod().matcher(new MethodMatcher().addUsingString("callCreatorJid").addUsingString("reject").addInvoke(DexSignUtil.getMethodDescriptor(method)))); |
219 | 220 | if (methodDataList.isEmpty()) throw new Exception("Receipt method not found");
|
220 | 221 | return methodDataList.get(0).getMethodInstance(classLoader);
|
221 | 222 | });
|
@@ -249,6 +250,25 @@ public synchronized static Field loadBroadcastTagField(ClassLoader classLoader)
|
249 | 250 | var clazzData = dexkit.findClass(FindClass.create().matcher(ClassMatcher.create().addUsingString("UPDATE_MESSAGE_MAIN_BROADCAST_SCAN_SQL")));
|
250 | 251 | if (clazzData.isEmpty()) throw new Exception("BroadcastTag class not found");
|
251 | 252 | var methodData = dexkit.findMethod(FindMethod.create().searchInClass(clazzData).matcher(MethodMatcher.create().usingStrings("participant_hash", "view_mode", "broadcast")));
|
| 253 | + |
| 254 | + // 2.25.18.xx, they splitted method and moved to the fmessage |
| 255 | + if (methodData.isEmpty()) { |
| 256 | + methodData = dexkit.findMethod(FindMethod.create().searchInClass(clazzData).matcher(MethodMatcher.create().usingStrings("received_timestamp", "view_mode", "message"))); |
| 257 | + if (!methodData.isEmpty()) { |
| 258 | + var calledMethods = methodData.get(0).getInvokes(); |
| 259 | + for (var cmethod : calledMethods) { |
| 260 | + if (Modifier.isStatic(cmethod.getModifiers()) && cmethod.getParamCount() == 2 && fmessage.getName().equals(cmethod.getDeclaredClass().getName())) { |
| 261 | + var pTypes = cmethod.getParamTypes(); |
| 262 | + if (pTypes.get(0).getName().equals(ContentValues.class.getName()) && pTypes.get(1).getName().equals(fmessage.getName())) { |
| 263 | + methodData.clear(); |
| 264 | + methodData.add(cmethod); |
| 265 | + break; |
| 266 | + } |
| 267 | + } |
| 268 | + } |
| 269 | + } |
| 270 | + } |
| 271 | + |
252 | 272 | if (methodData.isEmpty()) throw new Exception("BroadcastTag method support not found");
|
253 | 273 | var usingFields = methodData.get(0).getUsingFields();
|
254 | 274 | for (var ufield : usingFields) {
|
@@ -813,6 +833,7 @@ public synchronized static Method loadBlueOnReplayWaJobManagerMethod(ClassLoader
|
813 | 833 | public synchronized static Class loadArchiveChatClass(ClassLoader loader) throws Exception {
|
814 | 834 | return UnobfuscatorCache.getInstance().getClass(loader, () -> {
|
815 | 835 | var clazz = findFirstClassUsingStrings(loader, StringMatchType.Contains, "archive/set-content-indicator-to-empty");
|
| 836 | + if (clazz == null) clazz = findFirstClassUsingStrings(loader, StringMatchType.Contains, "archive/Unsupported mode in ArchivePreviewView:"); |
816 | 837 | if (clazz == null) throw new Exception("ArchiveHideView method not found");
|
817 | 838 | return clazz;
|
818 | 839 | });
|
|
0 commit comments