How to create apkeditor Patch file

In this blog I'll explain how to create apkeditor Patch files... πŸ˜‹
Patch Format



How to apply patch files...?
Open apkeditor and select patch option which is present in top right ccorner inside the apkeditor and then select patch file what you want to apply and click apply patch option and your done...
Enjoy....



Some very helpful patch files are here
Download and enjoy πŸ˜‹






Click here to download Collection of apkeditor patches







Check here I'll give some basic info to make patch files
A patch is mainly composed of patch rules. Currently, it supports 8 patch rules:

ADD_FILES, REMOVE_FILES, MATCH_REPLACE, MATCH_ASSIGN, MATCH_GOTO, GOTO,MERGE, EXECUTE_DEX,DUMMY

Inside a rule, each line starts with ‘#’ means that is a comment line. And, each configuration starts in a new line.
Please take following illustrations and examples to see how to create patch.txt

And must zip  patch file...

1)Remove files 

By this patch file we can delete some files inside the apk and it is very simple to make this patch rule see below some examples I'll write

Ex1)

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

Ex2)

[REMOVE_FILES]
TARGET:
    res/raw-en
    res/raw-ar
res/values/strings.xml
[/REMOVE_FILES]

2)adding files

[ADD_FILES]

SOURCE:

    layout.zip

TARGET:

    res/layout

EXTRACT:

    true

[/ADD_FILES]


Ex1)

[ADD_FILES]
SOURCE:
    SplashActivity.smali
TARGET:
   smali/SplashActivity.smali
[/ADD_FILES]


Sorry ex1 needs extra stuff but at least i tried to explain here... Unzip some patch files then you get clear idea about them

3)[MATCH_REPLACE]

Ex1)

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



Through the above example we can remove lines in AndroidManifest.xml 
If you want to remove more then you can add like the below example. Let t me show another example 

Ex2)
[PACKAGE]
*
[MATCH_REPLACE]
TARGET:
 AndroidManifest.xml
MATCH:
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
REGEX:
false
REPLACE:
[/MATCH_REPLACE]
[MATCH_REPLACE]
TARGET:
 AndroidManifest.xml
MATCH:
 <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
REGEX:
false
REPLACE:
[/MATCH_REPLACE]
[MATCH_REPLACE]
TARGET:
 AndroidManifest.xml
MATCH:
 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
REGEX:
false
REPLACE:
[/MATCH_REPLACE]




I think you Understand this cool πŸ™ƒ



4)MERGE 

# MERGE is designed to merge resources and code from other apk

#

# Merge resources and smali files inside extra.zip

# res/values/public.xml must be provided inside extra.zip

# The patch engine will try to refactor all the added ids

# The added ids should be different with current existing ids


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

OK R remaining are very complicated to explain if you still want to learn them then comment below... If i found many requests then I'll try to explain in detail.... Because it's takes lot's of time to explainπŸ™ƒ

Because remaining are very important and at the same time it is very difficult to understand and explain too.... 





Comments

  1. yeash, please... take your time and EXPLAIN this beauty beast to us 😁

    waiting for your next patch tutorial

    ReplyDelete
  2. What does REGEX means please tell

    ReplyDelete

Post a Comment

latest

Tools Updated

MT manager introduction & how to use it

Unlock Vip or Premium in an app

Remove Ad's in an App