Skip to content

Commit

Permalink
Add WeChat 6.5.16-1120 support
Browse files Browse the repository at this point in the history
  • Loading branch information
eritpchy committed Sep 30, 2017
1 parent 61b6058 commit 77066c6
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 106 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
让微信和支付宝在支持指纹识别的手机上使用指纹支付, 即使他们都不打算支持!

已适配版本:\
微信: 6.5.8 6.5.10-1080 6.5.13-1081 6.5.13-1100\
微信: 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)\
支付宝: 10.1.0.090418-114\
淘宝: 6.11.0-161

Expand All @@ -23,7 +23,7 @@

使用步骤:
1. 下载并安装插件: https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/2.2.0/WeChatFp-2.2.0-release.apk
2. 下载并安装微信6.5.13-1100版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/1.4.1/WeChat-6.5.13-1100.apk
2. 下载并安装微信6.5.16-1120版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/1.4.1/WeChat-6.5.13-1120.apk
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
4. 下载并安装淘宝6.11.0-161版本 https://github.com/eritpchy/Xposed-Fingerprint-pay/releases/download/2.1.0/Taobao-6.11.0-161.apk
5. 启用插件, 输入密码
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.yyxx.wechatfp"
minSdkVersion 14
targetSdkVersion 26
versionCode 9
versionName "2.2.0"
versionCode 10
versionName "2.3.0"
buildConfigField "String", "APP_PRODUCT_NAME", "\"WeChatFp\""
}

Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/com/yyxx/wechatfp/Constant.java

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion app/src/main/java/com/yyxx/wechatfp/Lang.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public class Lang {
public static final int FINGERPRINT_VERIFICATION = 0x00000028;
public static final int WECHAT_GENERAL = 0x00000029;
public static final int APP_SETTINGS_NAME = 0x00000030;
public static final int WECHAT_PAYVIEW_PASSWORD_TITLE = 0x00000031;
public static final int WECHAT_PAYVIEW_FINGERPRINT_TITLE = 0x00000032;
public static final int WECHAT_PAYVIEW_PASSWORD_SWITCH_TEXT = 0x00000033;
public static final int WECHAT_PAYVIEW_FINGERPRINT_SWITCH_TEXT = 0x00000034;

public static final int TOAST_GIVE_ME_STAR = 0x01000001;
public static final int TOAST_CHECKING_UPDATE = 0x01000002;
Expand All @@ -83,7 +87,7 @@ public static String getString(int res) {
case SETTINGS_TITLE_HELP_TAOBAO:
return tr("淘宝指纹", "淘宝指纹", "Taobao fingerprint pay");
case SETTINGS_TITLE_CHECKUPDATE:
return tr("檢查更新", "檢查更新", "Check for update");
return tr("检查更新", "檢查更新", "Check for update");
case SETTINGS_TITLE_WEBSIDE:
return tr("项目主页", "項目主頁", "Project homepage");
case SETTINGS_TITLE_VERSION:
Expand Down Expand Up @@ -136,6 +140,14 @@ public static String getString(int res) {
return tr("通用", "一般", "General");
case APP_SETTINGS_NAME:
return tr("指纹設置", "指紋設置", "Fingerprint");
case WECHAT_PAYVIEW_FINGERPRINT_TITLE:
return tr("请验证指纹", "請驗證指紋", "Verify fingerprint");
case WECHAT_PAYVIEW_PASSWORD_TITLE:
return tr("请输入支付密码", "請輸入付款密碼", "Enter payment password");
case WECHAT_PAYVIEW_PASSWORD_SWITCH_TEXT:
return tr("使用密码", "使用密碼", "Password");
case WECHAT_PAYVIEW_FINGERPRINT_SWITCH_TEXT:
return tr("使用指纹", "使用指紋", "Fingerprint");

case TOAST_GIVE_ME_STAR:
return tr("如果您拥有Github账户, 别忘了给我的项目+个Star噢", "如果您擁有Github賬戶, 別忘了給我的項目+個Star噢", "Give me a star, if you like this project");
Expand Down
51 changes: 49 additions & 2 deletions app/src/main/java/com/yyxx/wechatfp/util/ViewUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

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

Expand Down Expand Up @@ -134,18 +135,46 @@ public static View findViewByName(Activity activity, String packageName, String.
return null;
}

@Nullable
public static View findViewByText(View rootView, String... names) {
for (String name : names) {
List<View> viewList = new ArrayList<>();
getChildViews((ViewGroup) rootView, name, viewList);
int outViewListSize = viewList.size();
if (outViewListSize == 1) {
return viewList.get(0);
} else if (outViewListSize > 1) {
for (View view : viewList) {
if (view.isShown()) {
return view;
}
}
return viewList.get(0);
}
}
return null;
}

private static String getViewInfo(View view) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(String.valueOf(view));
if (view instanceof TextView) {
stringBuffer.append(" text:").append(((TextView) view).getText());
}
return stringBuffer.toString();
}

public static void recursiveLoopChildren(ViewGroup parent) {
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
final View child = parent.getChildAt(i);
if (child instanceof ViewGroup) {
recursiveLoopChildren((ViewGroup) child);
// DO SOMETHING WITH VIEWGROUP, AFTER CHILDREN HAS BEEN LOOPED
L.d("ViewGroup", child);
L.d("ViewGroup", getViewInfo(child));
} else {
if (child != null) {
try {
L.d("view", child);
L.d("view", getViewInfo(child));
} catch (Exception e) {

}
Expand All @@ -155,6 +184,24 @@ public static void recursiveLoopChildren(ViewGroup parent) {
}
}

public static void getChildViews(ViewGroup parent, String text, List<View> outList) {
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
final View child = parent.getChildAt(i);
if (child == null) {
continue;
}
if (child instanceof TextView) {
if (text.equals(String.valueOf(((TextView) child).getText()))) {
outList.add(child);
}
}
if (child instanceof ViewGroup) {
getChildViews((ViewGroup) child, text, outList);
} else {
}
}
}

public static void getChildViews(ViewGroup parent, int id,List<View> outList) {
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
final View child = parent.getChildAt(i);
Expand Down
57 changes: 27 additions & 30 deletions app/src/main/java/com/yyxx/wechatfp/xposed/ObfuscationHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,45 @@ public static class MM_Classes {
public static Class<?> PayUI, FetchUI, PayView, WalletBaseUI, PreferenceAdapter;

private static void init(int idx, LoadPackageParam lpparam) throws Throwable {
//classes3
PayUI = XposedHelpers.findClass("com.tencent.mm.plugin.wallet.pay.ui." + new String[]{
"WalletPayUI", //6.5.8
"WalletPayUI", //6.5.10-1080
"WalletPayUI", //6.5.13-1081
"WalletPayUI", //6.5.13-1100
"WalletPayUI", //6.5.16-1120
}[idx], lpparam.classLoader);
//classes2
PayView = XposedHelpers.findClass("com.tencent.mm.plugin.wallet_core.ui." + new String[]{
"l", //6.5.8
"l", //6.5.10-1080
"l", //6.5.13-1081
"l", //6.5.13-1100
"l", //6.5.16-1120
}[idx], lpparam.classLoader);
//classes2
FetchUI = XposedHelpers.findClass("com.tencent.mm.plugin.wallet.balance.ui." + new String[]{
"WalletBalanceFetchPwdInputUI", //6.5.8
"WalletBalanceFetchPwdInputUI", //6.5.10-1080
"WalletBalanceFetchPwdInputUI", //6.5.13-1081
"WalletBalanceFetchPwdInputUI", //6.5.13-1100
"WalletBalanceFetchPwdInputUI", //6.5.16-1120
}[idx], lpparam.classLoader);
//classes2
WalletBaseUI = XposedHelpers.findClass("com.tencent.mm.wallet_core.ui." + new String[]{
"WalletBaseUI", //6.5.8
"WalletBaseUI", //6.5.10-1080
"WalletBaseUI", //6.5.13-1081
"WalletBaseUI", //6.5.13-1100
"WalletBaseUI", //6.5.16-1120
}[idx], lpparam.classLoader);
//classes
PreferenceAdapter = XposedHelpers.findClass("com.tencent.mm.ui.base.preference." + new String[]{
"h", //6.5.8
"h", //6.5.10-1080
"h", //6.5.13-1081
"h", //6.5.13-1100
"h", //6.5.16-1120
}[idx], lpparam.classLoader);
}
}
Expand All @@ -53,91 +63,75 @@ public static class MM_Fields {
public static String PreferenceAdapter_vpP;

private static void init(int idx) throws Throwable {
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => public EditHintPasswdView rWo;
PaypwdView = new String[]{
"qVO", //6.5.8
"ryk", //6.5.10-1080
"rNe", //6.5.13-1081
"rLB", //6.5.13-1100
"rWo", //6.5.16-1120
}[idx];
//EditHintPasswdView => private TenpaySecureEditText xhU;
PaypwdEditText = new String[]{
"vyO", //6.5.8
"wjm", //6.5.10-1080
"wFP", //6.5.13-1081
"wDJ", //6.5.13-1100
"xhU", //6.5.16-1120
}[idx];
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => protected MyKeyboardWindow mKeyboard;\n protected View nzg;
PayInputView = new String[]{
"mOL", //6.5.8
"nnG", //6.5.10-1080
"npM", //6.5.13-1081
"nol", //6.5.13-1100
"nzg", //6.5.16-1120
}[idx];
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => public TextView rWj;\n public TextView rWk;\n public FavourLayout rWl;
PayTitle = new String[]{
"qVK", //6.5.8
"ryg", //6.5.10-1080
"rMZ", //6.5.13-1081
"rLw", //6.5.13-1100
"rWj", //6.5.16-1120
}[idx];
//classes2 PayView(com.tencent.mm.plugin.wallet_core.ui.l) => public Bankcard rWC; \n public TextView rWD;
Passwd_Text = new String[]{
"qVK", //6.5.8
"ryz", //6.5.10-1080
"rNt", //6.5.13-1081
"rLQ", //6.5.13-1100
"rWD", //6.5.16-1120
}[idx];
//classes2 com.tencent.mm.ui.base.preference.h => private final HashMap<String, Preference> vOF;
PreferenceAdapter_vpQ = new String[]{
"uoo", //6.5.8
"uYA", //6.5.10-1080
"vrF", //6.5.13-1081
"vpQ", //6.5.13-1100
"vOF", //6.5.16-1120
}[idx];
//classes2 com.tencent.mm.ui.base.preference.h => private final LinkedList<String> vOE;
PreferenceAdapter_vpP = new String[]{
"uon", //6.5.8
"uYz", //6.5.10-1080
"vrE", //6.5.13-1081
"vpP", //6.5.13-1100
"vOE", //6.5.16-1120
}[idx];
}
}

public static class MM_Res {
public static int Finger_icon;
public static int Finger_title;
public static int Passwd_title;

private static void init(int idx) throws Throwable {
Finger_icon = new int[]{
2130838280, //6.5.8
2130838289, //6.5.10-1080
2130838298, //6.5.13-1081
2130838298, //6.5.13-1100
}[idx];
Finger_title = new int[]{
2131236833, //6.5.8
2131236918, //6.5.10-1080
2131236963, //6.5.13-1081
2131236964, //6.5.13-1100
}[idx];
Passwd_title = new int[]{
2131236838, //6.5.8
2131236923, //6.5.10-1080
2131236968, //6.5.13-1081
2131236969, //6.5.13-1100
}[idx];
}
}


public static boolean init(int versioncode, String versionName, LoadPackageParam lpparam) throws Throwable {
int versionIndex = isSupportedVersion(versioncode, versionName);
if (versionIndex < 0) {
return false;
}
MM_Classes.init(versionIndex, lpparam);
MM_Fields.init(versionIndex);
MM_Res.init(versionIndex);
return true;
}


public static int isSupportedVersion(int versionCode, String versionName) {
if (versionName.contains("6.5.8")) {
return 0;
Expand All @@ -151,6 +145,9 @@ public static int isSupportedVersion(int versionCode, String versionName) {
if (versionName.contains("6.5.13") && versionCode == 1100) {
return 3;
}
if (versionName.contains("6.5.16") && versionCode == 1120) {
return 4;
}
return -1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;

import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_BASE64;
import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_ALIPAY_BASE64;

/**
* Created by Jason on 2017/9/8.
Expand Down Expand Up @@ -186,7 +186,7 @@ public void showFingerPrintDialog(final Activity activity) {
activity.getWindow().getDecorView().setAlpha(0);
mPwdActivityDontShowFlag = false;
int defVMargin = DpUtil.dip2px(context, 30);
final Bitmap bitmap = ImageUtil.base64ToBitmap(ICON_FINGER_PRINT_BASE64);
final Bitmap bitmap = ImageUtil.base64ToBitmap(ICON_FINGER_PRINT_ALIPAY_BASE64);
LinearLayout rootVLinearLayout = new LinearLayout(context);
rootVLinearLayout.setOrientation(LinearLayout.VERTICAL);
rootVLinearLayout.setGravity(Gravity.CENTER_HORIZONTAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;

import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_BASE64;
import static com.yyxx.wechatfp.Constant.ICON_FINGER_PRINT_ALIPAY_BASE64;

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

0 comments on commit 77066c6

Please sign in to comment.