blob: 10f6c79762964357f3ef92d1bf08c96a6978cd65 [file] [log] [blame]
Tao Baod2f2ad62018-03-23 23:24:25 -07001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15cc_defaults {
16 name: "recovery_defaults",
17
18 cflags: [
Tao Bao818f9382018-08-06 15:52:24 -070019 "-D_FILE_OFFSET_BITS=64",
20
21 // Must be the same as RECOVERY_API_VERSION.
22 "-DRECOVERY_API_VERSION=3",
23
Tao Baod2f2ad62018-03-23 23:24:25 -070024 "-Wall",
25 "-Werror",
26 ],
27}
28
Tao Bao5fc72a12018-08-07 14:38:51 -070029cc_library {
30 name: "librecovery_ui",
31 recovery_available: true,
32
33 defaults: [
34 "recovery_defaults",
35 ],
36
37 srcs: [
38 "device.cpp",
39 "screen_ui.cpp",
40 "ui.cpp",
41 "vr_ui.cpp",
42 "wear_ui.cpp"
43 ],
44
45 static_libs: [
46 "libminui",
47 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -080048 "libfstab",
Tao Bao5fc72a12018-08-07 14:38:51 -070049 ],
50
51 shared_libs: [
52 "libbase",
53 "libpng",
54 "libz",
55 ],
56}
57
Tao Baod2f2ad62018-03-23 23:24:25 -070058// Generic device that uses ScreenRecoveryUI.
59cc_library_static {
60 name: "librecovery_ui_default",
Tao Bao818f9382018-08-06 15:52:24 -070061 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -070062
63 defaults: [
64 "recovery_defaults",
65 ],
66
67 srcs: [
68 "default_device.cpp",
69 ],
70}
71
72// The default wear device that uses WearRecoveryUI.
73cc_library_static {
74 name: "librecovery_ui_wear",
Tao Bao818f9382018-08-06 15:52:24 -070075 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -070076
77 defaults: [
78 "recovery_defaults",
79 ],
80
81 srcs: [
82 "wear_device.cpp",
83 ],
84}
85
86// The default VR device that uses VrRecoveryUI.
87cc_library_static {
88 name: "librecovery_ui_vr",
Tao Bao818f9382018-08-06 15:52:24 -070089 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -070090
91 defaults: [
92 "recovery_defaults",
93 ],
94
95 srcs: [
96 "vr_device.cpp",
97 ],
98}
99
Hridya Valsaraju20c81b32018-07-27 22:09:12 -0700100cc_library_static {
101 name: "librecovery_fastboot",
102 recovery_available: true,
103 defaults: [
104 "recovery_defaults",
105 ],
106
107 srcs: [
108 "fastboot/fastboot.cpp",
109 ],
110
111 shared_libs: [
112 "libbase",
113 "libbootloader_message",
114 "libcutils",
115 "liblog",
116 ],
117
118 static_libs: [
119 "librecovery_ui_default",
120 ],
121}
122
Tao Bao5fc72a12018-08-07 14:38:51 -0700123cc_defaults {
124 name: "librecovery_defaults",
125
126 defaults: [
127 "recovery_defaults",
128 ],
129
130 shared_libs: [
Yifan Hong056538c2018-07-11 17:04:12 -0700131 "android.hardware.health@2.0",
Tao Bao5fc72a12018-08-07 14:38:51 -0700132 "libbase",
133 "libbootloader_message",
134 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -0700135 "libcutils",
136 "libext4_utils",
137 "libfs_mgr",
138 "libfusesideload",
139 "libhidl-gen-utils",
Yifan Hong056538c2018-07-11 17:04:12 -0700140 "libhidlbase",
141 "libhidltransport",
Tao Bao5fc72a12018-08-07 14:38:51 -0700142 "liblog",
143 "libpng",
144 "libselinux",
Tao Bao5fc72a12018-08-07 14:38:51 -0700145 "libtinyxml2",
146 "libutils",
147 "libz",
148 "libziparchive",
149 ],
150
151 static_libs: [
Hridya Valsaraju20c81b32018-07-27 22:09:12 -0700152 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -0700153 "libminui",
154 "libverifier",
155 "libotautil",
Yifan Hong056538c2018-07-11 17:04:12 -0700156
157 // external dependencies
158 "libhealthhalutils",
Tao Bao5fc72a12018-08-07 14:38:51 -0700159 "libvintf_recovery",
160 "libvintf",
Tom Cherry72a114a2019-01-30 15:59:53 -0800161 "libfstab",
Tao Bao5fc72a12018-08-07 14:38:51 -0700162 ],
163}
164
165cc_library_static {
166 name: "librecovery",
167 recovery_available: true,
168
169 defaults: [
170 "librecovery_defaults",
171 ],
172
173 srcs: [
174 "adb_install.cpp",
175 "fsck_unshare_blocks.cpp",
176 "fuse_sdcard_provider.cpp",
177 "install.cpp",
xunchangf07ed2e2019-02-25 14:14:01 -0800178 "package.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -0700179 "recovery.cpp",
180 "roots.cpp",
181 ],
182
183 include_dirs: [
184 "system/vold",
185 ],
186}
187
Tao Baod2f2ad62018-03-23 23:24:25 -0700188cc_library_static {
Tao Baod2f2ad62018-03-23 23:24:25 -0700189 name: "libverifier",
Tao Bao818f9382018-08-06 15:52:24 -0700190 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -0700191
192 defaults: [
193 "recovery_defaults",
194 ],
195
196 srcs: [
197 "asn1_decoder.cpp",
198 "verifier.cpp",
199 ],
200
Tao Bao818f9382018-08-06 15:52:24 -0700201 shared_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700202 "libbase",
203 "libcrypto",
204 "libcrypto_utils",
Tianjie Xu0dd96852018-10-15 11:44:14 -0700205 "libziparchive",
Tao Bao818f9382018-08-06 15:52:24 -0700206 ],
207
208 static_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700209 "libotautil",
210 ],
211}
212
Tao Bao5fc72a12018-08-07 14:38:51 -0700213cc_binary {
214 name: "recovery",
215 recovery: true,
216
217 defaults: [
218 "librecovery_defaults",
219 ],
220
221 srcs: [
222 "logging.cpp",
223 "recovery_main.cpp",
224 ],
225
226 shared_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700227 "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -0700228 "librecovery_ui",
229 ],
230
231 static_libs: [
232 "librecovery",
233 "librecovery_ui_default",
234 ],
235
236 required: [
237 "e2fsdroid.recovery",
238 "librecovery_ui_ext",
Tao Bao7c074d92018-08-21 12:31:51 -0700239 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700240 "mke2fs.recovery",
241 "recovery_deps",
242 ],
243}
244
Tao Baod2f2ad62018-03-23 23:24:25 -0700245// The dynamic executable that runs after /data mounts.
246cc_binary {
247 name: "recovery-persist",
248
249 defaults: [
250 "recovery_defaults",
251 ],
252
253 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700254 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700255 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700256 ],
257
258 shared_libs: [
259 "libbase",
260 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700261 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700262 ],
263
Jerry Zhang152933a2018-05-02 16:56:00 -0700264 static_libs: [
265 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800266 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700267 ],
268
Tao Baod2f2ad62018-03-23 23:24:25 -0700269 init_rc: [
270 "recovery-persist.rc",
271 ],
272}
273
274// The dynamic executable that runs at init.
275cc_binary {
276 name: "recovery-refresh",
277
278 defaults: [
279 "recovery_defaults",
280 ],
281
282 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700283 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700284 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700285 ],
286
287 shared_libs: [
288 "libbase",
289 "liblog",
290 ],
291
Jerry Zhang152933a2018-05-02 16:56:00 -0700292 static_libs: [
293 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800294 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700295 ],
296
Tao Baod2f2ad62018-03-23 23:24:25 -0700297 init_rc: [
298 "recovery-refresh.rc",
299 ],
300}
Tao Baoef5e38f2018-07-24 15:34:39 -0700301
302filegroup {
303 name: "res-testdata",
304
305 srcs: [
306 "res-*/images/*_text.png",
307 ],
308}