• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2018 The Android Open Source Project
3//
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//
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21cc_library_headers {
22    name: "libfiemap_headers",
23    recovery_available: true,
24    export_include_dirs: ["include"],
25}
26
27filegroup {
28    name: "libfiemap_srcs",
29    srcs: [
30        "fiemap_writer.cpp",
31        "fiemap_status.cpp",
32        "image_manager.cpp",
33        "metadata.cpp",
34        "split_fiemap_writer.cpp",
35        "utility.cpp",
36    ],
37}
38
39filegroup {
40    name: "libfiemap_binder_srcs",
41    srcs: [
42        "binder.cpp",
43    ],
44}
45
46cc_defaults {
47    name: "libfiemap_binder_defaults",
48    srcs: [":libfiemap_binder_srcs"],
49    whole_static_libs: [
50        "gsi_aidl_interface-cpp",
51        "libgsi",
52        "libgsid",
53    ],
54    shared_libs: [
55        "libbinder",
56        "libutils",
57    ],
58}
59
60// Open up a passthrough IImageManager interface. Use libfiemap_binder whenever
61// possible. This should only be used when binder is not available.
62filegroup {
63    name: "libfiemap_passthrough_srcs",
64    srcs: [
65        "passthrough.cpp",
66    ],
67}
68
69cc_test {
70    name: "fiemap_writer_test",
71    static_libs: [
72        "libbase",
73        "libdm",
74        "libfs_mgr",
75        "liblog",
76        "libgsi",
77    ],
78
79    data: [
80        "testdata/unaligned_file",
81        "testdata/file_4k",
82        "testdata/file_32k",
83    ],
84
85    srcs: [
86        "fiemap_writer_test.cpp",
87    ],
88
89    test_suites: ["vts", "device-tests"],
90    auto_gen_config: true,
91    test_min_api_level: 29,
92    require_root: true,
93}
94
95cc_test {
96    name: "fiemap_image_test",
97    static_libs: [
98        "libcrypto_utils",
99        "libdm",
100        "libext4_utils",
101        "libfs_mgr",
102        "liblp",
103    ],
104    shared_libs: [
105        "libbase",
106        "libcrypto",
107        "libcutils",
108        "liblog",
109    ],
110    srcs: [
111        "image_test.cpp",
112    ],
113    test_suites: ["device-tests"],
114    auto_gen_config: true,
115    require_root: true,
116}
117