blob: 99e8b652f40dfa073946e93cced8d3d8cb280273 [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
Tao Bao5fc72a12018-08-07 14:38:51 -070099cc_defaults {
100 name: "librecovery_defaults",
101
102 defaults: [
103 "recovery_defaults",
104 ],
105
106 shared_libs: [
107 "libasyncio",
108 "libbase",
109 "libbootloader_message",
110 "libcrypto",
111 "libcrypto_utils",
112 "libcutils",
113 "libext4_utils",
114 "libfs_mgr",
115 "libfusesideload",
116 "libhidl-gen-utils",
117 "liblog",
118 "libpng",
119 "libselinux",
120 "libsparse",
121 "libtinyxml2",
122 "libutils",
123 "libz",
124 "libziparchive",
125 ],
126
127 static_libs: [
128 "libminadbd",
129 "libminui",
130 "libverifier",
131 "libotautil",
132 "libvintf_recovery",
133 "libvintf",
134
135 // TODO(b/80132328): Remove the dependency on static health HAL.
136 "libhealthd.default",
137 "android.hardware.health@2.0-impl",
138 "android.hardware.health@2.0",
139 "android.hardware.health@1.0",
140 "android.hardware.health@1.0-convert",
141 "libhealthstoragedefault",
142 "libhidltransport",
143 "libhidlbase",
144 "libhwbinder_noltopgo",
145 "libbatterymonitor",
146 ],
147}
148
149cc_library_static {
150 name: "librecovery",
151 recovery_available: true,
152
153 defaults: [
154 "librecovery_defaults",
155 ],
156
157 srcs: [
158 "adb_install.cpp",
159 "fsck_unshare_blocks.cpp",
160 "fuse_sdcard_provider.cpp",
161 "install.cpp",
162 "recovery.cpp",
163 "roots.cpp",
164 ],
165
166 include_dirs: [
167 "system/vold",
168 ],
169}
170
Tao Baod2f2ad62018-03-23 23:24:25 -0700171cc_library_static {
Tao Baod2f2ad62018-03-23 23:24:25 -0700172 name: "libverifier",
Tao Bao818f9382018-08-06 15:52:24 -0700173 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -0700174
175 defaults: [
176 "recovery_defaults",
177 ],
178
179 srcs: [
180 "asn1_decoder.cpp",
181 "verifier.cpp",
182 ],
183
Tao Bao818f9382018-08-06 15:52:24 -0700184 shared_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700185 "libbase",
186 "libcrypto",
187 "libcrypto_utils",
Tao Bao818f9382018-08-06 15:52:24 -0700188 ],
189
190 static_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700191 "libotautil",
192 ],
193}
194
Tao Bao5fc72a12018-08-07 14:38:51 -0700195cc_binary {
196 name: "recovery",
197 recovery: true,
198
199 defaults: [
200 "librecovery_defaults",
201 ],
202
203 srcs: [
204 "logging.cpp",
205 "recovery_main.cpp",
206 ],
207
208 shared_libs: [
209 "librecovery_ui",
210 ],
211
212 static_libs: [
213 "librecovery",
214 "librecovery_ui_default",
215 ],
216
217 required: [
218 "e2fsdroid.recovery",
219 "librecovery_ui_ext",
220 "mke2fs.conf",
221 "mke2fs.recovery",
222 "recovery_deps",
223 ],
224}
225
Tao Baod2f2ad62018-03-23 23:24:25 -0700226// The dynamic executable that runs after /data mounts.
227cc_binary {
228 name: "recovery-persist",
229
230 defaults: [
231 "recovery_defaults",
232 ],
233
234 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700235 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700236 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700237 ],
238
239 shared_libs: [
240 "libbase",
241 "liblog",
242 ],
243
Jerry Zhang152933a2018-05-02 16:56:00 -0700244 static_libs: [
245 "libotautil",
246 ],
247
Tao Baod2f2ad62018-03-23 23:24:25 -0700248 init_rc: [
249 "recovery-persist.rc",
250 ],
251}
252
253// The dynamic executable that runs at init.
254cc_binary {
255 name: "recovery-refresh",
256
257 defaults: [
258 "recovery_defaults",
259 ],
260
261 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700262 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700263 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700264 ],
265
266 shared_libs: [
267 "libbase",
268 "liblog",
269 ],
270
Jerry Zhang152933a2018-05-02 16:56:00 -0700271 static_libs: [
272 "libotautil",
273 ],
274
Tao Baod2f2ad62018-03-23 23:24:25 -0700275 init_rc: [
276 "recovery-refresh.rc",
277 ],
278}