blob: 7b67f4077313f9af829b2561696b354f5df97649 [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
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070029cc_library_static {
30 name: "librecovery_fastboot",
31 recovery_available: true,
32 defaults: [
33 "recovery_defaults",
34 ],
35
36 srcs: [
37 "fastboot/fastboot.cpp",
38 ],
39
40 shared_libs: [
41 "libbase",
42 "libbootloader_message",
43 "libcutils",
44 "liblog",
Tianjie Xu8f397302018-08-20 13:40:47 -070045 "librecovery_ui",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070046 ],
47
48 static_libs: [
49 "librecovery_ui_default",
50 ],
51}
52
Tao Bao5fc72a12018-08-07 14:38:51 -070053cc_defaults {
54 name: "librecovery_defaults",
55
56 defaults: [
57 "recovery_defaults",
58 ],
59
60 shared_libs: [
Yifan Hong056538c2018-07-11 17:04:12 -070061 "android.hardware.health@2.0",
Tao Bao5fc72a12018-08-07 14:38:51 -070062 "libbase",
63 "libbootloader_message",
64 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -070065 "libcutils",
66 "libext4_utils",
67 "libfs_mgr",
68 "libfusesideload",
69 "libhidl-gen-utils",
Yifan Hong056538c2018-07-11 17:04:12 -070070 "libhidlbase",
71 "libhidltransport",
Tao Bao5fc72a12018-08-07 14:38:51 -070072 "liblog",
73 "libpng",
74 "libselinux",
Tao Bao5fc72a12018-08-07 14:38:51 -070075 "libtinyxml2",
76 "libutils",
77 "libz",
78 "libziparchive",
79 ],
80
81 static_libs: [
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070082 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070083 "libminui",
xunchang37304f32019-03-12 12:40:14 -070084 "libpackage",
Tao Bao5fc72a12018-08-07 14:38:51 -070085 "libverifier",
86 "libotautil",
Yifan Hong056538c2018-07-11 17:04:12 -070087
88 // external dependencies
89 "libhealthhalutils",
Tao Bao5fc72a12018-08-07 14:38:51 -070090 "libvintf_recovery",
91 "libvintf",
Tom Cherry72a114a2019-01-30 15:59:53 -080092 "libfstab",
Tao Bao5fc72a12018-08-07 14:38:51 -070093 ],
94}
95
96cc_library_static {
97 name: "librecovery",
98 recovery_available: true,
99
100 defaults: [
101 "librecovery_defaults",
102 ],
103
104 srcs: [
105 "adb_install.cpp",
106 "fsck_unshare_blocks.cpp",
xunchangea2912f2019-03-17 16:45:12 -0700107 "fuse_sdcard_install.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -0700108 "install.cpp",
109 "recovery.cpp",
110 "roots.cpp",
111 ],
112
Tianjie Xu8f397302018-08-20 13:40:47 -0700113 shared_libs: [
114 "librecovery_ui",
115 ],
116
Tao Bao5fc72a12018-08-07 14:38:51 -0700117 include_dirs: [
118 "system/vold",
119 ],
120}
121
Tao Baod2f2ad62018-03-23 23:24:25 -0700122cc_library_static {
Tao Baod2f2ad62018-03-23 23:24:25 -0700123 name: "libverifier",
Tao Bao818f9382018-08-06 15:52:24 -0700124 recovery_available: true,
Tao Baod2f2ad62018-03-23 23:24:25 -0700125
126 defaults: [
127 "recovery_defaults",
128 ],
129
130 srcs: [
131 "asn1_decoder.cpp",
132 "verifier.cpp",
133 ],
134
Tao Bao818f9382018-08-06 15:52:24 -0700135 shared_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700136 "libbase",
137 "libcrypto",
138 "libcrypto_utils",
Tianjie Xu0dd96852018-10-15 11:44:14 -0700139 "libziparchive",
Tao Bao818f9382018-08-06 15:52:24 -0700140 ],
141
142 static_libs: [
Tao Baod2f2ad62018-03-23 23:24:25 -0700143 "libotautil",
144 ],
145}
146
xunchang37304f32019-03-12 12:40:14 -0700147cc_library_static {
148 name: "libpackage",
149 recovery_available: true,
150
151 defaults: [
152 "recovery_defaults",
153 ],
154
155 srcs: [
156 "package.cpp",
157 ],
158
159 shared_libs: [
160 "libbase",
161 "libcrypto",
162 "libziparchive",
163 ],
164
165 static_libs: [
166 "libotautil",
167 ],
168}
169
Tao Bao5fc72a12018-08-07 14:38:51 -0700170cc_binary {
171 name: "recovery",
172 recovery: true,
173
174 defaults: [
175 "librecovery_defaults",
176 ],
177
178 srcs: [
179 "logging.cpp",
180 "recovery_main.cpp",
181 ],
182
183 shared_libs: [
Tao Bao7d2a63a2018-08-13 11:15:29 -0700184 "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -0700185 "librecovery_ui",
186 ],
187
188 static_libs: [
189 "librecovery",
190 "librecovery_ui_default",
191 ],
192
193 required: [
194 "e2fsdroid.recovery",
195 "librecovery_ui_ext",
Tao Bao7c074d92018-08-21 12:31:51 -0700196 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700197 "mke2fs.recovery",
198 "recovery_deps",
199 ],
200}
201
Tao Baod2f2ad62018-03-23 23:24:25 -0700202// The dynamic executable that runs after /data mounts.
203cc_binary {
204 name: "recovery-persist",
205
206 defaults: [
207 "recovery_defaults",
208 ],
209
210 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700211 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700212 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700213 ],
214
215 shared_libs: [
216 "libbase",
217 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700218 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700219 ],
220
Jerry Zhang152933a2018-05-02 16:56:00 -0700221 static_libs: [
222 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800223 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700224 ],
225
Tao Baod2f2ad62018-03-23 23:24:25 -0700226 init_rc: [
227 "recovery-persist.rc",
228 ],
229}
230
231// The dynamic executable that runs at init.
232cc_binary {
233 name: "recovery-refresh",
234
235 defaults: [
236 "recovery_defaults",
237 ],
238
239 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700240 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700241 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700242 ],
243
244 shared_libs: [
245 "libbase",
246 "liblog",
247 ],
248
Jerry Zhang152933a2018-05-02 16:56:00 -0700249 static_libs: [
250 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800251 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700252 ],
253
Tao Baod2f2ad62018-03-23 23:24:25 -0700254 init_rc: [
255 "recovery-refresh.rc",
256 ],
257}
Tao Baoef5e38f2018-07-24 15:34:39 -0700258
259filegroup {
260 name: "res-testdata",
261
262 srcs: [
263 "res-*/images/*_text.png",
264 ],
265}