blob: bd2d0b0b23c9cd9c4ccc056c8637296cc6eea55b [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: [
David Anderson89d2d052019-10-15 13:22:20 -070061 "android.hardware.boot@1.0",
62 "android.hardware.boot@1.1",
Tao Bao5fc72a12018-08-07 14:38:51 -070063 "libbase",
64 "libbootloader_message",
65 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -070066 "libcutils",
Tao Bao5fc72a12018-08-07 14:38:51 -070067 "libfs_mgr",
David Anderson89d2d052019-10-15 13:22:20 -070068 "liblp",
Tao Bao5fc72a12018-08-07 14:38:51 -070069 "liblog",
David Anderson89d2d052019-10-15 13:22:20 -070070 "libprotobuf-cpp-lite",
Tao Bao5fc72a12018-08-07 14:38:51 -070071 "libziparchive",
72 ],
73
74 static_libs: [
Tianjie Xu58a27692019-08-06 12:32:05 -070075 "libc++fs",
Tao Bao0deed332019-04-08 11:26:11 -070076 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070077 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070078 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070079 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070080 "libotautil",
David Anderson89d2d052019-10-15 13:22:20 -070081 "libsnapshot_nobinder",
Yifan Hongacf7d1b2020-04-16 11:04:10 -070082 "update_metadata-protos",
Tao Bao5fc72a12018-08-07 14:38:51 -070083 ],
84}
85
86cc_library_static {
87 name: "librecovery",
88 recovery_available: true,
89
90 defaults: [
91 "librecovery_defaults",
92 ],
93
94 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070095 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070096 ],
97
Tianjie Xu8f397302018-08-20 13:40:47 -070098 shared_libs: [
99 "librecovery_ui",
100 ],
xunchang37304f32019-03-12 12:40:14 -0700101}
102
Tom Cherry24dd3142019-11-04 15:17:17 -0800103prebuilt_etc {
104 name: "init_recovery.rc",
105 filename: "init.rc",
106 src: "etc/init.rc",
107 sub_dir: "init/hw",
108 recovery: true,
109}
110
Tao Bao5fc72a12018-08-07 14:38:51 -0700111cc_binary {
112 name: "recovery",
113 recovery: true,
114
115 defaults: [
xunchang24788852019-03-22 16:08:52 -0700116 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700117 "librecovery_defaults",
Tao Bao832c9cd2019-09-27 23:32:00 -0700118 "librecovery_utils_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700119 ],
120
121 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700122 "recovery_main.cpp",
123 ],
124
125 shared_libs: [
126 "librecovery_ui",
127 ],
128
129 static_libs: [
130 "librecovery",
131 "librecovery_ui_default",
132 ],
133
134 required: [
135 "e2fsdroid.recovery",
Tom Cherry24dd3142019-11-04 15:17:17 -0800136 "init_recovery.rc",
Tao Bao5fc72a12018-08-07 14:38:51 -0700137 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700138 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700139 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700140 "mke2fs.recovery",
141 "recovery_deps",
Tom Cherry24dd3142019-11-04 15:17:17 -0800142 "ueventd.rc.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700143 ],
144}
145
Tao Baod2f2ad62018-03-23 23:24:25 -0700146// The dynamic executable that runs after /data mounts.
147cc_binary {
148 name: "recovery-persist",
149
150 defaults: [
151 "recovery_defaults",
152 ],
153
154 srcs: [
155 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700156 ],
157
158 shared_libs: [
159 "libbase",
160 "liblog",
161 ],
162
Jerry Zhang152933a2018-05-02 16:56:00 -0700163 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700164 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700165 ],
166
Tao Baod2f2ad62018-03-23 23:24:25 -0700167 init_rc: [
168 "recovery-persist.rc",
169 ],
170}
171
172// The dynamic executable that runs at init.
173cc_binary {
174 name: "recovery-refresh",
175
176 defaults: [
177 "recovery_defaults",
178 ],
179
180 srcs: [
181 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700182 ],
183
184 shared_libs: [
185 "libbase",
186 "liblog",
187 ],
188
Jerry Zhang152933a2018-05-02 16:56:00 -0700189 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700190 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700191 ],
192
Tao Baod2f2ad62018-03-23 23:24:25 -0700193 init_rc: [
194 "recovery-refresh.rc",
195 ],
196}
Tao Baoef5e38f2018-07-24 15:34:39 -0700197
198filegroup {
199 name: "res-testdata",
200
201 srcs: [
202 "res-*/images/*_text.png",
203 ],
204}