Add gnss HAL APEX

Bug: 297467836
Test: VtsHalGnssTargetTest
Change-Id: I193ad310cfeabd21fc6beefeaef460487754c7c2
This commit is contained in:
Jooyung Han 2023-11-04 00:29:07 +09:00
parent 7e4037cf01
commit 78c24f8854
4 changed files with 41 additions and 7 deletions

View file

@ -26,12 +26,7 @@ package {
cc_binary {
name: "android.hardware.gnss-service.example",
relative_install_path: "hw",
init_rc: [
"gnss-default.rc",
],
vintf_fragments: [
"gnss-default.xml",
],
installable: false, // install APEX instead
vendor: true,
cflags: [
"-Wall",
@ -73,3 +68,35 @@ cc_binary {
"android.hardware.gnss@common-default-lib",
],
}
prebuilt_etc {
name: "gnss-default.rc",
src: "gnss-default.rc",
installable: false,
}
prebuilt_etc {
name: "gnss-default.xml",
src: "gnss-default.xml",
sub_dir: "vintf",
installable: false,
}
apex {
name: "com.android.hardware.gnss",
manifest: "apex_manifest.json",
file_contexts: "apex_file_contexts",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
vendor: true,
binaries: [
"android.hardware.gnss-service.example",
],
prebuilts: [
"gnss-default.rc",
"gnss-default.xml",
"android.hardware.location.gps.prebuilt.xml", // permission
],
}

View file

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

View file

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

View file

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