باشد که کوچک و بزرگ بودن حروف در آن اهمیت دارندAPK فایل پچ باید هم اسم فایل .
اگر پچ شخصی برای برنامه کنونی وجود داره, میتوانیدآن را به ابتدای اسم فایل اضافه کنید.
اگر مایل به نوشتن یک پچ برای اعمال به چند برنامه هستید به اخر اسم پچ شخصی این عبارت را وارد کنید: _%25ALL%25. از کاراکترها و یا فرمتهای خاص در پچ استفاده نکنید و فقط از یک فاصله استفاده کنید
classes.dex , libraries ,odex,dalvik-cache استفاده کنید که قابلیت باز کردن این فایلها را دارد
Dalvik-cache, odex : هستید به یاد داشته باشید که بایت های اطلاعات در فیرمورهای مختلف و این فایلها متفاوت است odex یا dalvik-cache اگر مایل به پچ کردن

[BEGIN]
<patch comments that are visible to the user pre-patch>
Patch for XYZ Pro 5.0.5

[PACKAGE]
<unpacks classes.dex and applies all the patches from the [CLASSES] to him. And generates, based on the modified classes.dex, odex-file.>

[CLASSES]
<pattern search/replace for classes.dex (see below)>
{"search":"63 R00 R01 R02 38 00 04 00 12 10 0F 00"}
{"original":"63 ?? ?? ?? 38 00 04 00 12 10 0F 00"}
{"replaced":"12 00 6A W00 W01 W02 00 00 12 00 0F 00"}

[LIB]
<pattern search/replace for named native libraries (see below)>
{"name":"libtitanium.so"}
{"original":"00 ** 50 e2"}
{"replaced":"00 00 50 e1"}

[OTHER FILES]
<pattern search/replace for named other files in /data/data/Package_Target_APK/ (see below)>
{"name":"/files/shell.dex"}
{"original":"0F 00 00 00 1A 00 00 00 0F 00 00 00 59 00 00 00 2F"}
{"replaced":"0F 00 00 00 0F 00 00 00 0F 00 00 00 59 00 00 00 2F"}

[ADD-BOOT]
<automatically adds the current user patch to BootList. Should be used in the patch library (or in the patch [CLASSES] without [ODEX] or without [PACKAGE])>

[END]
<patch comments that are visible to the user post-patch>
Congratulations! Program cracked!

” – قابلیت سرچ در پترنهای مختلف و دخیره انها در بایت” – جستجو.
{"search":"63 R00 R01 R02 38 00 04 00 12 10 0F 00"}
In this example the bytes in green make up your pattern mask, while bytes in yellow labeled R00 -> R02 will be stored.
Stored bytes must be in order R00, R01, R02, R03…
Stored bytes cannot be repeated.

” – این ماسک پترنی است که برای پیدا کردن مکان اعمال شدن پچ استفا” – اصلی.
{"original":"63 ?? ?? ?? 38 00 04 00 12 10 0F 00"}
In this example the bytes in green make up your pattern mask, while bytes in yellow are wildcards (??, **)
“replaced” – this will follow an “original” statement, this is what the offset will be overwritten with.
{"replaced":"12 00 6A W00 W01 W02 00 00 12 00 0F 00"}
In this example, bytes in green will overwrite the target location.. bytes in yellow are stored bytes from the previously executed “search”
“name” – this is used to target a specific library by name (see above in [LIB])

[LIB-ARMEABI],[LIB-ARMEABI-V7A],[LIB-MIPS] or [LIB-X86] - for Libraries from /lib/armeabi/, /lib/armeabi-v7a/, /lib/mips/, /lib/x86/.

[ODEX-PATCH] - Uses for the patch has already been created odex. For example, an application has been patched with the automatic mode by Remove License Verification, but you need to make additional changes by using a Custom Patch. If we use a simple [PACKAGE]-[CLASSES], [ODEX] or [CLASSES]-[ODEX], odex-file will be created with no change and only then patched.
Example:

[BEGIN]
[ODEX-PATCH]
{"original":"63 ?? ?? ?? 38 00 04 00 12 10 0F 00"}
{"replaced":"12 00 6A ?? ?? ?? 00 00 12 00 0F 00"}
[END]
Congratulations! ODEX modified!

[CLASSES] without [PACKAGE] - Patches dalvik-cache applications. Do not forget that the system periodically updates dalvik-cache applications and all the changes of it disappear. Therefore, we must add then [ADD-BOOT]. Patch for dalvik-cache outdated, as unreliable. But he needed for the ROM Toolbox, as he found odex-file and behave hysterically.
Example:

[BEGIN]
[CLASSES]
{"original":"63 ?? ?? ?? 38 00 04 00 12 10 0F 00"}
{"replaced":"12 00 6A ?? ?? ?? 00 00 12 00 0F 00"}
[ADD-BOOT]
[END]
Congratulations!

[ODEX] - Copy dalvik-cache in /data/app/ and rename to odex-file, then all the patches applied to this odex-file. Checksums of the odex wrong, can not pass inspection, unlike odex-file created [PACKAGE] - [CLASSES].
Example:

[BEGIN]
[ODEX]
{"original":"63 ?? ?? ?? 38 00 04 00 12 10 0F 00"}
{"replaced":"12 00 6A ?? ?? ?? 00 00 12 00 0F 00"}
[END]
Congratulations!

[CLASSES]-[ODEX] - Patches dalvik-cache and then сopy dalvik-cache in /data/app/ and rename to odex-file. Checksums of the odex and of the dalvik-cache is wrong, can not pass inspection, unlike odex-file created [PACKAGE] - [CLASSES].
Example:

[BEGIN]
[CLASSES]
{"original":"63 ?? ?? ?? 38 00 04 00 12 10 0F 00"}
{"replaced":"12 00 6A ?? ?? ?? 00 00 12 00 0F 00"}
[ODEX]
[END]
Congratulations!

[SQLITE] - Sometimes the target application must change something in the database, then to help will come this possibility:
Example:

[BEGIN]
Trial Reset
[SQLITE]
{"database":"/data/data/com.package.megaapp/databases/settings.db"}
{"execute":"DELETE FROM table_settings WHERE name = 'SETTING__LIC'"}
{"execute":"UPDATE table_settings SET UsedDays=0 WHERE name='Trial_set'"}
[END]
Congratulations! You have new Trial Period!

database - path to database on Device.
execute - SQLite query.