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