• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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: [
19        "-D_FILE_OFFSET_BITS=64",
20
21        // Must be the same as RECOVERY_API_VERSION.
22        "-DRECOVERY_API_VERSION=3",
23
24        "-Wall",
25        "-Werror",
26    ],
27}
28
29cc_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",
45        "librecovery_ui",
46    ],
47
48    static_libs: [
49        "librecovery_ui_default",
50    ],
51}
52
53cc_defaults {
54    name: "librecovery_defaults",
55
56    defaults: [
57        "recovery_defaults",
58    ],
59
60    shared_libs: [
61        "android.hardware.health@2.0",
62        "libbase",
63        "libbootloader_message",
64        "libcrypto",
65        "libcutils",
66        "libfs_mgr",
67        "liblog",
68        "libziparchive",
69    ],
70
71    static_libs: [
72        "libinstall",
73        "librecovery_fastboot",
74        "libminui",
75        "libotautil",
76
77        // external dependencies
78        "libhealthhalutils",
79        "libfstab",
80    ],
81}
82
83cc_library_static {
84    name: "librecovery",
85    recovery_available: true,
86
87    defaults: [
88        "librecovery_defaults",
89    ],
90
91    srcs: [
92        "fsck_unshare_blocks.cpp",
93        "recovery.cpp",
94    ],
95
96    shared_libs: [
97        "librecovery_ui",
98    ],
99}
100
101cc_binary {
102    name: "recovery",
103    recovery: true,
104
105    defaults: [
106        "libinstall_defaults",
107        "librecovery_defaults",
108    ],
109
110    srcs: [
111        "recovery_main.cpp",
112    ],
113
114    shared_libs: [
115        "librecovery_ui",
116    ],
117
118    static_libs: [
119        "librecovery",
120        "librecovery_ui_default",
121    ],
122
123    required: [
124        "e2fsdroid.recovery",
125        "librecovery_ui_ext",
126        "minadbd",
127        "mke2fs.conf.recovery",
128        "mke2fs.recovery",
129        "recovery_deps",
130    ],
131}
132
133// The dynamic executable that runs after /data mounts.
134cc_binary {
135    name: "recovery-persist",
136
137    defaults: [
138        "recovery_defaults",
139    ],
140
141    srcs: [
142        "recovery-persist.cpp",
143    ],
144
145    shared_libs: [
146        "libbase",
147        "liblog",
148        "libmetricslogger",
149    ],
150
151    static_libs: [
152        "libotautil",
153        "libfstab",
154    ],
155
156    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",
171    ],
172
173    shared_libs: [
174        "libbase",
175        "liblog",
176    ],
177
178    static_libs: [
179        "libotautil",
180        "libfstab",
181    ],
182
183    init_rc: [
184        "recovery-refresh.rc",
185    ],
186}
187
188filegroup {
189    name: "res-testdata",
190
191    srcs: [
192        "res-*/images/*_text.png",
193    ],
194}
195