blob: 1e7f5436196ea3eba67e98f235ab03f8d205c21e [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: [
Yifan Hong056538c2018-07-11 17:04:12 -0700107 "android.hardware.health@2.0",
Tao Bao5fc72a12018-08-07 14:38:51 -0700108 "libbase",
109 "libbootloader_message",
110 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -0700111 "libcutils",
112 "libext4_utils",
113 "libfs_mgr",
114 "libfusesideload",
115 "libhidl-gen-utils",
Yifan Hong056538c2018-07-11 17:04:12 -0700116 "libhidlbase",
117 "libhidltransport",
Tao Bao5fc72a12018-08-07 14:38:51 -0700118 "liblog",
119 "libpng",
120 "libselinux",
Tao Bao5fc72a12018-08-07 14:38:51 -0700121 "libtinyxml2",
122 "libutils",
123 "libz",
124 "libziparchive",
125 ],
126
127 static_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700128 "libminui",
129 "libverifier",
130 "libotautil",
Yifan Hong056538c2018-07-11 17:04:12 -0700131
132 // external dependencies
133 "libhealthhalutils",
Tao Bao5fc72a12018-08-07 14:38:51 -0700134 "libvintf_recovery",
135 "libvintf",
Tao Bao5fc72a12018-08-07 14:38:51 -0700136 ],
137}
138
139cc_library_static {
140 name: "librecovery",
141 recovery_available: true,
142
143 defaults: [
144 "librecovery_defaults",
145 ],
146
147 srcs: [
148 "adb_install.cpp",
149 "fsck_unshare_blocks.cpp",
150 "fuse_sdcard_provider.cpp",
151 "install.cpp",
152 "recovery.cpp",
153 "roots.cpp",
154 ],
155
156 include_dirs: [
157 "system/vold",
158 ],
159}
160
Tao Baod2f2ad62018-03-23 23:24:25 -0700161cc_library_static {
Tao Baod2f2ad62018-03-23 23:24:25 -0700162 name: "libverifier",
Tao Bao818f9382018-08-06 15:52:24 -0700163 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -0700164
165 defaults: [
166 "recovery_defaults",
167 ],
168
169 srcs: [
170 "asn1_decoder.cpp",
171 "verifier.cpp",
172 ],
173
Tao Bao818f9382018-08-06 15:52:24 -0700174 shared_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700175 "libbase",
176 "libcrypto",
177 "libcrypto_utils",
Tao Bao818f9382018-08-06 15:52:24 -0700178 ],
179
180 static_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700181 "libotautil",
182 ],
183}
184
Tao Bao5fc72a12018-08-07 14:38:51 -0700185cc_binary {
186 name: "recovery",
187 recovery: true,
188
189 defaults: [
190 "librecovery_defaults",
191 ],
192
193 srcs: [
194 "logging.cpp",
195 "recovery_main.cpp",
196 ],
197
198 shared_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700199 "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -0700200 "librecovery_ui",
201 ],
202
203 static_libs: [
204 "librecovery",
205 "librecovery_ui_default",
206 ],
207
208 required: [
209 "e2fsdroid.recovery",
210 "librecovery_ui_ext",
211 "mke2fs.conf",
212 "mke2fs.recovery",
213 "recovery_deps",
214 ],
215}
216
Tao Baod2f2ad62018-03-23 23:24:25 -0700217// The dynamic executable that runs after /data mounts.
218cc_binary {
219 name: "recovery-persist",
220
221 defaults: [
222 "recovery_defaults",
223 ],
224
225 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700226 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700227 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700228 ],
229
230 shared_libs: [
231 "libbase",
232 "liblog",
233 ],
234
Jerry Zhang152933a2018-05-02 16:56:00 -0700235 static_libs: [
236 "libotautil",
237 ],
238
Tao Baod2f2ad62018-03-23 23:24:25 -0700239 init_rc: [
240 "recovery-persist.rc",
241 ],
242}
243
244// The dynamic executable that runs at init.
245cc_binary {
246 name: "recovery-refresh",
247
248 defaults: [
249 "recovery_defaults",
250 ],
251
252 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700253 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700254 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700255 ],
256
257 shared_libs: [
258 "libbase",
259 "liblog",
260 ],
261
Jerry Zhang152933a2018-05-02 16:56:00 -0700262 static_libs: [
263 "libotautil",
264 ],
265
Tao Baod2f2ad62018-03-23 23:24:25 -0700266 init_rc: [
267 "recovery-refresh.rc",
268 ],
269}