blob: 5677b6c2a6a3980f58acf45de132da608cec2c17 [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",
48 ],
49
50 shared_libs: [
51 "libbase",
52 "libpng",
53 "libz",
54 ],
55}
56
Tao Baod2f2ad62018-03-23 23:24:25 -070057// Generic device that uses ScreenRecoveryUI.
58cc_library_static {
59 name: "librecovery_ui_default",
Tao Bao818f9382018-08-06 15:52:24 -070060 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -070061
62 defaults: [
63 "recovery_defaults",
64 ],
65
66 srcs: [
67 "default_device.cpp",
68 ],
69}
70
71// The default wear device that uses WearRecoveryUI.
72cc_library_static {
73 name: "librecovery_ui_wear",
Tao Bao818f9382018-08-06 15:52:24 -070074 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -070075
76 defaults: [
77 "recovery_defaults",
78 ],
79
80 srcs: [
81 "wear_device.cpp",
82 ],
83}
84
85// The default VR device that uses VrRecoveryUI.
86cc_library_static {
87 name: "librecovery_ui_vr",
Tao Bao818f9382018-08-06 15:52:24 -070088 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -070089
90 defaults: [
91 "recovery_defaults",
92 ],
93
94 srcs: [
95 "vr_device.cpp",
96 ],
97}
98
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070099cc_library_static {
100 name: "librecovery_fastboot",
101 recovery_available: true,
102 defaults: [
103 "recovery_defaults",
104 ],
105
106 srcs: [
107 "fastboot/fastboot.cpp",
108 ],
109
110 shared_libs: [
111 "libbase",
112 "libbootloader_message",
113 "libcutils",
114 "liblog",
115 ],
116
117 static_libs: [
118 "librecovery_ui_default",
119 ],
120}
121
Tao Bao5fc72a12018-08-07 14:38:51 -0700122cc_defaults {
123 name: "librecovery_defaults",
124
125 defaults: [
126 "recovery_defaults",
127 ],
128
129 shared_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700130 "libbase",
131 "libbootloader_message",
132 "libcrypto",
133 "libcrypto_utils",
134 "libcutils",
135 "libext4_utils",
136 "libfs_mgr",
137 "libfusesideload",
138 "libhidl-gen-utils",
139 "liblog",
140 "libpng",
141 "libselinux",
142 "libsparse",
143 "libtinyxml2",
144 "libutils",
145 "libz",
146 "libziparchive",
147 ],
148
149 static_libs: [
Hridya Valsaraju20c81b32018-07-27 22:09:12 -0700150 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -0700151 "libminui",
152 "libverifier",
153 "libotautil",
154 "libvintf_recovery",
155 "libvintf",
156
157 // TODO(b/80132328): Remove the dependency on static health HAL.
158 "libhealthd.default",
159 "android.hardware.health@2.0-impl",
160 "android.hardware.health@2.0",
161 "android.hardware.health@1.0",
162 "android.hardware.health@1.0-convert",
163 "libhealthstoragedefault",
164 "libhidltransport",
165 "libhidlbase",
166 "libhwbinder_noltopgo",
167 "libbatterymonitor",
168 ],
169}
170
171cc_library_static {
172 name: "librecovery",
173 recovery_available: true,
174
175 defaults: [
176 "librecovery_defaults",
177 ],
178
179 srcs: [
180 "adb_install.cpp",
181 "fsck_unshare_blocks.cpp",
182 "fuse_sdcard_provider.cpp",
183 "install.cpp",
184 "recovery.cpp",
185 "roots.cpp",
186 ],
187
188 include_dirs: [
189 "system/vold",
190 ],
191}
192
Tao Baod2f2ad62018-03-23 23:24:25 -0700193cc_library_static {
Tao Baod2f2ad62018-03-23 23:24:25 -0700194 name: "libverifier",
Tao Bao818f9382018-08-06 15:52:24 -0700195 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -0700196
197 defaults: [
198 "recovery_defaults",
199 ],
200
201 srcs: [
202 "asn1_decoder.cpp",
203 "verifier.cpp",
204 ],
205
Tao Bao818f9382018-08-06 15:52:24 -0700206 shared_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700207 "libbase",
208 "libcrypto",
209 "libcrypto_utils",
Tao Bao818f9382018-08-06 15:52:24 -0700210 ],
211
212 static_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700213 "libotautil",
214 ],
215}
216
Tao Bao5fc72a12018-08-07 14:38:51 -0700217cc_binary {
218 name: "recovery",
219 recovery: true,
220
221 defaults: [
222 "librecovery_defaults",
223 ],
224
225 srcs: [
226 "logging.cpp",
227 "recovery_main.cpp",
228 ],
229
230 shared_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700231 "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -0700232 "librecovery_ui",
233 ],
234
235 static_libs: [
236 "librecovery",
237 "librecovery_ui_default",
238 ],
239
240 required: [
241 "e2fsdroid.recovery",
242 "librecovery_ui_ext",
243 "mke2fs.conf",
244 "mke2fs.recovery",
245 "recovery_deps",
246 ],
247}
248
Tao Baod2f2ad62018-03-23 23:24:25 -0700249// The dynamic executable that runs after /data mounts.
250cc_binary {
251 name: "recovery-persist",
252
253 defaults: [
254 "recovery_defaults",
255 ],
256
257 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700258 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700259 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700260 ],
261
262 shared_libs: [
263 "libbase",
264 "liblog",
265 ],
266
Jerry Zhang152933a2018-05-02 16:56:00 -0700267 static_libs: [
268 "libotautil",
269 ],
270
Tao Baod2f2ad62018-03-23 23:24:25 -0700271 init_rc: [
272 "recovery-persist.rc",
273 ],
274}
275
276// The dynamic executable that runs at init.
277cc_binary {
278 name: "recovery-refresh",
279
280 defaults: [
281 "recovery_defaults",
282 ],
283
284 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700285 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700286 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700287 ],
288
289 shared_libs: [
290 "libbase",
291 "liblog",
292 ],
293
Jerry Zhang152933a2018-05-02 16:56:00 -0700294 static_libs: [
295 "libotautil",
296 ],
297
Tao Baod2f2ad62018-03-23 23:24:25 -0700298 init_rc: [
299 "recovery-refresh.rc",
300 ],
301}