Skip to content

Commit

Permalink
Changed SD resource file location
Browse files Browse the repository at this point in the history
  • Loading branch information
nov30th committed Nov 29, 2023
1 parent 1ecdae0 commit e46249e
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 36 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,52 @@
# 支付宝装X模块

Xposed module for Alipay App which makes you barcode payment interface same as Diamond members or customized skins.
Xposed module for Alipay App which makes you barcode payment interface same as Diamond members or
customized skins.

这是一个Xposed模块,它可以让你的支付宝付款背景为黑色钻石会员样式或自定义皮肤。

*该模块作者仅在Xposed官方及LSPosed官方同步,其他途径下载请自行分析风险。*
*该模块作者仅在LSPosed官方同步,其他途径下载请自行分析风险。*

### 界面

欢迎PR界面操作,比如下载SD.zip文件以及权限Require,由于作者并不是专业Android开发,针对SDK API 23及其他尝试了一些放弃了界面傻瓜操作。
欢迎PR界面操作,比如下载SD.zip文件以及权限Require,由于作者并不是专业Android开发,针对SDK API
23及其他尝试了一些放弃了界面傻瓜操作。

另外觉得好用请右上角Star ❥这个Repo,^_^

### 版本

|版本|功能|最后更新时间|是否可用
|---|---|---|---|
2.2.8|余额宝修改及收益自动计算、 自由选择支付宝付款码背景|2018.06|<=10.0.12
2.2.8|自由选择支付宝付款码背景|2018.06|<10.2.33
2.3.0|仅钻石付款背景|2021.09|所有版本
2.4.0|钻石背景或自定义皮肤|2022.01|>=10.2.23
2.4.2|钻石背景或自定义皮肤(含导出)|2023.09|>=10.2.23
| 版本 | 功能 | 最后更新时间 | 是否可用 |
| ----- | --------------------------------------------------- | ------------ | --------------------------- |
| 2.2.8 | 余额宝修改及收益自动计算、 自由选择支付宝付款码背景 | 2018.06 | <=10.0.12 |
| 2.2.8 | 自由选择支付宝付款码背景 | 2018.06 | <10.2.33 |
| 2.3.0 | 仅钻石付款背景 | 2021.09 | 所有版本 |
| 2.4.0 | 钻石背景或自定义皮肤 | 2022.01 | >=10.2.23, (皮肤<10.5.53) |
| 2.4.2 | 钻石背景或自定义皮肤(含导出) | 2023.09 | >=10.2.23, (皮肤<10.5.53) |
| 2.5.0 | 钻石背景或自定义皮肤(含导出) | 2023.11 | >=10.2.23 |

### 自定义皮肤说明
- 手动下载DEMO资源包,放入SD卡根目录既可。(**[SD CARD]**\000_HOHO_ALIPAY_SKIN)
- **更新支付宝或者清除支付宝缓存后,需要在000_HOHO_ALIPAY_SKIN重新创建update文件夹(或文件)以更新缓存。**
- **第一次使用需手动修改支付宝权限给与存储卡读写功能以读取自定义界面配置**

- 手动下载DEMO资源包,放入SD卡对应程序文件目录。(**[SD CARD]**
\Android\media\com.eg.android.AlipayGphone\)
- 如果你没有看到**[SD CARD]**
\Android\media\com.eg.android.AlipayGphone\目录,在插件已经安装的情况下,打开支付宝付款二维码,程序会自动创建一个)
- **
更新支付宝或者清除支付宝缓存后,需要在000_HOHO_ALIPAY_SKIN里重新创建update文件夹(或文件)以更新缓存。 **
- **第一次使用需手动修改支付宝权限给与存储卡读写功能以读取自定义界面配置(旧版安卓系统)**

### 目录结构说明

