Xpatch is a jar tool which is used to repackage the apk file. Then, the new apk can load any Xposed modules installed in the android system.
This is a way to use Xposed modules without root your device.
It is easy way to modify one app using xposed module. And any apps changed by Xpatch can load every modules downloaded in the Xposed Module Repository.
- Use xposed modules without your device;
- Modify any apps without root your device.
- Download the latest jar file from the release page;
- Run this command in the Windows/Mac console:
$ java -jar ../../xpatch.jar ../../source.apk
Then, a new apk named source-xposed-signed.apk
in the same folder as source.apk
.
- You can specify the output apk path by add
-o
parameter, eg:
$ java -jar ../../xpatch.jar ../../source.apk -o ../../dst.apk
- Show all the building new apk logs, just add
-l
, eg:
$ java -jar ../../xpatch.jar ../../source.apk -l
- Not delete the build files, just add
-k
, eg:
$ java -jar ../../xpatch.jar ../../source.apk -k
- After the version 1.2, craching app signature verifying is added, if you won't need the function, just add '-c', eg:
$ java -jar ../../xpatch.jar ../../source.apk -c
- More command details can be found when no parameter is added, eg:
$ java -jar ../../xpatch.jar
When the new apk is installed in the device, It will load all the Xposed modules installed in the device when it's process started.
But you can manage the installed Xposed modules on/off state by a file in the storage.
The file path is mnt/sdcard/xposed_config/modules.list
.
When the new app started, it will search all the installed Xposed modules and write the the module app name and the module application name into this file. (mnt/sdcard/xposed_config/modules.list
)
eg:
com.blanke.mdwechat#MDWechat
liubaoyua.customtext#文本自定义
Each line of this file is Application Name#App Name.
You can disable a Xposed module by add #
before the Application Name, eg:
#com.blanke.mdwechat#MDWechat
liubaoyua.customtext#文本自定义
This means the MDWechat Xposed module is disabled.
#com.blanke.mdwechat#MDWechat
#liubaoyua.customtext#文本自定义
This means all Xposed modules are disabled.
Note: The target app must have file system access permission. Otherwise this file will not be created, and all xposed modules are enabled.
- Support packaging the xposed modules into the source apk;
- Support loading so library in the xposed modules;
- Crach apk protections.
- If the apk dex files are protected, dex2jar can not effect on the dexs, then this tool will not work;
- The hook framework is using whale; this framework is not very stable, some hooks may fail;
- Do not support Davlik VM;
- Do not support resource hook;
You can discuss with me under this page. Xpatch Comments