blob: 4032bcc19ffbc7fb095aad73fdafcb104aeb6b5d [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: [
Tao Bao0deed332019-04-08 11:26:11 -070075 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070076 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070077 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070078 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070079 "libotautil",
David Anderson89d2d052019-10-15 13:22:20 -070080 "libsnapshot_nobinder",
Tao Bao5fc72a12018-08-07 14:38:51 -070081 ],
82}
83
84cc_library_static {
85 name: "librecovery",
86 recovery_available: true,
87
88 defaults: [
89 "librecovery_defaults",
90 ],
91
92 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070093 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070094 ],
95
Tianjie Xu8f397302018-08-20 13:40:47 -070096 shared_libs: [
97 "librecovery_ui",
98 ],
xunchang37304f32019-03-12 12:40:14 -070099}
100
Tom Cherrybcd3f352019-11-04 15:17:17 -0800101prebuilt_etc {
102 name: "init_recovery.rc",
103 filename: "init.rc",
104 src: "etc/init.rc",
105 sub_dir: "init/hw",
106 recovery: true,
107}
108
Tao Bao5fc72a12018-08-07 14:38:51 -0700109cc_binary {
110 name: "recovery",
111 recovery: true,
112
113 defaults: [
xunchang24788852019-03-22 16:08:52 -0700114 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700115 "librecovery_defaults",
Tao Bao832c9cd2019-09-27 23:32:00 -0700116 "librecovery_utils_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700117 ],
118
119 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700120 "recovery_main.cpp",
121 ],
122
123 shared_libs: [
124 "librecovery_ui",
125 ],
126
127 static_libs: [
128 "librecovery",
129 "librecovery_ui_default",
130 ],
131
132 required: [
133 "e2fsdroid.recovery",
Tom Cherrybcd3f352019-11-04 15:17:17 -0800134 "init_recovery.rc",
Tao Bao5fc72a12018-08-07 14:38:51 -0700135 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700136 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700137 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700138 "mke2fs.recovery",
139 "recovery_deps",
Tom Cherrybcd3f352019-11-04 15:17:17 -0800140 "ueventd.rc.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700141 ],
142}
143
Tao Baod2f2ad62018-03-23 23:24:25 -0700144// The dynamic executable that runs after /data mounts.
145cc_binary {
146 name: "recovery-persist",
147
148 defaults: [
149 "recovery_defaults",
150 ],
151
152 srcs: [
153 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700154 ],
155
156 shared_libs: [
157 "libbase",
158 "liblog",
159 ],
160
Jerry Zhang152933a2018-05-02 16:56:00 -0700161 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700162 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700163 ],
164
Tao Baod2f2ad62018-03-23 23:24:25 -0700165 init_rc: [
166 "recovery-persist.rc",
167 ],
168}
169
170// The dynamic executable that runs at init.
171cc_binary {
172 name: "recovery-refresh",
173
174 defaults: [
175 "recovery_defaults",
176 ],
177
178 srcs: [
179 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700180 ],
181
182 shared_libs: [
183 "libbase",
184 "liblog",
185 ],
186
Jerry Zhang152933a2018-05-02 16:56:00 -0700187 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700188 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700189 ],
190
Tao Baod2f2ad62018-03-23 23:24:25 -0700191 init_rc: [
192 "recovery-refresh.rc",
193 ],
194}
Tao Baoef5e38f2018-07-24 15:34:39 -0700195
196filegroup {
197 name: "res-testdata",
198
199 srcs: [
200 "res-*/images/*_text.png",
201 ],
202}