Các tập tin vá lỗi phải có cùng tên với apk đã chọn (đây là trường hợp nhạy cảm).
Nếu tập tin là một bản vá tùy chỉnh cho các ứng dụng đã tồn tại, bạn chỉ có thể thêm vào đầu của tên tập tin của bất kỳ văn bản và lưu lại .
Nếu bạn muốn viết viết 1 bản vá lỗi cho ứng dụng, thì vào dòng kết thúc của tên tập tin, bạn có thể sử dụng _%25ALL%25, cho ví dụ về tên của bản vá lỗi cho tất cả các bình chọn SVOX sẽ như thế này: com.svox.classic.langpack_%25ALL%25.txt. Trên _%25ALL%25 đã thay thế bởi 1 phần của gói cài đặt, thay đổi tùy thuộc vào ứng dụng.
Ký tự đặc biệt/định dạng tập tin vá lỗi.
Để tìm kiếm những mô hình của bytes để sử dụng IDA Pro 6.1. Nó có thể mở dalvik-cache, odex, những thư viện và classes.dex.
Nếu bạn muốn vá lỗi dalvik-cache hay odex, đừng quên rằng bytes của dữ liệu trong những phiên bản firmware khác có thể khác nhau. Và đừng quên bytes không phải là tất cả classes.dex trùng với dalvik-cache và odex. Trong trường hợp này, bạn có thể thấy, nếu bạn mở classes.dex và tập tin odex trong IDA Pro.
[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” – search allows you to search for a pattern and store bytes at specific positions.
{"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” – this is a pattern mask used to find the offset where the patch will be applied.
{"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.