Merge "gps: Enable Pixel GNSS HAL" into main
This commit is contained in:
commit
1f9b2775bd
@ -14,3 +14,6 @@ PRODUCT_PACKAGES += \
|
|||||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||||
PRODUCT_VENDOR_PROPERTIES += vendor.gps.aol.enabled=true
|
PRODUCT_VENDOR_PROPERTIES += vendor.gps.aol.enabled=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Enable Pixel GNSS HAL
|
||||||
|
include device/google/gs-common/gps/pixel/pixel_gnss_hal.mk
|
@ -8,3 +8,6 @@ binder_call(hal_gnss_default, gnssd);
|
|||||||
|
|
||||||
#Read GPS property
|
#Read GPS property
|
||||||
get_prop(hal_gnss_default, vendor_gps_prop)
|
get_prop(hal_gnss_default, vendor_gps_prop)
|
||||||
|
|
||||||
|
#IPC between pixel and vendor HAL
|
||||||
|
binder_call(hal_gnss_default, hal_gnss_pixel)
|
||||||
|
10
gps/pixel/device_framework_matrix_product.xml
Normal file
10
gps/pixel/device_framework_matrix_product.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<compatibility-matrix version="1.0" type="framework" level="8">
|
||||||
|
<hal format="aidl" optional="true">
|
||||||
|
<name>android.hardware.gnss</name>
|
||||||
|
<version>3</version>
|
||||||
|
<interface>
|
||||||
|
<name>IGnss</name>
|
||||||
|
<instance>vendor</instance>
|
||||||
|
</interface>
|
||||||
|
</hal>
|
||||||
|
</compatibility-matrix>
|
15
gps/pixel/pixel_gnss_hal.mk
Normal file
15
gps/pixel/pixel_gnss_hal.mk
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Include this file to enable Pixel GNSS HAL
|
||||||
|
|
||||||
|
$(call soong_config_set, pixel_gnss, enable_pixel_gnss_aidl_service, true)
|
||||||
|
|
||||||
|
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gps/pixel/sepolicy
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
android.hardware.gnss-service.pixel
|
||||||
|
|
||||||
|
PRODUCT_VENDOR_PROPERTIES += \
|
||||||
|
persist.vendor.gps.hal.service.name=vendor
|
||||||
|
|
||||||
|
# Compatibility matrix
|
||||||
|
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += \
|
||||||
|
device/google/gs-common/gps/pixel/device_framework_matrix_product.xml
|
1
gps/pixel/sepolicy/file.te
Normal file
1
gps/pixel/sepolicy/file.te
Normal file
@ -0,0 +1 @@
|
|||||||
|
type sysfs_modem_state, sysfs_type, fs_type;
|
2
gps/pixel/sepolicy/file_contexts
Normal file
2
gps/pixel/sepolicy/file_contexts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/vendor/bin/hw/android\.hardware\.gnss-service\.pixel u:object_r:hal_gnss_pixel_exec:s0
|
||||||
|
|
2
gps/pixel/sepolicy/genfs_contexts
Normal file
2
gps/pixel/sepolicy/genfs_contexts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# modem state node
|
||||||
|
genfscon sysfs /devices/platform/cpif/modem_state u:object_r:sysfs_modem_state:s0
|
14
gps/pixel/sepolicy/hal_gnss_pixel.te
Normal file
14
gps/pixel/sepolicy/hal_gnss_pixel.te
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
type hal_gnss_pixel, domain;
|
||||||
|
hal_server_domain(hal_gnss_pixel, hal_gnss)
|
||||||
|
|
||||||
|
type hal_gnss_pixel_exec, exec_type, vendor_file_type, file_type;
|
||||||
|
init_daemon_domain(hal_gnss_pixel)
|
||||||
|
|
||||||
|
#IPC between pixel and vendor HAL
|
||||||
|
binder_call(hal_gnss_pixel, hal_gnss_default)
|
||||||
|
|
||||||
|
#Read modem state
|
||||||
|
allow hal_gnss_pixel sysfs_modem_state:file r_file_perms;
|
||||||
|
|
||||||
|
#Toggle coredump node
|
||||||
|
allow hal_gnss_pixel sysfs_gps:file rw_file_perms;
|
1
gps/pixel/sepolicy/service_contexts
Normal file
1
gps/pixel/sepolicy/service_contexts
Normal file
@ -0,0 +1 @@
|
|||||||
|
android.hardware.gnss.IGnss/vendor u:object_r:hal_gnss_service:s0
|
Loading…
x
Reference in New Issue
Block a user