Skip to content

Commit

Permalink
Merge pull request #38 from Mingyueyixi/v1.19/dev
Browse files Browse the repository at this point in the history
V1.19/dev
  • Loading branch information
Mingyueyixi authored Sep 3, 2023
2 parents 7b42c28 + 55c5ad7 commit 7c8836f
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 18 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ v1.13版本开始,默认隐藏App在桌面的图标。隐藏以后,打开模
8.0.35 (2340) 2023-04-20 (PS. 不是作者写错,而是特么下载到了一个和8.0.34版本号一样的8.0.35)
8.0.35 (2360) 2023-04-20
8.0.37 (2380) 2023-05-25
8.0.38 (2400) 2023-06-21
8.0.40 (2420) 2023-07-20

**PS.**
- 仅支持上述版本,所有其他版本号以及32位版本未经测试,预计百分之九十九不可用
Expand Down Expand Up @@ -113,12 +115,12 @@ SHA1: 410E675B0014F6DF768825F647F69D98A110D50D
8.0.38(2400):[https://dldir1.qq.com/weixin/android/weixin8038android2400_arm64.apk](https://dldir1.qq.com/weixin/android/weixin8038android2400_arm64.apk)
SHA1: F62FAD64F70F1181EC62DD3BD796A047028078FA

8.0.40(2420):[https://dldir1.qq.com/weixin/android/weixin8040android2420_arm64.apk](https://dldir1.qq.com/weixin/android/weixin8040android2420_arm64.apk)
SHA1: BCCA3CCACE5F40184A42FEFB06190C7279024985

推荐8.0.32(2300)、8.0.33(2320),8.0.34(2340),因为:

- 自2.11版本以来,正在逐步放弃支持8.0.22版本微信
- 8.0.35 刚适配,怕不是有点毛病,有一个版本,它的版本号和8.0.34一样
- 8.0.37 刚刚适配,不建议。

推荐适配的最后两个版本,因为其他版本,作者自己不再使用

**问题4:是否支持Google Play版本?**
答:不支持。
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ android {
applicationId "com.lu.wxmask"
minSdk 24
targetSdk 34
versionCode 19
versionName "1.18.端午"
versionCode 20
versionName "1.19-bug"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/lu/wxmask/Constrant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Constrant {
const val WX_CODE_8_0_35 = 2360
const val WX_CODE_8_0_37 = 2380
const val WX_CODE_8_0_38 = 2400
const val WX_CODE_8_0_40 = 2420
}

}
2 changes: 1 addition & 1 deletion app/src/main/java/com/lu/wxmask/plugin/WXConfigPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private Object findChatUserObject(Object fragmentObj) {
Object v = XposedHelpers2.getObjectField(f, "h");
return v;
}
else if (AppVersionUtil.getVersionCode() <= Constrant.WX_CODE_8_0_37) {
else if (AppVersionUtil.getVersionCode() <= Constrant.WX_CODE_8_0_40) {
Object v = XposedHelpers2.getObjectField(f, "i");
return v;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class EmptySingChatHistoryGalleryPluginPart : IPlugin {
private fun setEmptyDetailHistoryUIForMedia(context: Context, lpparam: XC_LoadPackage.LoadPackageParam?) {
var mediaMethodName = when (AppVersionUtil.getVersionCode()) {
in Constrant.WX_CODE_8_0_32..Constrant.WX_CODE_8_0_35 -> "k"
in Constrant.WX_CODE_8_0_35..Constrant.WX_CODE_8_0_38 -> "l"
in Constrant.WX_CODE_8_0_35..Constrant.WX_CODE_8_0_40 -> "l"
else -> "l"
}
val MediaHistoryListUI = "com.tencent.mm.ui.chatting.gallery.MediaHistoryListUI"
Expand Down Expand Up @@ -82,7 +82,7 @@ class EmptySingChatHistoryGalleryPluginPart : IPlugin {
val MediaHistoryGalleryUI = "com.tencent.mm.ui.chatting.gallery.MediaHistoryGalleryUI"
val methodName = when (AppVersionUtil.getVersionCode()) {
in Constrant.WX_CODE_8_0_22..Constrant.WX_CODE_8_0_35 -> "k"
in Constrant.WX_CODE_8_0_35 .. Constrant.WX_CODE_8_0_38 -> "l"
in Constrant.WX_CODE_8_0_35 .. Constrant.WX_CODE_8_0_40 -> "l"
else -> null
}
var galleryMethod: Method? = null
Expand Down Expand Up @@ -144,6 +144,7 @@ class EmptySingChatHistoryGalleryPluginPart : IPlugin {
Constrant.WX_CODE_8_0_35 -> "P"
Constrant.WX_CODE_8_0_37 -> "Q"
Constrant.WX_CODE_8_0_38 -> "R"
Constrant.WX_CODE_8_0_40 -> "Q"
else -> null
}
LogUtil.d("setEmptyActionBarTabPageUI method is :", commonHookMethodName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class EnterChattingUIPluginPart() : IPlugin {
Constrant.WX_CODE_8_0_35 -> "J"
Constrant.WX_CODE_8_0_37 -> "K"
Constrant.WX_CODE_8_0_38 -> "M"
Constrant.WX_CODE_8_0_40 -> "K"
else -> null
}
var dispatchMethod: Method? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ class HideMainUIListPluginPart : IPlugin {
"com.tencent.mm.ui.conversation.p"
}
}

Constrant.WX_CODE_8_0_35 -> "com.tencent.mm.ui.conversation.r"
in Constrant.WX_CODE_8_0_35 .. Constrant.WX_CODE_8_0_38 -> "com.tencent.mm.ui.conversation.x"
in Constrant.WX_CODE_8_0_35..Constrant.WX_CODE_8_0_40 -> "com.tencent.mm.ui.conversation.x"
else -> null
}
var adapterClazz: Class<*>? = null
Expand Down Expand Up @@ -207,10 +208,12 @@ class HideMainUIListPluginPart : IPlugin {
}
//8.0.32-8.0.34 com.tencent.mm.ui.y
//8.0.35-8.0.37  com.tencent.mm.ui.z
//搞实际Adapter的父类,是个抽象类
val adapterClazzName = when (AppVersionUtil.getVersionCode()) {
Constrant.WX_CODE_8_0_22 -> "com.tencent.mm.ui.g"
in Constrant.WX_CODE_8_0_32..Constrant.WX_CODE_8_0_34 -> "com.tencent.mm.ui.y"
in Constrant.WX_CODE_8_0_35..Constrant.WX_CODE_8_0_38 -> "com.tencent.mm.ui.z"
// in Constrant.WX_CODE_8_0_38..Constrant.WX_CODE_8_0_40 -> "com.tencent.mm.ui.b0"
else -> null
}
var getItemMethod = if (adapterClazzName != null && getItemMethodName != null) {
Expand Down Expand Up @@ -239,7 +242,7 @@ class HideMainUIListPluginPart : IPlugin {
if (isHookGetItemMethod) {
return
}
LogUtil.w(AppVersionUtil.getSmartVersionName(), "guess setAdapter: ", adapter)
LogUtil.w(AppVersionUtil.getSmartVersionName(), "guess setAdapter: ", adapter, adapter.javaClass.superclass)
getItemMethod = XposedHelpers2.findMethodExactIfExists(adapter::class.java.superclass, "k", Integer.TYPE)
if (getItemMethod == null) {
getItemMethod = XposedHelpers2.findMethodExactIfExists(adapter::class.java.superclass, "getItem", Integer.TYPE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class HideSearchListUIPluginPart : IPlugin {

private fun handleDetailSearch(context: Context, lpparam: XC_LoadPackage.LoadPackageParam) {
var hookClazzName = when (AppVersionUtil.getVersionCode()) {
Constrant.WX_CODE_8_0_38 -> "com.tencent.mm.plugin.fts.ui.x"
in Constrant.WX_CODE_8_0_38.. Constrant.WX_CODE_8_0_40 -> "com.tencent.mm.plugin.fts.ui.x"
else -> "com.tencent.mm.plugin.fts.ui.y"
}
//全局搜索详情置空
Expand Down Expand Up @@ -103,7 +103,7 @@ class HideSearchListUIPluginPart : IPlugin {
// val wxVersionCode = AppVersionUtil.getVersionCode()
// 理论上 hook com.tencent.mm.plugin.fts.ui.z#getItem 也是一样的,但是被覆盖重命名了
var hookClazzName = when (AppVersionUtil.getVersionCode()) {
Constrant.WX_CODE_8_0_38 -> "com.tencent.mm.plugin.fts.ui.y"
in Constrant.WX_CODE_8_0_38 .. Constrant.WX_CODE_8_0_40 -> "com.tencent.mm.plugin.fts.ui.y"
else -> "com.tencent.mm.plugin.fts.ui.z"
}
//全局搜索首页
Expand Down Expand Up @@ -150,13 +150,19 @@ class HideSearchListUIPluginPart : IPlugin {
// "wt1.u" -> XposedHelpers2.getObjectField<String?>(itemData, "q")
// else -> null
// } ?: return false
XposedHelpers2.getObjectField<String?>(itemData, "q")

val fieldName = when (AppVersionUtil.getVersionCode()) {
Constrant.WX_CODE_8_0_40 -> "q1"
else -> "q"
}
XposedHelpers2.getObjectField<String?>(itemData, fieldName)

} catch (e: Throwable) {
null
}
if (chatUser == null) {
when (AppVersionUtil.getVersionCode()) {
in Constrant.WX_CODE_8_0_33..Constrant.WX_CODE_8_0_38 -> {
in Constrant.WX_CODE_8_0_33..Constrant.WX_CODE_8_0_40 -> {
val fieldValue: Any = XposedHelpers2.getObjectField<Any?>(itemData, "p") ?: return false
chatUser = XposedHelpers2.getObjectField<String?>(fieldValue, "e")
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/lu/wxmask/util/AppVersionUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class AppVersionUtil {
Constrant.WX_CODE_8_0_34,
Constrant.WX_CODE_8_0_35,
Constrant.WX_CODE_8_0_37,
Constrant.WX_CODE_8_0_38 -> true
Constrant.WX_CODE_8_0_38,
Constrant.WX_CODE_8_0_40 -> true

else -> false
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/lu/wxmask/util/dev/DebugUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static void printAllFields(Object obj) {
}
}
try {
LogUtil.d(GsonUtil.toJson(data));
LogUtil.d("item data class: ", GsonUtil.toJson(data));
} catch (Exception ex) {
LogUtil.e(ex);
}
Expand All @@ -82,7 +82,7 @@ private static Map<String, Object> collectFieldValueMap(Class<?> clazz, Object o
for (Field field : fields) {
try {
field.setAccessible(true);
String k = field.getName();
String k = field.getDeclaringClass() + "_" + field.getName();
//String type = field.getType().getSimpleName();
Object v = field.get(obj);
map.put(k, v);
Expand Down

0 comments on commit 7c8836f

Please sign in to comment.