blob: a9a08a1a972293405ac879f8a8f1dc5cfee67436 [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",
Tao Bao5fc72a12018-08-07 14:38:51 -070066 "libfs_mgr",
Tao Bao5fc72a12018-08-07 14:38:51 -070067 "liblog",
Tao Bao5fc72a12018-08-07 14:38:51 -070068 "libziparchive",
69 ],
70
71 static_libs: [
Tianjie Xu58a27692019-08-06 12:32:05 -070072 "libc++fs",
Tao Bao0deed332019-04-08 11:26:11 -070073 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070074 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070075 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070076 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070077 "libotautil",
Yifan Hong056538c2018-07-11 17:04:12 -070078
79 // external dependencies
80 "libhealthhalutils",
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 "fsck_unshare_blocks.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070094 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070095 ],
96
Tianjie Xu8f397302018-08-20 13:40:47 -070097 shared_libs: [
98 "librecovery_ui",
99 ],
xunchang37304f32019-03-12 12:40:14 -0700100}
101
Tao Bao5fc72a12018-08-07 14:38:51 -0700102cc_binary {
103 name: "recovery",
104 recovery: true,
105
106 defaults: [
xunchang24788852019-03-22 16:08:52 -0700107 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700108 "librecovery_defaults",
109 ],
110
111 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700112 "recovery_main.cpp",
113 ],
114
115 shared_libs: [
116 "librecovery_ui",
117 ],
118
119 static_libs: [
120 "librecovery",
121 "librecovery_ui_default",
122 ],
123
124 required: [
125 "e2fsdroid.recovery",
126 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700127 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700128 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700129 "mke2fs.recovery",
130 "recovery_deps",
131 ],
132}
133
Tao Baod2f2ad62018-03-23 23:24:25 -0700134// The dynamic executable that runs after /data mounts.
135cc_binary {
136 name: "recovery-persist",
137
138 defaults: [
139 "recovery_defaults",
140 ],
141
142 srcs: [
143 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700144 ],
145
146 shared_libs: [
147 "libbase",
148 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700149 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700150 ],
151
Jerry Zhang152933a2018-05-02 16:56:00 -0700152 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700153 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700154 ],
155
Tao Baod2f2ad62018-03-23 23:24:25 -0700156 init_rc: [
157 "recovery-persist.rc",
158 ],
159}
160
161// The dynamic executable that runs at init.
162cc_binary {
163 name: "recovery-refresh",
164
165 defaults: [
166 "recovery_defaults",
167 ],
168
169 srcs: [
170 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700171 ],
172
173 shared_libs: [
174 "libbase",
175 "liblog",
176 ],
177
Jerry Zhang152933a2018-05-02 16:56:00 -0700178 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700179 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700180 ],
181
Tao Baod2f2ad62018-03-23 23:24:25 -0700182 init_rc: [
183 "recovery-refresh.rc",
184 ],
185}
Tao Baoef5e38f2018-07-24 15:34:39 -0700186
187filegroup {
188 name: "res-testdata",
189
190 srcs: [
191 "res-*/images/*_text.png",
192 ],
193}