开发工具
工具名称 | 工具类型 | 说明 |
---|---|---|
AndroidStuduo | 编辑工具 | 开发工具 |
jadx | java工具 | 将apk解成java项目 |
xposed | 插件工具 | 插件 |
版本 | 2.23.16.77 |
分析源码的点:
发送图片的点
获取SendMedia
回调
实现
public void sendImg(String user, String path) throws Exception {
Class AbsConsumerComponentAppShell = mHookClassLoader.loadClass("X.18Z");
Class PhoneUserJid = mHookClassLoader.loadClass("com.whatsapp.jid.PhoneUserJid");
Class MmsType = mHookClassLoader.loadClass("X.35e");
Object componentManager = XposedHelpers.callStaticMethod(AbsConsumerComponentAppShell, "componentManager", MHook.getInstance().getContext());
Object appComponent = XposedHelpers.getObjectField(componentManager, "A02");
Object phoneUserJid = XposedHelpers.callStaticMethod(PhoneUserJid, "getFromPhoneNumber", user);
List<Object> jidList = Arrays.asList(phoneUserJid);
Object mmsType = XposedHelpers.callStaticMethod(MmsType, "A0C");
Object sendMediaProvider = XposedHelpers.getObjectField(appComponent, "AQd");
Object sendMedia = XposedHelpers.callMethod(sendMediaProvider, "get");
XposedHelpers.callMethod(sendMedia, "A08", null, null, mmsType, new File(path), null, jidList, false, true, false);
}
回调处理
这样那样 再 这样那样 就好了