Skip to content

Commit 77066c6

Browse files
committed
Add WeChat 6.5.16-1120 support
1 parent 61b6058 commit 77066c6

File tree

9 files changed

+192
-106
lines changed

9 files changed

+192
-106
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
让微信和支付宝在支持指纹识别的手机上使用指纹支付, 即使他们都不打算支持!
66

77
已适配版本:\
8-
微信: 6.5.8 6.5.10-1080 6.5.13-1081 6.5.13-1100\
8+
微信: 6.5.8 [6.5.10-1080](https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/1.3/weixin6510.apk) 6.5.13-1081 [6.5.13-1100](https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/1.4.1/WeChat-6.5.13-1100.apk) [6.5.16-1120](https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/2.3.0/WeChat-6.5.16-1120.apk)\
99
支付宝: 10.1.0.090418-114\
1010
淘宝: 6.11.0-161
1111

@@ -23,7 +23,7 @@
2323

2424
使用步骤:
2525
1. 下载并安装插件: https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/2.2.0/WeChatFp-2.2.0-release.apk
26-
2. 下载并安装微信6.5.13-1100版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/1.4.1/WeChat-6.5.13-1100.apk
26+
2. 下载并安装微信6.5.16-1120版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/1.4.1/WeChat-6.5.13-1120.apk
2727
3. 下载并安装支付宝10.1.0.090418-114版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/2.0.0/Alipay-10.1.0.090418-114.apk
2828
4. 下载并安装淘宝6.11.0-161版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/2.1.0/Taobao-6.11.0-161.apk
2929
5. 启用插件, 输入密码

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.yyxx.wechatfp"
1111
minSdkVersion 14
1212
targetSdkVersion 26
13-
versionCode 9
14-
versionName "2.2.0"
13+
versionCode 10
14+
versionName "2.3.0"
1515
buildConfigField "String", "APP_PRODUCT_NAME", "\"WeChatFp\""
1616
}
1717

app/src/main/java/com/yyxx/wechatfp/Constant.java

Lines changed: 5 additions & 1 deletion
Large diffs are not rendered by default.

