├── .gitattributes ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── common ├── post-fs-data.sh ├── service.sh └── system.prop ├── config.sh ├── module.prop └── system └── app ├── Mipay └── Mipay.apk ├── NextPay ├── NextPay.apk └── lib │ └── arm64 │ ├── libentryexpro.so │ └── libuptsmaddonmi.so ├── TSMClient └── TSMClient.apk └── UPTsmService ├── UPTsmService.apk └── lib └── arm64 ├── libentryexpro.so ├── libuptsmaddonmi.so └── libuptsmservice.so /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have LF line endings on checkout. 2 | META-INF/** text eol=lf 3 | *.prop text eol=lf 4 | *.sh text eol=lf 5 | *.md text eol=lf 6 | 7 | # Denote all files that are truly binary and should not be modified. 8 | system/** binary 9 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | ########################################################################################## 3 | # 4 | # Magisk Module Template Install Script 5 | # by topjohnwu 6 | # 7 | ########################################################################################## 8 | 9 | TMPDIR=/dev/tmp 10 | INSTALLER=$TMPDIR/install 11 | # Always mount under tmp 12 | MOUNTPATH=$TMPDIR/magisk_img 13 | 14 | # Default permissions 15 | umask 022 16 | 17 | # Initial cleanup 18 | rm -rf $TMPDIR 2>/dev/null 19 | mkdir -p $INSTALLER 20 | 21 | # echo before loading util_functions 22 | ui_print() { echo "$1"; } 23 | 24 | require_new_magisk() { 25 | ui_print "*******************************" 26 | ui_print " Please install Magisk v17.0+! " 27 | ui_print "*******************************" 28 | exit 1 29 | } 30 | 31 | ########################################################################################## 32 | # Environment 33 | ########################################################################################## 34 | 35 | OUTFD=$2 36 | ZIP=$3 37 | 38 | mount /data 2>/dev/null 39 | 40 | # Load utility functions 41 | if [ -f /data/adb/magisk/util_functions.sh ]; then 42 | . /data/adb/magisk/util_functions.sh 43 | elif [ -f /data/magisk/util_functions.sh ]; then 44 | NVBASE=/data 45 | . /data/magisk/util_functions.sh 46 | else 47 | require_new_magisk 48 | fi 49 | 50 | # Use alternative image if in BOOTMODE 51 | $BOOTMODE && IMG=$NVBASE/magisk_merge.img 52 | 53 | # Preperation for flashable zips 54 | setup_flashable 55 | 56 | # Mount partitions 57 | mount_partitions 58 | 59 | # Detect version and architecture 60 | api_level_arch_detect 61 | 62 | # You can get the Android API version from $API, the CPU architecture from $ARCH 63 | # Useful if you are creating Android version / platform dependent mods 64 | 65 | # Setup busybox and binaries 66 | $BOOTMODE && boot_actions || recovery_actions 67 | 68 | ########################################################################################## 69 | # Preparation 70 | ########################################################################################## 71 | 72 | # Extract common files 73 | unzip -o "$ZIP" module.prop config.sh 'common/*' -d $INSTALLER >&2 74 | 75 | [ ! -f $INSTALLER/config.sh ] && abort "! Unable to extract zip file!" 76 | # Load configurations 77 | . $INSTALLER/config.sh 78 | 79 | # Check the installed magisk version 80 | MIN_VER=`grep_prop minMagisk $INSTALLER/module.prop` 81 | [ ! -z $MAGISK_VER_CODE -a $MAGISK_VER_CODE -ge $MIN_VER ] || require_new_magisk 82 | MODID=`grep_prop id $INSTALLER/module.prop` 83 | MODPATH=$MOUNTPATH/$MODID 84 | 85 | # Print mod name 86 | print_modname 87 | 88 | # Please leave this message in your flashable zip for credits :) 89 | ui_print "******************************" 90 | ui_print "Powered by Magisk (@topjohnwu)" 91 | ui_print "******************************" 92 | 93 | ########################################################################################## 94 | # Install 95 | ########################################################################################## 96 | 97 | # Get the variable reqSizeM. Use your own method to determine reqSizeM if needed 98 | request_zip_size_check "$ZIP" 99 | 100 | # This function will mount $IMG to $MOUNTPATH, and resize the image based on $reqSizeM 101 | mount_magisk_img 102 | 103 | # Create mod paths 104 | rm -rf $MODPATH 2>/dev/null 105 | mkdir -p $MODPATH 106 | 107 | # Extract files to system. Use your own method if needed 108 | ui_print "- Extracting module files" 109 | unzip -o "$ZIP" 'system/*' -d $MODPATH >&2 110 | 111 | # Remove placeholder 112 | rm -f $MODPATH/system/placeholder 2>/dev/null 113 | 114 | # Handle replace folders 115 | for TARGET in $REPLACE; do 116 | mktouch $MODPATH$TARGET/.replace 117 | done 118 | 119 | # Auto Mount 120 | $AUTOMOUNT && touch $MODPATH/auto_mount 121 | 122 | # prop files 123 | $PROPFILE && cp -af $INSTALLER/common/system.prop $MODPATH/system.prop 124 | 125 | # Module info 126 | cp -af $INSTALLER/module.prop $MODPATH/module.prop 127 | if $BOOTMODE; then 128 | # Update info for Magisk Manager 129 | mktouch /sbin/.core/img/$MODID/update 130 | cp -af $INSTALLER/module.prop /sbin/.core/img/$MODID/module.prop 131 | fi 132 | 133 | # post-fs-data mode scripts 134 | $POSTFSDATA && cp -af $INSTALLER/common/post-fs-data.sh $MODPATH/post-fs-data.sh 135 | 136 | # service mode scripts 137 | $LATESTARTSERVICE && cp -af $INSTALLER/common/service.sh $MODPATH/service.sh 138 | 139 | ui_print "- Setting permissions" 140 | set_permissions 141 | 142 | ########################################################################################## 143 | # Finalizing 144 | ########################################################################################## 145 | 146 | # Unmount magisk image and shrink if possible 147 | unmount_magisk_img 148 | 149 | $BOOTMODE || recovery_cleanup 150 | rm -rf $TMPDIR 151 | 152 | ui_print "- Done" 153 | exit 0 154 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Systemless MIUI Global MIPay Support (arm64)_eiarhabi 2 | 3 | A Magisk Module that enables MIUI global support by adding China Version Mi Pay files for MI 6. Based on Viso-TC's mod. 4 | Note: Only MI6 was tested. Possibly works on other Xiaomi devices but not guaranteed. 5 | -------------------------------------------------------------------------------- /common/post-fs-data.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in post-fs-data mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /common/service.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in late_start service mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /common/system.prop: -------------------------------------------------------------------------------- 1 | # This file will be read by resetprop 2 | # Example: Change dpi 3 | # ro.sf.lcd_density=320 4 | 5 | ro.se.type=eSE,HCE,UICC 6 | ro.build.fingerprint=Xiaomi/sagit/sagit:8.0.0/OPR1.170623.027/V9.2.3.0.OCAMIEK:user/release-keys 7 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # Magisk Module Template Config Script 4 | # by topjohnwu 5 | # 6 | ########################################################################################## 7 | ########################################################################################## 8 | # 9 | # Instructions: 10 | # 11 | # 1. Place your files into system folder (delete the placeholder file) 12 | # 2. Fill in your module's info into module.prop 13 | # 3. Configure the settings in this file (config.sh) 14 | # 4. If you need boot scripts, add them into common/post-fs-data.sh or common/service.sh 15 | # 5. Add your additional or modified system properties into common/system.prop 16 | # 17 | ########################################################################################## 18 | 19 | ########################################################################################## 20 | # Configs 21 | ########################################################################################## 22 | 23 | # Set to true if you need to enable Magic Mount 24 | # Most mods would like it to be enabled 25 | AUTOMOUNT=true 26 | 27 | # Set to true if you need to load system.prop 28 | PROPFILE=true 29 | 30 | # Set to true if you need post-fs-data script 31 | POSTFSDATA=false 32 | 33 | # Set to true if you need late_start service script 34 | LATESTARTSERVICE=false 35 | 36 | ########################################################################################## 37 | # Installation Message 38 | ########################################################################################## 39 | 40 | # Set what you want to show when installing your mod 41 | 42 | print_modname() { 43 | ui_print "*************************" 44 | ui_print " Mipay Systemless " 45 | ui_print "*************************" 46 | } 47 | 48 | ########################################################################################## 49 | # Replace list 50 | ########################################################################################## 51 | 52 | # List all directories you want to directly replace in the system 53 | # Check the documentations for more info about how Magic Mount works, and why you need this 54 | 55 | # This is an example 56 | REPLACE=" 57 | /system/app/Youtube 58 | /system/priv-app/SystemUI 59 | /system/priv-app/Settings 60 | /system/framework 61 | " 62 | 63 | # Construct your own list here, it will override the example above 64 | # !DO NOT! remove this if you don't need to replace anything, leave it empty as it is now 65 | REPLACE=" 66 | " 67 | 68 | ########################################################################################## 69 | # Permissions 70 | ########################################################################################## 71 | 72 | set_permissions() { 73 | # Only some special files require specific permissions 74 | # The default permissions should be good enough for most cases 75 | 76 | # Here are some examples for the set_perm functions: 77 | 78 | # set_perm_recursive (default: u:object_r:system_file:s0) 79 | # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 80 | 81 | # set_perm (default: u:object_r:system_file:s0) 82 | # set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0 83 | # set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0 84 | # set_perm $MODPATH/system/lib/libart.so 0 0 0644 85 | 86 | # The following is default permissions, DO NOT remove 87 | set_perm_recursive $MODPATH 0 0 0755 0644 88 | } 89 | 90 | ########################################################################################## 91 | # Custom Functions 92 | ########################################################################################## 93 | 94 | # This file (config.sh) will be sourced by the main flash script after util_functions.sh 95 | # If you need custom logic, please add them here as functions, and call these functions in 96 | # update-binary. Refrain from adding code directly into update-binary, as it will make it 97 | # difficult for you to migrate your modules to newer template versions. 98 | # Make update-binary as clean as possible, try to only do function calls in it. 99 | 100 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=MIPay_eiarhabi 2 | name=MIUI Global MIPay Support for MI6 3 | version=9.5.9 4 | versionCode=20190510 5 | author=eiarhabi 6 | description=Enable MIUI global support by adding China Version Mi Pay. Based on Viso-TC's mod. 7 | minMagisk=17000 8 | -------------------------------------------------------------------------------- /system/app/Mipay/Mipay.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/Mipay/Mipay.apk -------------------------------------------------------------------------------- /system/app/NextPay/NextPay.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/NextPay/NextPay.apk -------------------------------------------------------------------------------- /system/app/NextPay/lib/arm64/libentryexpro.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/NextPay/lib/arm64/libentryexpro.so -------------------------------------------------------------------------------- /system/app/NextPay/lib/arm64/libuptsmaddonmi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/NextPay/lib/arm64/libuptsmaddonmi.so -------------------------------------------------------------------------------- /system/app/TSMClient/TSMClient.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/TSMClient/TSMClient.apk -------------------------------------------------------------------------------- /system/app/UPTsmService/UPTsmService.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/UPTsmService/UPTsmService.apk -------------------------------------------------------------------------------- /system/app/UPTsmService/lib/arm64/libentryexpro.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/UPTsmService/lib/arm64/libentryexpro.so -------------------------------------------------------------------------------- /system/app/UPTsmService/lib/arm64/libuptsmaddonmi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/UPTsmService/lib/arm64/libuptsmaddonmi.so -------------------------------------------------------------------------------- /system/app/UPTsmService/lib/arm64/libuptsmservice.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eiarhabi/Mipay-MI6-Systemless/a65512f53fe7f6369604630afabca4432fa8704c/system/app/UPTsmService/lib/arm64/libuptsmservice.so --------------------------------------------------------------------------------