forked from gkd-kit/subscription
-
Notifications
You must be signed in to change notification settings - Fork 0
/
com.miui.packageinstaller.ts
189 lines (183 loc) · 6.65 KB
/
com.miui.packageinstaller.ts
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
import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.miui.packageinstaller',
name: '应用包管理组件',
groups: [
{
enable: false,
key: 9,
name: '自动第三方安装应用',
desc: '自动允许第三方应用调用安装,安装应用',
rules: [
{
key: 0,
activityIds: [],
matches:
'TextView[text*="尝试安装应用"] < LinearLayout +2n LinearLayout > Button[text="继续"]',
snapshotUrls: 'https://i.gkd.li/import/12874746',
},
{
key: 1,
activityIds: [
'com.miui.packageInstaller.ui.InstallPrepareAlertActivity',
'com.miui.packageInstaller.NewInstallerPrepareActivity',
],
matches: '@[text="允许"] + [text="禁止"]',
snapshotUrls: [
'https://i.gkd.li/import/13054478',
'https://i.gkd.li/import/13399425',
],
},
],
},
{
enable: false,
key: 10,
name: '自动安装应用',
desc: '启用后安装高风险应用将自动完成,请自行评估风险决定是否启用',
rules: [
// 正常安装
{
key: 0,
name: '点击【继续安装】',
activityIds: [
'com.miui.packageInstaller.ui.InstallPrepareAlertActivity',
'com.miui.packageInstaller.NewInstallerPrepareActivity',
],
matches:
'[text="取消安装"] < LinearLayout - @FrameLayout > LinearLayout > [text="继续安装"]',
snapshotUrls: [
'https://i.gkd.li/import/12818034',
'https://i.gkd.li/import/12818054',
],
},
{
key: 1,
name: '点击【继续安装】',
activityIds: 'com.miui.packageInstaller.NewInstallerPrepareActivity',
matches: '@[text="继续安装"] + [text="取消安装"]',
snapshotUrls: 'https://i.gkd.li/import/12889120',
},
// 需勾选【已了解此应用未经安全检测】才能继续安装
{
key: 2,
name: '勾选【已了解此应用未经安全检测】',
activityIds: 'com.miui.packageInstaller.NewInstallerPrepareActivity',
matches:
'[id="com.miui.packageinstaller:id/install_checked"][checked=false]',
snapshotUrls: [
'https://i.gkd.li/import/12888410', // 未勾选
'https://i.gkd.li/import/12889120', // 已勾选
],
},
// 需勾选【已了解此应用存在高风险】才能继续安装
{
key: 3,
name: '点击【了解风险】',
activityIds: 'com.miui.packageInstaller.NewInstallerPrepareActivity',
matches: '@[text="了解风险"] + [text="取消安装"]',
snapshotUrls: 'https://i.gkd.li/import/12889135',
},
{
preKeys: 3,
key: 4,
name: '勾选【已了解此应用存在高风险】',
activityIds: 'com.miui.packageInstaller.NewInstallerPrepareActivity',
matches:
'[id="com.miui.packageinstaller:id/install_checked"][checked=false]',
snapshotUrls: [
'https://i.gkd.li/import/12889137', // 未勾选
'https://i.gkd.li/import/12889148', // 已勾选
],
},
{
preKeys: 4,
key: 5,
name: '点击【仍然安装】',
activityIds: 'com.miui.packageInstaller.NewInstallerPrepareActivity',
matches: '@[text="仍然安装"] + [text="取消安装"]',
snapshotUrls: 'https://i.gkd.li/import/12889148',
},
// 安装完成
{
key: 6,
name: '点击【完成】',
activityIds: [
'com.miui.packageInstaller.ui.normalmode.InstallProgressActivity',
'com.miui.packageInstaller.InstallProgressActivity',
'com.miui.packageInstaller.ui.securemode.PureInstallProgressActivity',
],
matches:
'[id="com.miui.packageinstaller:id/done_layout"] > [text="完成"]',
snapshotUrls: [
'https://i.gkd.li/import/12818044', // com.miui.packageInstaller.ui.normalmode.InstallProgressActivity
'https://i.gkd.li/import/13229404', // com.miui.packageInstaller.InstallProgressActivity
'https://i.gkd.li/import/13501872', // com.miui.packageInstaller.ui.securemode.PureInstallProgressActivity
],
},
],
},
{
enable: false,
key: 11,
name: '自动更新应用',
rules: [
// 正常更新
{
key: 0,
name: '点击【继续更新】',
activityIds: [
'com.miui.packageInstaller.ui.InstallPrepareAlertActivity',
'com.miui.packageInstaller.NewInstallerPrepareActivity',
],
matches:
'[text="取消更新"] < LinearLayout - @FrameLayout > LinearLayout > [text="继续更新"]',
snapshotUrls: [
'https://i.gkd.li/import/12817988',
'https://i.gkd.li/import/12910080',
],
},
{
key: 1,
name: '点击【继续更新】',
activityIds: 'com.miui.packageInstaller.NewInstallerPrepareActivity',
matches: '@[text="继续更新"] + [text="取消更新"]',
snapshotUrls: [
'https://i.gkd.li/import/13024731',
'https://i.gkd.li/import/13038465',
],
},
// 需勾选【已了解此安装包未经安全检测】才能继续更新
{
key: 2,
name: '勾选【已了解此安装包未经安全检测】',
activityIds: [
'com.miui.packageInstaller.ui.InstallPrepareAlertActivity',
'com.miui.packageInstaller.NewInstallerPrepareActivity',
],
matches:
'[id="com.miui.packageinstaller:id/install_checked"][checked=false][text="已了解此安装包未经安全检测"]',
snapshotUrls: [
'https://i.gkd.li/import/13024730', // 未勾选
'https://i.gkd.li/import/13024731', // 已勾选
],
},
// 更新完成
{
key: 3,
name: '点击【完成】',
activityIds: [
'com.miui.packageInstaller.ui.normalmode.InstallProgressActivity',
'com.miui.packageInstaller.InstallProgressActivity',
],
matches:
'[id="com.miui.packageinstaller:id/done_layout"] > [text="完成"]',
snapshotUrls: [
'https://i.gkd.li/import/12817999',
'https://i.gkd.li/import/13255733',
],
},
],
},
],
});