• Welcome Guest to the new PlayerSquared! Please be aware the site is a work in progress & we'd appreciate your help in letting us know which features from the old site we're currently missing as well as report any bugs you find via this thread here: Bugs/Missing Features
  • If this is your first visit You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Sign up today to get the latest PS4 GameSaves, Game Mods and much more!

How to Create a Patch File with APK Editor

SyrenRemix

Reverse Engineer
Staff
October 25, 2020
400
2,876
93
3,013
How to Create a Patch File with APK Editor

To create a patch file using APK Editor, follow these steps:

1. Open APK Editor and select the "Patch" option located in the top right corner.

2. Select the patch file you want to apply and click the "Apply Patch" option.

3. The patch is mainly composed of patch rules, and currently, APK Editor supports 8 patch rules: ADD_FILES, REMOVE_FILES, MATCH_REPLACE, MATCH_ASSIGN, MATCH_GOTO, GOTO, MERGE, EXECUTE_DEX, and DUMMY.

4. Each rule is made up of several configurations that start in a new line. Comment lines begin with "#" and do not affect the patch file.

5. The patch must be in a zip format; otherwise, it will not work and cause the app to crash.

6. Here are some examples of the patch rules:

- REMOVE_FILES: delete some files inside the APK
- ADD_FILES: add files from a source file to the target file inside the APK
- MATCH_REPLACE: remove lines in a specific file
- MERGE: merge resources and code from another APK

7. To use the REMOVE_FILES patch rule, specify the target files or directories to be removed:

[REMOVE_FILES]
TARGET:
res/values-ru
[/REMOVE_FILES]

8. To use the ADD_FILES patch rule, specify the source and target files and whether to extract the files:

[ADD_FILES]
SOURCE:
layout.zip
TARGET:
res/layout
EXTRACT:
true
[/ADD_FILES]

9. To use the MATCH_REPLACE patch rule, specify the target file, the line to match, whether to use regular expressions, and the replacement text:

[MATCH_REPLACE]
TARGET:
AndroidManifest.xml
MATCH:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
REGEX:
false
REPLACE:
[/MATCH_REPLACE]

10. To use the MERGE patch rule, specify the source ZIP file to be merged:

[MERGE]
SOURCE:
extra.zip
[/MERGE]

Note that the remaining patch rules, including MATCH_ASSIGN, MATCH_GOTO, GOTO, EXECUTE_DEX, and DUMMY, are more complex and may require more in-depth knowledge to use.
F**k The System Bootleg Anonymous - YouTube
 
Last edited: