blob: a9da69c0c2f50205c2f44218f339e5d17ad967bb [file] [log] [blame]
Kedar Chitnisbc093212021-11-16 09:08:19 +00001// Copyright (C) 2021 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
15package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "hardware_interfaces_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["hardware_interfaces_license"],
22}
23
24cc_binary {
25 name: "android.hardware.dumpstate-service.example",
26 relative_install_path: "hw",
27 init_rc: ["dumpstate-default.rc"],
28 vintf_fragments: ["dumpstate-default.xml"],
29 vendor: true,
30 shared_libs: [
31 "libbase",
32 "libbinder_ndk",
33 "libcutils",
34 "libdumpstateutil",
35 "liblog",
36 "libutils",
37 "android.hardware.dumpstate-V1-ndk",
38 ],
39 srcs: [
40 "main.cpp",
41 "Dumpstate.cpp",
42 ],
43 cflags: [
44 "-DLOG_TAG=\"android.hardware.dumpstate-service.example\"",
45 ],
46}
Jooyung Han20ef2392023-09-19 23:42:23 +090047
48prebuilt_etc {
49 name: "dumpstate-default.xml",
50 src: "dumpstate-default.xml",
51 sub_dir: "vintf",
52 installable: false,
53}
54
55prebuilt_etc {
56 name: "dumpstate-default.rc",
57 src: ":gen-dumpstate-default.rc-for-apex",
58 installable: false,
59}
60
61genrule {
62 name: "gen-dumpstate-default.rc-for-apex",
63 srcs: ["dumpstate-default.rc"],
64 out: ["dumpstate-default-apex.rc"],
65 cmd: "sed -E 's/\\/vendor\\/bin\\/hw/\\/apex\\/com.android.hardware.dumpstate\\/bin\\/hw/' $(in) > $(out)",
66}
67
68apex {
69 name: "com.android.hardware.dumpstate",
70 vendor: true,
71 manifest: "apex_manifest.json",
72 file_contexts: "apex_file_contexts",
73 key: "com.android.hardware.key",
74 certificate: ":com.android.hardware.certificate",
75 updatable: false,
76
77 binaries: [
78 "android.hardware.dumpstate-service.example",
79 ],
80 prebuilts: [
81 "dumpstate-default.rc",
82 "dumpstate-default.xml",
83 ],
84}