blob: 49a83a43e6349b52b88f16a127887574c0415cc4 [file] [log] [blame]
Tao Baod2f2ad62018-03-23 23:24:25 -07001// Copyright (C) 2018 The Android Open Source Project
Steve Kondikb50e01b2013-10-19 19:49:20 -07002// Copyright (C) 2019 The LineageOS Project
Tao Baod2f2ad62018-03-23 23:24:25 -07003//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16cc_defaults {
17 name: "recovery_defaults",
18
19 cflags: [
Tao Bao818f9382018-08-06 15:52:24 -070020 "-D_FILE_OFFSET_BITS=64",
21
22 // Must be the same as RECOVERY_API_VERSION.
23 "-DRECOVERY_API_VERSION=3",
24
Tao Baod2f2ad62018-03-23 23:24:25 -070025 "-Wall",
26 "-Werror",
27 ],
28}
29
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070030cc_library_static {
31 name: "librecovery_fastboot",
32 recovery_available: true,
33 defaults: [
34 "recovery_defaults",
35 ],
36
37 srcs: [
38 "fastboot/fastboot.cpp",
39 ],
40
41 shared_libs: [
42 "libbase",
43 "libbootloader_message",
44 "libcutils",
45 "liblog",
Tianjie Xu8f397302018-08-20 13:40:47 -070046 "librecovery_ui",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070047 ],
48
49 static_libs: [
50 "librecovery_ui_default",
51 ],
52}
53
Tao Bao5fc72a12018-08-07 14:38:51 -070054cc_defaults {
55 name: "librecovery_defaults",
56
57 defaults: [
58 "recovery_defaults",
59 ],
60
61 shared_libs: [
Yifan Hong056538c2018-07-11 17:04:12 -070062 "android.hardware.health@2.0",
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",
Tao Bao5fc72a12018-08-07 14:38:51 -070068 "liblog",
Tao Bao5fc72a12018-08-07 14:38:51 -070069 "libziparchive",
70 ],
71
72 static_libs: [
Tao Bao2f8afba2019-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 Bao5fc72a12018-08-07 14:38:51 -070076 "libotautil",
Yifan Hong056538c2018-07-11 17:04:12 -070077
78 // external dependencies
79 "libhealthhalutils",
Tom Cherry72a114a2019-01-30 15:59:53 -080080 "libfstab",
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: [
Steve Kondikb50e01b2013-10-19 19:49:20 -0700120 "libc++fs",
Tao Bao5fc72a12018-08-07 14:38:51 -0700121 "librecovery",
122 "librecovery_ui_default",
123 ],
124
125 required: [
126 "e2fsdroid.recovery",
127 "librecovery_ui_ext",
xunchang95d67322019-04-05 16:16:07 -0700128 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700129 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700130 "mke2fs.recovery",
Steve Kondikb50e01b2013-10-19 19:49:20 -0700131 "mkshrc.recovery",
132 "reboot.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700133 "recovery_deps",
134 ],
135}
136
Tao Baod2f2ad62018-03-23 23:24:25 -0700137// The dynamic executable that runs after /data mounts.
138cc_binary {
139 name: "recovery-persist",
140
141 defaults: [
142 "recovery_defaults",
143 ],
144
145 srcs: [
146 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700147 ],
148
149 shared_libs: [
150 "libbase",
151 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700152 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700153 ],
154
Jerry Zhang152933a2018-05-02 16:56:00 -0700155 static_libs: [
156 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800157 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700158 ],
159
Tao Baod2f2ad62018-03-23 23:24:25 -0700160 init_rc: [
161 "recovery-persist.rc",
162 ],
163}
164
165// The dynamic executable that runs at init.
166cc_binary {
167 name: "recovery-refresh",
168
169 defaults: [
170 "recovery_defaults",
171 ],
172
173 srcs: [
174 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700175 ],
176
177 shared_libs: [
178 "libbase",
179 "liblog",
180 ],
181
Jerry Zhang152933a2018-05-02 16:56:00 -0700182 static_libs: [
183 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800184 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700185 ],
186
Tao Baod2f2ad62018-03-23 23:24:25 -0700187 init_rc: [
188 "recovery-refresh.rc",
189 ],
190}
Tao Baoef5e38f2018-07-24 15:34:39 -0700191
192filegroup {
193 name: "res-testdata",
194
195 srcs: [
196 "res-*/images/*_text.png",
197 ],
198}