kooritea / mipay-extract

Extract Mi Pay from MIUI China Rom
GNU General Public License v3.0
190 stars 26 forks source link

Mi Pay Extractor

Extract Mi Pay from MIUI China Rom

miui 12.5或以上建议用以下这个,听说准备开源

https://blog.minamigo.moe/archives/184


这个分支已经和原分支有了较大改动,原分支的使用方法这里不再适用。

仅测试过安卓10miui12,安卓11或者miui12可能有问题

这个分支只提取国内版 ROM 并进行反编译修改,不需要 eu 包,最后打包成 magisk 模块。
magisk 模块的本地化内容如下

使用方法(任选其一)

一、(不推荐)使用我提取的K20 pro plus 模块,一般来应用是不分机型的,这个模块按理也是可以用在其他机型上
直接下载然后使用magisk刷入 https://github.com/kooritea/mipay-extract/releases

二、使用自己的机型的rom包提取

1、克隆项目(或者http下载)

git clone git@github.com:kooritea/mipay-extract.git

2、下载对应的国内版 ROMhttps://xiaomifirmwareupdater.com/miui12/
如果是miui11的话直接把连接的路径改成miui11

把下载的国内版ROM放入项目文件夹(注意不要重命名了)

3、依赖(一般linux发行版都有这两个了,版本不对问题也不大,执行不了再说)

apt-get install -y openjdk-8-jre python2.7

4、执行

chmod +x ./start
./start

不支持windows抱歉,我没有改bat和没有windows测试环境

最后将生成的 eufix-magisk-model-ver.zip 使用 magisk 刷入即可

建议刷入模块后先去删除/data/system/package_cache/下的文件夹再重启


请注意

刷入本模块后将不能通过safetyNet测试,卸载模块也不能恢复,原因不明(?) 好像不是本模块而是edx导致的
有使用google pay或看netflix需求的请慎重刷入

设置的ui会发生改变

由于将eu版权限控制器改为国内版权限控制器,需要更改ro.product.mod_device
会导致设置页面变为国内版,不过eu版的设置项除了桌面(eu版额外的设置项会保留)之外都是被精简过的,所以几乎没有问题
设置里的谷歌入口消失: 下载创建快捷方式这个应用,打开右上角勾选也搜索活动列表也显示系统应用,搜索com.google.android.gms.app.settings.GoogleSettingsLink,创建这个快捷方式即可
首页的设备安全情况: 密码安全->系统安全
我的设备中by xiaomi.eu的字样会消失

权限管理器使用国内版

可能你不一定能感受出来,国内版的权限管理范围更加广控制更加严格
一个比较明显的,在eu版中,没有自启动权限的termux在任务管理器被划掉之后能够在后台保持session不掉
但是国内版有没有自启动权限都不能保持session(原因是国内版在任务管理器划掉时会不管3721都全杀掉,有自启权限的话你就可以杀掉后自启,不做特殊处理的国外软件session当然就掉了)
在eu版上,系统级广播唤醒应用是不需要自启动权限的,在国内版中,需要给自启动权限里面的允许系统唤醒权限

通知聚合未恢复问题

如果在设置中未出现通知聚合选项,在终端中输入下面的命令,adb shell 或者终端应用都可以

su

setprop persist.sys.notification_ver 2

#通知聚合
setprop persist.sys.notification_rank 6

#通知过滤(miui9的 在12上效果不好)
setprop persist.sys.notification_rank 3

killall com.miui.notification

刷入后出现部分系统应用名称显示不正常或打开闪退

删除/data/system/package_cache/下的文件夹(注意不是删除package_cache文件夹),然后重启


已知bug

Build Status

Use at your own risk!

Usage

Put MIUI 9 China Rom (OTA zip package) in the directory and double-click extract.bat (Windows) or run ./extract.sh (macOS and Linux) to generate the flashable zip.

Additionally, if you want to recover Chinese functions, e.g. bus card shortcut or quick payments for WeChat/Alipay in "App Vault" (i.e. the leftmost shortcut page on home screen), you can add an option --appvault: extract.bat --appvault (Windows) or ./extract.sh --appvault (macOS and Linux). An extra flashable zip file with prefix eufix-appvault will be generated.

Support Windows, Linux and macOS (10.10 or above). Windows version has all dependencies included. For macOS, you need Java 8 runtime. For Linux, you may need both Java 8 and Python 2.7. For example, you can install all dependencies using apt-get:

apt-get install -y openjdk-8-jre python2.7

Note:

Automatic builds for selected devices are available in releases.

Recover Chinese Functions

For users in China, you can also download the xiaomi.eu rom and run cleaner-fix.sh for creating a flashable zip with prefix eufix. It contains patches to

(Optional) Encryption for xiaomi.eu ROMs

It is recommended to enable encryption if you plan to use Mi Pay. Official MIUI roms (China or International) has encryption enabled by default. But xiaomi.eu roms remove encryption by default (check in "Settings-Privacy-Encryption"). Some early versions of EU roms have bootloop bugs when enabling encryption in Settings (Backup before trying!).

If your device cannot be encrypted normally in Settings, you can completely format /data/ partition and flash the additional zip file eufix-force-fbe-oreo.zip after flashing xiaomi.eu ROM.

Warning:

Credits

Disclaimer

This repository is provided with no warranty. Make sure you have legal access to MIUI Roms if using this repository. If any files of this repository violate your copyright, please contact me to remove them.

License

License: GPL v3