-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpatch_example
83 lines (73 loc) · 1.68 KB
/
patch_example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Required minimal engine version
[MIN_ENGINE_VER]
1
# The author of this patch
[AUTHOR]
apkeditor
# For which package name
[PACKAGE]
*
# Add files to target path
# Be careful, as overwritten may happen if same file already exists
[ADD_FILES]
SOURCE:
layout.zip
TARGET:
res/layout
EXTRACT:
true
[/ADD_FILES]
[REMOVE_FILES]
TARGET:
res/values-xx
[/REMOVE_FILES]
# Replace matched content inside target file, be careful when REGEX=true
# All matched occurrences will be replaced
# If REGEX=true, MATCH content must be in one line
# Following example will delete internet permission
[MATCH_REPLACE]
TARGET:
AndroidManifest.xml
MATCH:
<uses-permission android:name="android.permission.INTERNET" />
REGEX:
false
REPLACE:
[/MATCH_REPLACE]
[MATCH_REPLACE]
TARGET:
smali/com/fingersoft/billing/util/IabHelper.smali
MATCH:
const/x v3
REGEX:
false
REPLACE:
const/x v3
xxxx
[/MATCH_REPLACE]
# Replace target function inside smali file
# Use it ONLY for smali files
[FUNCTION_REPLACE]
TARGET:
smali/com/fingersoft/billing/util/IabHelper.smali
FUNCTION:
fd
REPLACE:
fd
[/FUNCTION_REPLACE]
# 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
[MERGE]
SOURCE:
extra.zip
[/MERGE]
'{
"orderId":"GPA.1234-5678-9012-34567",
"packageName":"com.example.app",
"productId":"exampleSku",
"purchaseTime":1345678900000,
"purchaseState":0,
"developerPayload":"bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ",
"purchaseToken":"opaque-token-up-to-1000-characters"
}'