Add memtrack HAL APEX

Bug: 300011626
Test: VtsHalMemtrackTargetTest
Change-Id: Ibc4d8eda2264c19173dee4165ebd977257b3f3d5
This commit is contained in:
Jooyung Han 2023-09-15 12:58:47 +09:00
parent a39e854ef5
commit 70015f6c94
4 changed files with 64 additions and 0 deletions

View file

@ -37,3 +37,56 @@ cc_binary {
"Memtrack.cpp",
],
}
cc_binary {
name: "android.hardware.memtrack-service.apex",
stem: "android.hardware.memtrack-service.example",
relative_install_path: "hw",
vendor: true,
stl: "c++_static",
static_libs: [
"libbase",
"android.hardware.memtrack-V1-ndk",
],
shared_libs: [
"libbinder_ndk",
"liblog",
],
srcs: [
"main.cpp",
"Memtrack.cpp",
],
installable: false, // installed in APEX
}
prebuilt_etc {
name: "memtrack-default-apex.rc",
src: "memtrack-default-apex.rc",
installable: false,
}
prebuilt_etc {
name: "memtrack-default.xml",
src: "memtrack-default.xml",
sub_dir: "vintf",
installable: false,
}
apex {
name: "com.android.hardware.memtrack",
file_contexts: "apex_file_contexts",
manifest: "apex_manifest.json",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
vendor: true,
binaries: [
"android.hardware.memtrack-service.apex",
],
prebuilts: [
"memtrack-default-apex.rc",
"memtrack-default.xml",
],
}

View file

@ -0,0 +1,3 @@
(/.*)? u:object_r:vendor_file:s0
/etc(/.*)? u:object_r:vendor_configs_file:s0
/bin/hw/android\.hardware\.memtrack-service\.example u:object_r:hal_memtrack_default_exec:s0

View file

@ -0,0 +1,4 @@
{
"name": "com.android.hardware.memtrack",
"version": 1
}

View file

@ -0,0 +1,4 @@
service vendor.memtrack-default /apex/com.android.hardware.memtrack/bin/hw/android.hardware.memtrack-service.example
class hal
user nobody
group system