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