app/src/main/java/com/yyxx/wechatfp/Lang.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public class Lang {
5858
public static final int FINGERPRINT_VERIFICATION = 0x00000028;
5959
public static final int WECHAT_GENERAL = 0x00000029;
6060
public static final int APP_SETTINGS_NAME = 0x00000030;
61+
public static final int WECHAT_PAYVIEW_PASSWORD_TITLE = 0x00000031;
62+
public static final int WECHAT_PAYVIEW_FINGERPRINT_TITLE = 0x00000032;
63+
public static final int WECHAT_PAYVIEW_PASSWORD_SWITCH_TEXT = 0x00000033;
64+
public static final int WECHAT_PAYVIEW_FINGERPRINT_SWITCH_TEXT = 0x00000034;
6165

6266
public static final int TOAST_GIVE_ME_STAR = 0x01000001;
6367
public static final int TOAST_CHECKING_UPDATE = 0x01000002;
@@ -83,7 +87,7 @@ public static String getString(int res) {
8387
case SETTINGS_TITLE_HELP_TAOBAO:
8488
return tr("淘宝指纹", "淘宝指纹", "Taobao fingerprint pay");
8589
case SETTINGS_TITLE_CHECKUPDATE:
86-
return tr("檢查更新", "檢查更新", "Check for update");
90+
return tr("检查更新", "檢查更新", "Check for update");
8791
case SETTINGS_TITLE_WEBSIDE:
8892
return tr("项目主页", "項目主頁", "Project homepage");
8993
case SETTINGS_TITLE_VERSION:
@@ -136,6 +140,14 @@ public static String getString(int res) {
136140
return tr("通用", "一般", "General");
137141
case APP_SETTINGS_NAME:
138142
return tr("指纹設置", "指紋設置", "Fingerprint");
143+
case WECHAT_PAYVIEW_FINGERPRINT_TITLE:
144+
return tr("请验证指纹", "請驗證指紋", "Verify fingerprint");
145+
case WECHAT_PAYVIEW_PASSWORD_TITLE:
146+
return tr("请输入支付密码", "請輸入付款密碼", "Enter payment password");
147+
case WECHAT_PAYVIEW_PASSWORD_SWITCH_TEXT:
148+
return tr("使用密码", "使用密碼", "Password");
149+
case WECHAT_PAYVIEW_FINGERPRINT_SWITCH_TEXT:
150+
return tr("使用指纹", "使用指紋", "Fingerprint");
139151

140152
case TOAST_GIVE_ME_STAR:
141153
return tr("如果您拥有Github账户, 别忘了给我的项目+个Star噢", "如果您擁有Github賬戶, 別忘了給我的項目+個Star噢", "Give me a star, if you like this project");

app/src/main/java/com/yyxx/wechatfp/util/ViewUtil.java

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import android.view.MotionEvent;
1414
import android.view.View;
1515
import android.view.ViewGroup;
16+
import android.widget.TextView;
1617

1718
import com.yyxx.wechatfp.util.log.L;
1819

@@ -134,18 +135,46 @@ public static View findViewByName(Activity activity, String packageName, String.
134135
return null;
135136
}
136137

138+
@Nullable
139+
public static View findViewByText(View rootView, String... names) {
140+
for (String name : names) {
141+
List<View> viewList = new ArrayList<>();
142+
getChildViews((ViewGroup) rootView, name, viewList);
143+
int outViewListSize = viewList.size();
144+
if (outViewListSize == 1) {
145+
return viewList.get(0);
146+
} else if (outViewListSize > 1) {
147+
for (View view : viewList) {
148+
if (view.isShown()) {
149+
return view;
150+
}
151+
}
152+
return viewList.get(0);
153+
}
154+
}
155+
return null;
156+
}
157+
158+
private static String getViewInfo(View view) {
159+
StringBuffer stringBuffer = new StringBuffer();
160+
stringBuffer.append(String.valueOf(view));
161+
if (view instanceof TextView) {
162+
stringBuffer.append(" text:").append(((TextView) view).getText());
163+
}
164+
return stringBuffer.toString();
165+
}
137166

138167
public static void recursiveLoopChildren(ViewGroup parent) {
139168
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
140169
final View child = parent.getChildAt(i);
141170
if (child instanceof ViewGroup) {
142171
recursiveLoopChildren((ViewGroup) child);
143172
// DO SOMETHING WITH VIEWGROUP, AFTER CHILDREN HAS BEEN LOOPED
144-
L.d("ViewGroup", child);
173+
L.d("ViewGroup", getViewInfo(child));
145174
} else {
146175
if (child != null) {
147176
try {
148-
L.d("view", child);
177+
L.d("view", getViewInfo(child));
149178
} catch (Exception e) {
150179

151180
}
@@ -155,6 +184,24 @@ public static void recursiveLoopChildren(ViewGroup parent) {
155184
}
156185
}
157186

187+
public static void getChildViews(ViewGroup parent, String text, List<View> outList) {
188+
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
189+
final View child = parent.getChildAt(i);
190+
if (child == null) {
191+
continue;
192+
}
193+
if (child instanceof TextView) {
194+
if (text.equals(String.valueOf(((TextView) child).getText()))) {
195+
outList.add(child);
196+
}
197+
}
198+
if (child instanceof ViewGroup) {
199+
getChildViews((ViewGroup) child, text, outList);
200+
} else {
201+
}
202+
}
203+
}
204+
158205
public static void getChildViews(ViewGroup parent, int id,List<View> outList) {
159206
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
160207
final View child = parent.getChildAt(i);

app/src/main/java/com/yyxx/wechatfp/xposed/ObfuscationHelper.java

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,45 @@ public static class MM_Classes {
1010
public static Class<?> PayUI, FetchUI, PayView, WalletBaseUI, PreferenceAdapter;
1111

1212
private static void init(int idx, LoadPackageParam lpparam) throws Throwable {
13+
//classes3
1314
PayUI = XposedHelpers.findClass("com.tencent.mm.plugin.wallet.pay.ui." + new String[]{
1415
"WalletPayUI", //6.5.8
1516
"WalletPayUI", //6.5.10-1080
1617
"WalletPayUI", //6.5.13-1081
1718
"WalletPayUI", //6.5.13-1100
19+
"WalletPayUI", //6.5.16-1120
1820
}[idx], lpparam.classLoader);
21+
//classes2
1922
PayView = XposedHelpers.findClass("com.tencent.mm.plugin.wallet_core.ui." + new String[]{
2023
"l", //6.5.8
2124
"l", //6.5.10-1080
2225
"l", //6.5.13-1081
2326
"l", //6.5.13-1100
27+
"l", //6.5.16-1120
2428
}[idx], lpparam.classLoader);
29+
//classes2
2530
FetchUI = XposedHelpers.findClass("com.tencent.mm.plugin.wallet.balance.ui." + new String[]{
2631
"WalletBalanceFetchPwdInputUI", //6.5.8
2732
"WalletBalanceFetchPwdInputUI", //6.5.10-1080
2833
"WalletBalanceFetchPwdInputUI", //6.5.13-1081
2934
"WalletBalanceFetchPwdInputUI", //6.5.13-1100
35+
"WalletBalanceFetchPwdInputUI", //6.5.16-1120
3036
}[idx], lpparam.classLoader);
37+
//classes2
3138
WalletBaseUI = XposedHelpers.findClass("com.tencent.mm.wallet_core.ui." + new String[]{
3239
"WalletBaseUI", //6.5.8
3340
"WalletBaseUI", //6.5.10-1080
3441
"WalletBaseUI", //6.5.13-1081
3542
"WalletBaseUI", //6.5.13-1100
43+
"WalletBaseUI", //6.5.16-1120
3644
}[idx], lpparam.classLoader);
45+
//classes
3746
PreferenceAdapter = XposedHelpers.findClass("com.tencent.mm.ui.base.preference." + new String[]{
3847
"h", //6.5.8
3948
"h", //6.5.10-1080
4049
"h", //6.5.13-1081
4150
"h", //6.5.13-1100
51+
"h", //6.5.16-1120
4252
}[idx], lpparam.classLoader);
4353
}
4454
}
@@ -53,91 +63,75 @@ public static class MM_Fields {
5363
public static String PreferenceAdapter_vpP;
5464

5565
private static void init(int idx) throws Throwable {
66+
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => public EditHintPasswdView rWo;
5667
PaypwdView = new String[]{
5768
"qVO", //6.5.8
5869
"ryk", //6.5.10-1080
5970
"rNe", //6.5.13-1081
6071
"rLB", //6.5.13-1100
72+
"rWo", //6.5.16-1120
6173
}[idx];
74+
//EditHintPasswdView => private TenpaySecureEditText xhU;
6275
PaypwdEditText = new String[]{
6376
"vyO", //6.5.8
6477
"wjm", //6.5.10-1080
6578
"wFP", //6.5.13-1081
6679
"wDJ", //6.5.13-1100
80+
"xhU", //6.5.16-1120
6781
}[idx];
82+
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => protected MyKeyboardWindow mKeyboard;\n protected View nzg;
6883
PayInputView = new String[]{
6984
"mOL", //6.5.8
7085
"nnG", //6.5.10-1080
7186
"npM", //6.5.13-1081
7287
"nol", //6.5.13-1100
88+
"nzg", //6.5.16-1120
7389
}[idx];
90+
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => public TextView rWj;\n public TextView rWk;\n public FavourLayout rWl;
7491
PayTitle = new String[]{
7592
"qVK", //6.5.8
7693
"ryg", //6.5.10-1080
7794
"rMZ", //6.5.13-1081
7895
"rLw", //6.5.13-1100
96+
"rWj", //6.5.16-1120
7997
}[idx];
98+
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => public Bankcard rWC; \n public TextView rWD;
8099
Passwd_Text = new String[]{
81100
"qVK", //6.5.8
82101
"ryz", //6.5.10-1080
83102
"rNt", //6.5.13-1081
84103
"rLQ", //6.5.13-1100
104+
"rWD", //6.5.16-1120
85105
}[idx];
106+
//classes2 com.tencent.mm.ui.base.preference.h => private final HashMap<String, Preference> vOF;
86107
PreferenceAdapter_vpQ = new String[]{
87108
"uoo", //6.5.8
88109
"uYA", //6.5.10-1080
89110
"vrF", //6.5.13-1081
90111
"vpQ", //6.5.13-1100
112+
"vOF", //6.5.16-1120
91113
}[idx];
114+
//classes2 com.tencent.mm.ui.base.preference.h => private final LinkedList<String> vOE;
92115
PreferenceAdapter_vpP = new String[]{
93116
"uon", //6.5.8
94117
"uYz", //6.5.10-1080
95118
"vrE", //6.5.13-1081
96119
"vpP", //6.5.13-1100
120+
"vOE", //6.5.16-1120
97121
}[idx];
98122
}
99123
}
100124

101-
public static class MM_Res {
102-
public static int Finger_icon;
103-
public static int Finger_title;
104-
public static int Passwd_title;
105-
106-
private static void init(int idx) throws Throwable {
107-
Finger_icon = new int[]{
108-
2130838280, //6.5.8
109-
2130838289, //6.5.10-1080
110-
2130838298, //6.5.13-1081
111-
2130838298, //6.5.13-1100
112-
}[idx];
113-
Finger_title = new int[]{
114-
2131236833, //6.5.8
115-
2131236918, //6.5.10-1080
116-
2131236963, //6.5.13-1081
117-
2131236964, //6.5.13-1100
118-
}[idx];
119-
Passwd_title = new int[]{
120-
2131236838, //6.5.8
121-
2131236923, //6.5.10-1080
122-
2131236968, //6.5.13-1081
123-
2131236969, //6.5.13-1100
124-
}[idx];
125-
}
126-
}
127-
128-
129125
public static boolean init(int versioncode, String versionName, LoadPackageParam lpparam) throws Throwable {
130126
int versionIndex = isSupportedVersion(versioncode, versionName);
131127
if (versionIndex < 0) {
132128
return false;
133129
}
134130
MM_Classes.init(versionIndex, lpparam);
135131
MM_Fields.init(versionIndex);
136-
MM_Res.init(versionIndex);
137132
return true;
138133
}
139134

140-
141135
public static int isSupportedVersion(int versionCode, String versionName) {
142136
if (versionName.contains("6.5.8")) {
143137
return 0;
@@ -151,6 +145,9 @@ public static int isSupportedVersion(int versionCode, String versionName) {
151145
if (versionName.contains("6.5.13") && versionCode == 1100) {
152146
return 3;
153147
}
148+
if (versionName.contains("6.5.16") && versionCode == 1120) {
149+
return 4;
150+
}
154151
return -1;
155152
}
156153
}

app/src/main/java/com/yyxx/wechatfp/xposed/plugin/XposedAlipayPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import de.robv.android.xposed.XposedHelpers;
4343
import de.robv.android.xposed.callbacks.XC_LoadPackage;
4444

45-
import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_BASE64;
45+
import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_ALIPAY_BASE64;
4646

4747
/**
4848
* Created by Jason on 2017/9/8.
@@ -186,7 +186,7 @@ public void showFingerPrintDialog(final Activity activity) {
186186
activity.getWindow().getDecorView().setAlpha(0);
187187
mPwdActivityDontShowFlag = false;
188188
int defVMargin = DpUtil.dip2px(context, 30);
189-
final Bitmap bitmap = ImageUtil.base64ToBitmap(ICON_FINGER_PRINT_BASE64);
189+
final Bitmap bitmap = ImageUtil.base64ToBitmap(ICON_FINGER_PRINT_ALIPAY_BASE64);
190190
LinearLayout rootVLinearLayout = new LinearLayout(context);
191191
rootVLinearLayout.setOrientation(LinearLayout.VERTICAL);
192192
rootVLinearLayout.setGravity(Gravity.CENTER_HORIZONTAL);

app/src/main/java/com/yyxx/wechatfp/xposed/plugin/XposedTaobaoPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import de.robv.android.xposed.XposedHelpers;
4343
import de.robv.android.xposed.callbacks.XC_LoadPackage;
4444

45-
import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_BASE64;
45+
import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_ALIPAY_BASE64;
4646

4747
/**
4848
* Created by Jason on 2017/9/8.
@@ -187,7 +187,7 @@ public void showFingerPrintDialog(final Activity activity) {
187187
activity.getWindow().getDecorView().setAlpha(0);
188188
mPwdActivityDontShowFlag = false;
189189
int defVMargin = DpUtil.dip2px(context, 30);
190-
final Bitmap bitmap = ImageUtil.base64ToBitmap(ICON_FINGER_PRINT_BASE64);
190+
final Bitmap bitmap = ImageUtil.base64ToBitmap(ICON_FINGER_PRINT_ALIPAY_BASE64);
191191
LinearLayout rootVLinearLayout = new LinearLayout(context);
192192
rootVLinearLayout.setOrientation(LinearLayout.VERTICAL);
193193
rootVLinearLayout.setGravity(Gravity.CENTER_HORIZONTAL);

0 commit comments

Comments
 (0)