-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.go
295 lines (265 loc) · 21.3 KB
/
manifest.go
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
package goandroid
import (
"encoding/xml"
)
type Manifest struct {
XMLName xml.Name `xml:"manifest"`
Package string `xml:"package,attr"`
SharedUserId string `xml:"http://schemas.android.com/apk/res/android sharedUserId,attr,omitempty"`
SharedUserLabel string `xml:"http://schemas.android.com/apk/res/android sharedUserLabel,attr,omitempty"`
VersionCode string `xml:"http://schemas.android.com/apk/res/android versionCode,attr"`
VersionName string `xml:"http://schemas.android.com/apk/res/android versionName,attr"`
InstallLocation string `xml:"http://schemas.android.com/apk/res/android installLocation,attr,omitempty"`
UsesFeatures []UsesFeature `xml:"uses-feature,omitempty"`
SupportsScreens []SupportsScreens `xml:"supports-screens,omitempty"`
CompatibleScreens []CompatibleScreens `xml:"compatible-screensm,omitempty"`
SupportGlTexture []SupportGlTexture `xml:"supports-gl-texture,omitempty"`
Application Application `xml:"application"`
Instrumentation []Instrumentation `xml:"instrumentation,omitempty"`
Permissions []Permission `xml:"permission,omitempty"`
PermissionGroup []PermissionGroup `xml:"permission-group,omitempty"`
PermissionTree []PermissionTree `xml:"permission-tree,omitempty"`
UsesConfiguration []UsesConfiguration `xml:"uses-configuration,omitempty"`
UsePermissions []UsePermission `xml:"uses-permission,omitempty"`
UsesSdk UsesSdk `xml:"uses-sdk"`
}
type UsePermission struct {
Name string `xml:"http://schemas.android.com/apk/res/android name,attr"`
}
type Permission struct {
Description string `xml:"http://schemas.android.com/apk/res/android description,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr"`
PermissionGroup string `xml:"http://schemas.android.com/apk/res/android permissionGroup,attr,omitempty"`
ProtectionLevel string `xml:"http://schemas.android.com/apk/res/android protectionLevel,attr,omitempty"`
}
type PermissionTree struct {
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr"`
}
type PermissionGroup struct {
Description string `xml:"http://schemas.android.com/apk/res/android description,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr"`
}
type Instrumentation struct {
FunctionalTest string `xml:"http://schemas.android.com/apk/res/android functionalTest,attr,omitempty"`
HandleProfiling string `xml:"http://schemas.android.com/apk/res/android handleProfiling,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr"`
TargetPackage string `xml:"http://schemas.android.com/apk/res/android targetPackage,attr,omitempty"`
}
type UsesSdk struct {
MaxSdkVersion string `xml:"http://schemas.android.com/apk/res/android maxSdkVersion,attr,omitempty"`
MinSdkVersion string `xml:"http://schemas.android.com/apk/res/android minSdkVersion,attr,omitempty"`
TargetSdkVersion string `xml:"http://schemas.android.com/apk/res/android targetSdkVersion,attr,omitempty"`
}
type UsesConfiguration struct {
Resizeable string `xml:"http://schemas.android.com/apk/res/android resizeable,attr,omitempty"`
SmallScreens string `xml:"http://schemas.android.com/apk/res/android smallScreens,attr,omitempty"`
NormalScreens string `xml:"http://schemas.android.com/apk/res/android normalScreens,attr,omitempty"`
LargeScreens string `xml:"http://schemas.android.com/apk/res/android largeScreens,attr,omitempty"`
XlargeScreens string `xml:"http://schemas.android.com/apk/res/android xlargeScreens,attr,omitempty"`
AnyDensity string `xml:"http://schemas.android.com/apk/res/android anyDensity,attr,omitempty"`
RequiresSmallestWidthDp string `xml:"http://schemas.android.com/apk/res/android requiresSmallestWidthDp,attr,omitempty"`
CompatibleWidthLimitDp string `xml:"http://schemas.android.com/apk/res/android compatibleWidthLimitDp,attr,omitempty"`
LargestWidthLimitDp string `xml:"http://schemas.android.com/apk/res/android largestWidthLimitDp,attr,omitempty"`
}
type UsesFeature struct {
GlEsVersion string `xml:"http://schemas.android.com/apk/res/android glEsVersion,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Required string `xml:"http://schemas.android.com/apk/res/android required,attr,omitempty"`
}
type SupportsScreens struct {
Resizeable string `xml:"http://schemas.android.com/apk/res/android resizeable,attr,omitempty"`
SmallScreens string `xml:"http://schemas.android.com/apk/res/android smallScreens,attr,omitempty"`
NormalScreens string `xml:"http://schemas.android.com/apk/res/android normalScreens,attr,omitempty"`
LargeScreens string `xml:"http://schemas.android.com/apk/res/android largeScreens,attr,omitempty"`
XlargeScreens string `xml:"http://schemas.android.com/apk/res/android xlargeScreens,attr,omitempty"`
AnyDensity string `xml:"http://schemas.android.com/apk/res/android anyDensity,attr,omitempty"`
RequiresSmallestWidthDp string `xml:"http://schemas.android.com/apk/res/android requiresSmallestWidthDp,attr,omitempty"`
CompatibleWidthLimitDp string `xml:"http://schemas.android.com/apk/res/android compatibleWidthLimitDp,attr,omitempty"`
LargestWidthLimitDp string `xml:"http://schemas.android.com/apk/res/android largestWidthLimitDp,attr,omitempty"`
}
type CompatibleScreens struct {
screen Screen `xml:"screen,omitempty"`
}
type Screen struct {
screenSize string `xml:"http://schemas.android.com/apk/res/android screenSize,attr,omitempty"`
screenDensity string `xml:"http://schemas.android.com/apk/res/android screenDensity,attr,omitempty"`
}
type SupportGlTexture struct {
name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
}
type Application struct {
AllowBackup string `xml:"http://schemas.android.com/apk/res/android allowBackup,attr,omitempty"`
AllowClearUserData string `xml:"http://schemas.android.com/apk/res/android allowClearUserData,attr,omitempty"`
AllowTaskReparenting string `xml:"http://schemas.android.com/apk/res/android allowTaskReparenting,attr,omitempty"`
BackupAgent string `xml:"http://schemas.android.com/apk/res/android backupAgent,attr,omitempty"`
Debuggable string `xml:"http://schemas.android.com/apk/res/android debuggable,attr,omitempty"`
Description string `xml:"http://schemas.android.com/apk/res/android description,attr,omitempty"`
Enabled string `xml:"http://schemas.android.com/apk/res/android enabled,attr,omitempty"`
HardwareAccelerated string `xml:"http://schemas.android.com/apk/res/android hardwareAccelerated,attr,omitempty"`
HasCode string `xml:"http://schemas.android.com/apk/res/android hasCode,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
KillAfterRestore string `xml:"http://schemas.android.com/apk/res/android killAfterRestore,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
LargeHeap string `xml:"http://schemas.android.com/apk/res/android largeHeap,attr,omitempty"`
Logo string `xml:"http://schemas.android.com/apk/res/android logo,attr,omitempty"`
ManageSpaceActivity string `xml:"http://schemas.android.com/apk/res/android manageSpaceActivity,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
Persistent string `xml:"http://schemas.android.com/apk/res/android persistent,attr,omitempty"`
Process string `xml:"http://schemas.android.com/apk/res/android process,attr,omitempty"`
RestoreAnyVersion string `xml:"http://schemas.android.com/apk/res/android restoreAnyVersion,attr,omitempty"`
RestoreNeedsApplication string `xml:"http://schemas.android.com/apk/res/android restoreNeedsApplication,attr,omitempty"`
SupportsRtl string `xml:"http://schemas.android.com/apk/res/android supportsRtl,attr,omitempty"`
TaskAffinity string `xml:"http://schemas.android.com/apk/res/android taskAffinity,attr,omitempty"`
TestOnly string `xml:"http://schemas.android.com/apk/res/android testOnly,attr,omitempty"`
Theme string `xml:"http://schemas.android.com/apk/res/android theme,attr,omitempty"`
UiOptions string `xml:"http://schemas.android.com/apk/res/android uiOptions,attr,omitempty"`
VmSafeMode string `xml:"http://schemas.android.com/apk/res/android vmSafeMode,attr,omitempty"`
Activities []Activity `xml:"activity,omitempty"`
ActivityAlias []ActivityAlias `xml:"activity-alias,omitempty"`
Service []Service `xml:"service,omitempty"`
Receiver []Receiver `xml:"receiver,omitempty"`
Providers []Provider `xml:"provider,omitempty"`
UsesLibrary []UsesLibrary `xml:"uses-library,omitempty"`
MetaData []MetaData `xml:"meta-data,omitempty"`
}
type Activity struct {
AllowTaskReparenting string `xml:"http://schemas.android.com/apk/res/android allowTaskReparenting,attr,omitempty"`
AlwaysRetainTaskState string `xml:"http://schemas.android.com/apk/res/android alwaysRetainTaskState,attr,omitempty"`
ClearTaskOnLaunch string `xml:"http://schemas.android.com/apk/res/android clearTaskOnLaunch,attr,omitempty"`
ConfigChanges string `xml:"http://schemas.android.com/apk/res/android configChanges,attr,omitempty"`
Description string `xml:"http://schemas.android.com/apk/res/android description,attr,omitempty"`
Enabled string `xml:"http://schemas.android.com/apk/res/android enabled,attr,omitempty"`
ExcludeFromRecents string `xml:"http://schemas.android.com/apk/res/android excludeFromRecents,attr,omitempty"`
Exported string `xml:"http://schemas.android.com/apk/res/android exported,attr,omitempty"`
FinishOnCloseSystemDialogs string `xml:"http://schemas.android.com/apk/res/android finishOnCloseSystemDialogs,attr,omitempty"`
FinishOnTaskLaunch string `xml:"http://schemas.android.com/apk/res/android finishOnTaskLaunch,attr,omitempty"`
HardwareAccelerated string `xml:"http://schemas.android.com/apk/res/android hardwareAccelerated,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Immersive string `xml:"http://schemas.android.com/apk/res/android immersive,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
LaunchMode string `xml:"http://schemas.android.com/apk/res/android launchMode,attr,omitempty"`
Logo string `xml:"http://schemas.android.com/apk/res/android logo,attr,omitempty"`
Multiprocess string `xml:"http://schemas.android.com/apk/res/android multiprocess,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
NoHistory string `xml:"http://schemas.android.com/apk/res/android noHistory,attr,omitempty"`
ParentActivityName string `xml:"http://schemas.android.com/apk/res/android parentActivityName,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
Process string `xml:"http://schemas.android.com/apk/res/android process,attr,omitempty"`
ScreenOrientation string `xml:"http://schemas.android.com/apk/res/android screenOrientation,attr,omitempty"`
ShowOnLockScreen string `xml:"http://schemas.android.com/apk/res/android showOnLockScreen,attr,omitempty"`
SingleUser string `xml:"http://schemas.android.com/apk/res/android singleUser,attr,omitempty"`
StateNotNeeded string `xml:"http://schemas.android.com/apk/res/android stateNotNeeded,attr,omitempty"`
TaskAffinity string `xml:"http://schemas.android.com/apk/res/android taskAffinity,attr,omitempty"`
Theme string `xml:"http://schemas.android.com/apk/res/android theme,attr,omitempty"`
UiOptions string `xml:"http://schemas.android.com/apk/res/android uiOptions,attr,omitempty"`
WindowSoftInputMode string `xml:"http://schemas.android.com/apk/res/android windowSoftInputMode,attr,omitempty"`
IntentFilters []IntentFilter `xml:"intent-filter,omitempty"`
MetaDatas []MetaData `xml:"meta-data,omitempty"`
}
type ActivityAlias struct {
Enabled string `xml:"http://schemas.android.com/apk/res/android enabled,attr,omitempty"`
Exported string `xml:"http://schemas.android.com/apk/res/android exported,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
TargetActivity string `xml:"http://schemas.android.com/apk/res/android targetActivity,attr,omitempty"`
IntentFilters []IntentFilter `xml:"intent-filter,omitempty"`
MetaDatas []MetaData `xml:"meta-data,omitempty"`
}
type Service struct {
Enabled string `xml:"http://schemas.android.com/apk/res/android enabled,attr,omitempty"`
Exported string `xml:"http://schemas.android.com/apk/res/android exported,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
IsolatedProcess string `xml:"http://schemas.android.com/apk/res/android isolatedProcess,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
Process string `xml:"http://schemas.android.com/apk/res/android process,attr,omitempty"`
IntentFilters []IntentFilter `xml:"intent-filter,omitempty"`
MetaDatas []MetaData `xml:"meta-data,omitempty"`
}
type Receiver struct {
Enabled string `xml:"http://schemas.android.com/apk/res/android enabled,attr,omitempty"`
Exported string `xml:"http://schemas.android.com/apk/res/android exported,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
Process string `xml:"http://schemas.android.com/apk/res/android process,attr,omitempty"`
IntentFilters []IntentFilter `xml:"intent-filter,omitempty"`
MetaDatas []MetaData `xml:"meta-data,omitempty"`
}
type Provider struct {
Authorities string `xml:"http://schemas.android.com/apk/res/android authorities,attr,omitempty"`
Enabled string `xml:"http://schemas.android.com/apk/res/android enabled,attr,omitempty"`
Exported string `xml:"http://schemas.android.com/apk/res/android exported,attr,omitempty"`
GrantUriPermissions string `xml:"http://schemas.android.com/apk/res/android grantUriPermissions,attr,omitempty"`
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
InitOrder string `xml:"http://schemas.android.com/apk/res/android initOrder,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Multiprocess string `xml:"http://schemas.android.com/apk/res/android multiprocess,attr,omitempty"`
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
Process string `xml:"http://schemas.android.com/apk/res/android process,attr,omitempty"`
ReadPermission string `xml:"http://schemas.android.com/apk/res/android readPermission,attr,omitempty"`
Syncable string `xml:"http://schemas.android.com/apk/res/android syncable,attr,omitempty"`
WritePermission string `xml:"http://schemas.android.com/apk/res/android writePermission,attr,omitempty"`
MetaDatas *MetaData `xml:"meta-data,omitempty,omitempty"`
GrantUriPermission *GrantUriPermission `xml:"grant-uri-permission,omitempty"`
PathPermission *PathPermission `xml:"path-permission,omitempty"`
}
type UsesLibrary struct {
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Required string `xml:"http://schemas.android.com/apk/res/android required,attr,omitempty"`
}
type IntentFilter struct {
Icon string `xml:"http://schemas.android.com/apk/res/android icon,attr,omitempty"`
Label string `xml:"http://schemas.android.com/apk/res/android label,attr,omitempty"`
Priority string `xml:"http://schemas.android.com/apk/res/android priority,attr,omitempty"`
Action []Action `xml:"action"`
Category *Category `xml:"category,omitempty"`
Data []Data `xml:"data,omitempty"`
}
type Action struct {
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
}
type Category struct {
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
}
type Data struct {
Host string `xml:"http://schemas.android.com/apk/res/android host,attr,omitempty"`
MimeType string `xml:"http://schemas.android.com/apk/res/android mimeType,attr,omitempty"`
Path string `xml:"http://schemas.android.com/apk/res/android path,attr,omitempty"`
PathPattern string `xml:"http://schemas.android.com/apk/res/android pathPattern,attr,omitempty"`
PathPrefix string `xml:"http://schemas.android.com/apk/res/android pathPrefix,attr,omitempty"`
Port string `xml:"http://schemas.android.com/apk/res/android port,attr,omitempty"`
Scheme string `xml:"http://schemas.android.com/apk/res/android scheme,attr,omitempty"`
}
type GrantUriPermission struct {
Path string `xml:"http://schemas.android.com/apk/res/android path,attr,omitempty"`
PathPattern string `xml:"http://schemas.android.com/apk/res/android pathPattern,attr,omitempty"`
PathPrefix string `xml:"http://schemas.android.com/apk/res/android pathPrefix,attr,omitempty"`
}
type PathPermission struct {
Path string `xml:"http://schemas.android.com/apk/res/android path,attr,omitempty"`
PathPattern string `xml:"http://schemas.android.com/apk/res/android pathPattern,attr,omitempty"`
PathPrefix string `xml:"http://schemas.android.com/apk/res/android pathPrefix,attr,omitempty"`
Permission string `xml:"http://schemas.android.com/apk/res/android permission,attr,omitempty"`
ReadPermission string `xml:"http://schemas.android.com/apk/res/android readPermission,attr,omitempty"`
WritePermission string `xml:"http://schemas.android.com/apk/res/android writePermission,attr,omitempty"`
}
type MetaData struct {
Name string `xml:"http://schemas.android.com/apk/res/android name,attr,omitempty"`
Resource string `xml:"http://schemas.android.com/apk/res/android resource,attr,omitempty"`
Value string `xml:"http://schemas.android.com/apk/res/android value,attr,omitempty"`
}