命名|所属目录|含义|是否目录|手动创建|作用后文件消失
-------|--------------------|-------------|---|---|---
actived|000_HOHO_ALIPAY_SKIN|开启自定义皮肤功能|随意|是|否
update|000_HOHO_ALIPAY_SKIN|触发支付宝增量自定义皮肤缓存|随意|是|是
delete|000_HOHO_ALIPAY_SKIN|触发支付宝删除自定义皮肤缓存|随意|是|是
export|000_HOHO_ALIPAY_SKIN|导出支付宝拥有皮肤|随意|是|是
任意名称目录|000_HOHO_ALIPAY_SKIN|自定义皮肤文件夹|是|是|否
任意名称文件|000_HOHO_ALIPAY_SKIN|无作用|否|是|否
以下提到的所有"目录"均为000_HOHO_ALIPAY_SKIN下的目录。

| 命名 | 含义 | 是否目录 | 手动创建 | 作用后文件消失 |
| ------------ | ---------------------------- | -------- | -------- | -------------- |
| actived | 开启自定义皮肤功能 | 随意 |||
| update | 触发支付宝增量自定义皮肤缓存 | 随意 |||
| delete | 触发支付宝删除自定义皮肤缓存 | 随意 |||
| export | 导出支付宝拥有皮肤 | 随意 |||
| 任意名称目录 | 自定义皮肤文件夹 ||||
| 任意名称文件 | 无作用 ||||

> 通常情况下,创建 update文件夹 时,请同时创建 delete文件夹 干净清除。
Expand All @@ -51,16 +61,20 @@ export|000_HOHO_ALIPAY_SKIN|导出支付宝拥有皮肤|随意|是|是
***资源包已经包含3个作者画的DEMO与简单的PSD文件,请自行研究。***

## 快速手机修改背景步骤

1. 打开任意目录下background_2x1.png文件,修改图片为手机分辨率大小并替换图片。也可直接替换文件。

> <img src="https://raw.githubusercontent.com/nov30th/AlipayHighHeadsomeRichAndroid/master/images/ps_bg.png" height="600" />
2. 在000_HOHO_ALIPAY_SKIN目录下创建delete与update两个文件夹。
3. 打开支付宝付款码即可看到效果如图。

> <img src="https://raw.githubusercontent.com/nov30th/AlipayHighHeadsomeRichAndroid/master/images/final_code.png" height="600" />
4. 其他界面内元素同样。如不希望随机界面,删除000_HOHO_ALIPAY_SKIN下其他皮肤目录后,同样创建创建delete与update两个文件夹触发更新。

## 更新历史

[更新历史](Updates.md)


【作者自用】
Binary file not shown.
6 changes: 6 additions & 0 deletions Updates.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## 2023.11支付宝安卓框架更新
具体我也不了解,反正新版的Android不支持SD卡直接读写,然后支付宝更新后导致部分非媒体文件处理不了了。

然后做的这一版本更新,修改了存储位置。(chatgpt4真好用,嘎嘎一问就说出问题了)

## 2023.09杭州亚运更新
由于官方出了一些好看的皮肤,鉴于有过期日,增加导出功能,便可保存皮肤使用。

(使用请注意版权问题,作者仅提供专业人士研究分析目的)

## 2022.01功能更新
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ android {
applicationId "im.hoho.alipayInstallB"
minSdkVersion 21
targetSdkVersion 33
versionCode 101
versionName "2.4.2"
versionCode 102
versionName "2.5.0"
// testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
namespace 'im.hoho.alipayInstallB'
buildToolsVersion '34.0.0'
// buildTypes {
// release {
// minifyEnabled false
Expand Down
17 changes: 4 additions & 13 deletions app/src/main/java/im/hoho/alipayInstallB/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,21 @@ protected void onCreate(Bundle savedInstanceState) {
ListView listview = (ListView) findViewById(R.id.listview);
TextView textView = (TextView) findViewById(R.id.textView2);

textView.setText("2.4.0-Gamma");
textView.setText("2.5.0");

listview.setDividerHeight(0);//屏蔽掉listview的横线
listview.setDivider(null);

String[] listContent = {"Author: 裘小杰 - hoho.im 杭州亚运会版",
"支付宝付款显示钻石会员背景。",
"自定义付款码皮肤(可随机变换).",
"没有界面控件,请参考文档操作。",
"",
"文档及源代码项目地址:",
"https://github.com/nov30th/AlipayHighHeadsomeRichAndroid",
String[] listContent = {"Author: 裘小杰 - hoho.im 杭州亚运会版", "支付宝付款显示钻石会员背景。", "自定义付款码皮肤(可随机变换).", "没有界面控件,请参考文档操作。", "", "文档及源代码项目地址:", "https://github.com/nov30th/AlipayHighHeadsomeRichAndroid",

};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(
this,
android.R.layout.simple_expandable_list_item_1,
listContent);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, listContent);
listview.setAdapter(adapter);
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
String text = (String) ((TextView) view).getText();
if (text.contains("https")){
if (text.contains("https")) {
Uri uri = Uri.parse(text);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
Expand Down
23 changes: 14 additions & 9 deletions app/src/main/java/im/hoho/alipayInstallB/PluginMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@
*/
public class PluginMain implements IXposedHookLoadPackage {

private static final String packageName = "com.eg.android.AlipayGphone";

public PluginMain() {
XposedBridge.log("Now Loading HOHO`` alipay plugin...");
}

@Override
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {


if (lpparam.packageName.equals("com.eg.android.AlipayGphone")) {
if (lpparam.packageName.equals(packageName)) {
XposedBridge.log("Loaded App: " + lpparam.packageName);
XposedBridge.log("Powered by HOHO`` 20230927 杭州亚运会版");
XposedBridge.log("Powered by HOHO`` 20230927 杭州亚运会版 sd source changed 20231129");

XposedHelpers.findAndHookMethod("com.alipay.mobilegw.biz.shared.processer.login.UserLoginResult", lpparam.classLoader, "getExtResAttrs", new XC_MethodHook() {
protected void afterHookedMethod(MethodHookParam param1MethodHookParam) throws Throwable {
Expand All @@ -53,8 +54,7 @@ protected void afterHookedMethod(MethodHookParam param1MethodHookParam) throws T
});

//region modify skin

final Class<?> ConfigUtilBiz = lpparam.classLoader.loadClass("com.alipay.mobile.onsitepaystatic.ConfigUtilBiz");
// final Class<?> ConfigUtilBiz = lpparam.classLoader.loadClass("com.alipay.mobile.onsitepaystatic.ConfigUtilBiz");
final Class<?> OspSkinModel = lpparam.classLoader.loadClass("com.alipay.mobile.onsitepaystatic.skin.OspSkinModel");

XposedHelpers.findAndHookMethod("com.alipay.mobile.onsitepaystatic.ConfigUtilBiz", lpparam.classLoader, "getFacePaySkinModel", new XC_MethodHook() {
Expand Down Expand Up @@ -134,13 +134,18 @@ public List<String> searchSkins(String Path) {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {

String fixedPathInAliData = "/data/data/com.eg.android.AlipayGphone/files/onsitepay_skin_dir/HOHO";
String alipaySkinsRoot = "/data/data/com.eg.android.AlipayGphone/files/onsitepay_skin_dir";
String fixedPathInAliData = "/data/data/" + packageName + "/files/onsitepay_skin_dir/HOHO";
String alipaySkinsRoot = "/data/data/" + packageName + "/files/onsitepay_skin_dir";
// XposedBridge.log("DEBUG: fixedPathInAliData: " + fixedPathInAliData);
File hohoSkinFileInAliData = new File(fixedPathInAliData);

String fixedPathUpdates = Environment.getExternalStorageDirectory() + "/000_HOHO_ALIPAY_SKIN";
// XposedBridge.log("DEBUG: skin SD card path: " + fixedPathUpdates);
String basePathUpdates = Environment.getExternalStorageDirectory() + "/Android/media/" + packageName;
if (!new File(basePathUpdates).exists()) {
XposedBridge.log("DEBUG: creating skin SD card path: " + basePathUpdates);
// create dir
new File(basePathUpdates).mkdirs();
}
String fixedPathUpdates = basePathUpdates + "/000_HOHO_ALIPAY_SKIN";

File skinActived = new File(fixedPathUpdates + "/actived");
File skinUpdateRequired = new File(fixedPathUpdates + "/update");
Expand Down

0 comments on commit e46249e

Please sign in to comment.