diff --git a/device-tegu.mk b/device-tegu.mk index 682155b..ea512d4 100644 --- a/device-tegu.mk +++ b/device-tegu.mk @@ -199,7 +199,7 @@ PRODUCT_SOONG_NAMESPACES += \ device/google/tegu/uwb # Location -include device/google/tegu/location/gnssd/device-gnss.mk +include device/google/tegu/location/device-gnss.mk PRODUCT_VENDOR_PROPERTIES += \ persist.device_config.configuration.disable_rescue_party=true diff --git a/location/gnssd/release/ca.pem b/location/ca.pem similarity index 100% rename from location/gnssd/release/ca.pem rename to location/ca.pem diff --git a/location/device-gnss.mk b/location/device-gnss.mk new file mode 100644 index 0000000..85c5223 --- /dev/null +++ b/location/device-gnss.mk @@ -0,0 +1,19 @@ +# include common gnss binaries +include vendor/samsung_slsi/gps/s5300/gnss_release.mk + +# include customized gps config files +PRODUCT_COPY_FILES += \ + device/google/tegu/location/ca.pem:vendor/etc/gnss/ca.pem + +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_COPY_FILES += \ + device/google/tegu/location/gps.cfg:vendor/etc/gnss/gps.cfg + PRODUCT_VENDOR_PROPERTIES += \ + vendor.gps.aol.enabled=true +else + PRODUCT_COPY_FILES += \ + device/google/tegu/location/gps_user.cfg:vendor/etc/gnss/gps.cfg +endif + +# include pixel gnss hal service +include device/google/gs-common/gps/pixel/pixel_gnss_hal.mk diff --git a/location/gnssd/Android.bp b/location/gnssd/Android.bp deleted file mode 100644 index 60acd41..0000000 --- a/location/gnssd/Android.bp +++ /dev/null @@ -1,329 +0,0 @@ -soong_namespace { -} - -package { - default_applicable_licenses: ["vendor_samsung_slsi_gnss_license"], -} - -license { - name: "vendor_samsung_slsi_gnss_license", - visibility: [":__subpackages__"], - license_kinds: [ - "legacy_by_exception_only", // by exception only - "legacy_proprietary", // by exception only - ], -} - -cc_prebuilt_binary { - name: "android.hardware.gnss-service", - arch: { - arm64: { - srcs: ["release/android.hardware.gnss-service"], - shared_libs: [ - "liblog", - "libutils", - "libhardware", - "libhidlbase", - "android.hardware.gnss-V3-ndk", - "libsensorndkbridge", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libhidltransport is deprecated - // Bypass because libhwbinder is deprecated - check_elf_files: false, - product_variables: { - debuggable: { - required: [ - "libsighandler", - ], - }, - }, - - init_rc: ["init.gnss.rc"], - vintf_fragments: ["android.hardware.gnss@default.xml"], -} - -cc_prebuilt_binary { - name: "gnssd", - arch: { - arm64: { - srcs: ["release/gnssd"], - shared_libs: [ - "liblog", - "libutils", - "libhardware_legacy", - "libcutils", - "libssl", - "libcrypto", - // "libsitril-gps", - "android.frameworks.sensorservice@1.0", - "libhidlbase", - "libandroid_net", - "libc++", - "libc", - "libm", - "libdl", - "libcurl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libsitril-gps is Android.mk module - check_elf_files: false, - product_variables: { - debuggable: { - required: [ - "libsighandler", - ], - }, - }, -} - -// factory daemon and libraries -cc_prebuilt_binary { - name: "sctd", - arch: { - arm64: { - srcs: ["release/sctd"], - shared_libs: [ - "liblog", - "libutils", - "libhardware_legacy", - "libcutils", - "libssl", - "libcrypto", - // "libsitril-gps", - "android.frameworks.sensorservice@1.0", - "libhidlbase", - "libandroid_net", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libsitril-gps is Android.mk module - check_elf_files: false, -} - -cc_prebuilt_binary { - name: "spad", - arch: { - arm64: { - srcs: ["release/spad"], - shared_libs: [ - "liblog", - "libutils", - "libhardware_legacy", - "libcutils", - "libssl", - "libcrypto", - // "libsitril-gps", - "android.frameworks.sensorservice@1.0", - "libhidlbase", - "libandroid_net", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libsitril-gps is Android.mk module - check_elf_files: false, -} - -cc_prebuilt_binary { - name: "swcnd", - arch: { - arm64: { - srcs: ["release/swcnd"], - shared_libs: [ - "liblog", - "libutils", - "libhardware_legacy", - "libcutils", - "libssl", - "libcrypto", - // "libsitril-gps", - "android.frameworks.sensorservice@1.0", - "libhidlbase", - "libandroid_net", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libsitril-gps is Android.mk module - check_elf_files: false, -} - - -cc_prebuilt_library_shared { - name: "libmptool_utils", - arch: { - arm64: { - srcs: ["release/libmptool_utils.so"], - shared_libs: [ - "liblog", - "libhidlbase", - "libutils", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss.visibility_control@1.0", - "libhardware", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - // relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libhidltransport is deprecated - check_elf_files: false, -} - -cc_prebuilt_library_shared { - name: "libmptool_log", - arch: { - arm64: { - srcs: ["release/libmptool_log.so"], - shared_libs: [ - "liblog", - "libhidlbase", - "libutils", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss.visibility_control@1.0", - "libhardware", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - // relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libhidltransport is deprecated - check_elf_files: false, -} - -cc_prebuilt_library_shared { - name: "libmptool_json", - arch: { - arm64: { - srcs: ["release/libmptool_json.so"], - shared_libs: [ - "liblog", - "libhidlbase", - "libutils", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss.visibility_control@1.0", - "libhardware", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - // relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libhidltransport is deprecated - check_elf_files: false, -} - -cc_prebuilt_library_shared { - name: "android.hardware.gnss@2.1-impl", - arch: { - arm64: { - srcs: ["release/android_hardware_gnss_2_1-impl.so"], - shared_libs: [ - "liblog", - "libhidlbase", - "libutils", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss.visibility_control@1.0", - "libhardware", - "libc++", - "libc", - "libm", - "libdl", - ], - }, - }, - compile_multilib: "64", - vendor: true, - relative_install_path: "hw", - strip: { - none: true, - }, - // Bypass because libhidltransport is deprecated - check_elf_files: false, -} diff --git a/location/gnssd/android.hardware.gnss@default.xml b/location/gnssd/android.hardware.gnss@default.xml deleted file mode 100644 index 8d06407..0000000 --- a/location/gnssd/android.hardware.gnss@default.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - android.hardware.gnss - 3 - IGnss/default - - diff --git a/location/gnssd/device-gnss.mk b/location/gnssd/device-gnss.mk deleted file mode 100644 index b793004..0000000 --- a/location/gnssd/device-gnss.mk +++ /dev/null @@ -1,2 +0,0 @@ -$(call inherit-product-if-exists, device/google/tegu/location/gnssd/gnss_release.mk) - diff --git a/location/gnssd/device_framework_matrix_product.xml b/location/gnssd/device_framework_matrix_product.xml deleted file mode 100644 index 2c93444..0000000 --- a/location/gnssd/device_framework_matrix_product.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - android.hardware.gnss - 3 - - IGnss - vendor - - - diff --git a/location/gnssd/gnss_release.mk b/location/gnssd/gnss_release.mk deleted file mode 100644 index 4ce9cde..0000000 --- a/location/gnssd/gnss_release.mk +++ /dev/null @@ -1,49 +0,0 @@ -# only GPS libraries and binaries to the target directory -GPS_ROOT := device/google/tegu/location/gnssd - -# Enable pixel gnss hal service -include device/google/gs-common/gps/pixel/pixel_gnss_hal.mk - - -PRODUCT_PACKAGES += \ - gnssd \ - android.hardware.gnss-service \ - android.hardware.location.gps.prebuilt.xml - -PRODUCT_COPY_FILES += \ - $(GPS_ROOT)/release/ca.pem:vendor/etc/gnss/ca.pem \ - $(GPS_ROOT)/release/kepler.bin:vendor/firmware/kepler.bin - - -# factory libraries -PRODUCT_PACKAGES += \ - android.hardware.gnss@2.1-impl \ - sctd \ - spad \ - swcnd \ - libmptool_json \ - libmptool_log \ - libmptool_utils - -# factory libraries -PRODUCT_COPY_FILES += \ - $(GPS_ROOT)/release/sctd.json:vendor/etc/sctd.json \ - $(GPS_ROOT)/release/spad.json:vendor/etc/spad.json \ - $(GPS_ROOT)/release/swcnd.json:vendor/etc/swcnd.json - - -PRODUCT_SOONG_NAMESPACES += \ - $(GPS_ROOT) - -ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) - PRODUCT_COPY_FILES += \ - $(GPS_ROOT)/release/gps.cfg:vendor/etc/gnss/gps.cfg - PRODUCT_VENDOR_PROPERTIES += \ - vendor.gps.aol.enabled=true -else - PRODUCT_COPY_FILES += \ - $(GPS_ROOT)/release/gps_user.cfg:vendor/etc/gnss/gps.cfg -endif - -BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gps/brcm/sepolicy -BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gps/lsi/sepolicy diff --git a/location/gnssd/init.gnss.rc b/location/gnssd/init.gnss.rc deleted file mode 100644 index 3f311e1..0000000 --- a/location/gnssd/init.gnss.rc +++ /dev/null @@ -1,54 +0,0 @@ -on post-fs-data - mkdir /data/vendor/gps 0771 system system - mkdir /data/vendor/gps/logs 0771 gps system - mkdir /data/vendor/gps/overlay 0771 gps system - -# Directory for GPS - rm /data/system/gps/gps_started - rm /data/system/gps/glonass_started - rm /data/system/gps/beidou_started - rm /data/system/gps/smd_started - rm /data/system/gps/sv_cno.info - -# Permissions for gnss - chmod 0660 /dev/gnss_ipc - chown system system /dev/gnss_ipc - chmod 0660 /dev/gnss_dump - chown system system /dev/gnss_dump - chmod 0660 /dev/gnss_boot - chown system system /dev/gnss_boot - chmod 0660 /sys/devices/platform/gnssif/coredump - chown system system /sys/devices/platform/gnssif/coredump - -# GPS daemon -service gnssd /vendor/bin/hw/gnssd - class main - user gps - group system inet net_raw wakelock sdcard_rw - capabilities BLOCK_SUSPEND - ioprio be 0 - seclabel u:r:gnssd:s0 - -service slsi_gnss_service /vendor/bin/hw/android.hardware.gnss-service - class main - user system - group system gps - -# factory daemon -service sctd /vendor/bin/hw/sctd --json "/vendor/etc/sctd.json" - class main - user root - group root system bluetooth radio misc - #seclabel u:r:shell:s0 - -service swcnd /vendor/bin/hw/swcnd --json "/vendor/etc/swcnd.json" - class main - user root - group system bluetooth radio misc - #seclabel u:r:shell:s0 - -service spad /vendor/bin/hw/spad --json "/vendor/etc/spad.json" - class main - user root - group system bluetooth radio misc - #seclabel u:r:shell:s0 diff --git a/location/gnssd/pixel_gnss_hal.mk b/location/gnssd/pixel_gnss_hal.mk deleted file mode 100644 index 977ba47..0000000 --- a/location/gnssd/pixel_gnss_hal.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Enable aidl service -$(call soong_config_set, pixel_gnss, enable_pixel_gnss_aidl_service, true) - -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/tegu/location/gnssd/device_framework_matrix_product.xml diff --git a/location/gnssd/release/android.hardware.gnss-service b/location/gnssd/release/android.hardware.gnss-service deleted file mode 100644 index 867f055..0000000 Binary files a/location/gnssd/release/android.hardware.gnss-service and /dev/null differ diff --git a/location/gnssd/release/android.hardware.location.gps.xml b/location/gnssd/release/android.hardware.location.gps.xml deleted file mode 100644 index 3abccf3..0000000 --- a/location/gnssd/release/android.hardware.location.gps.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - diff --git a/location/gnssd/release/android_hardware_gnss_2_1-impl.so b/location/gnssd/release/android_hardware_gnss_2_1-impl.so deleted file mode 100755 index 94c30a9..0000000 Binary files a/location/gnssd/release/android_hardware_gnss_2_1-impl.so and /dev/null differ diff --git a/location/gnssd/release/gnssd b/location/gnssd/release/gnssd deleted file mode 100644 index 20cc957..0000000 Binary files a/location/gnssd/release/gnssd and /dev/null differ diff --git a/location/gnssd/release/kepler.bin b/location/gnssd/release/kepler.bin deleted file mode 100644 index 971378c..0000000 Binary files a/location/gnssd/release/kepler.bin and /dev/null differ diff --git a/location/gnssd/release/libmptool_json.so b/location/gnssd/release/libmptool_json.so deleted file mode 100644 index d60c5dd..0000000 Binary files a/location/gnssd/release/libmptool_json.so and /dev/null differ diff --git a/location/gnssd/release/libmptool_log.so b/location/gnssd/release/libmptool_log.so deleted file mode 100644 index f42109d..0000000 Binary files a/location/gnssd/release/libmptool_log.so and /dev/null differ diff --git a/location/gnssd/release/libmptool_utils.so b/location/gnssd/release/libmptool_utils.so deleted file mode 100644 index f3da93c..0000000 Binary files a/location/gnssd/release/libmptool_utils.so and /dev/null differ diff --git a/location/gnssd/release/sctd b/location/gnssd/release/sctd deleted file mode 100644 index c27cb7d..0000000 Binary files a/location/gnssd/release/sctd and /dev/null differ diff --git a/location/gnssd/release/sctd.json b/location/gnssd/release/sctd.json deleted file mode 100644 index 6f3f933..0000000 --- a/location/gnssd/release/sctd.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "console" : { - "uart" : { - "support" : false, - "active" : true, - "route" : "/dev/ttySAC0" - }, - "usb" : { - "support" : true, - "active" : {"persist.vendor.config.ttygs0" : 1}, - "route" : "/dev/ttyGS0", - "timeout" : 0 - }, - "tcp" : { - "support" : true, - "active" : true, - "route" : "127.0.0.1", - "port" : 7727 - }, - "local" : { - "support" : true, - "active" : true, - "route" : "/dev/socket/sctd", - "timeout" : 20 - } - }, - "receive-mode" : { - "mode" : "tail", - "tail" : "0d0a", - "millisecond" : "100" - }, - "module" : { - "support-modules" : [ - "sctd", - "pcba", - "wcn" - ], - "test-commands" : { - "pcba" : [ - "SAT" - ] - }, - "interaction" : { - "pcba" : { - "timeout" : 15, - "keep-alive" : false, - "path" : "/dev/socket/sync_spad" - }, - "wcn" : { - "timeout" : 20, - "keep-alive" : true, - "path" : "/dev/socket/sync_wcn" - } - }, - "whitelist" : { - "sctd" : [ - "SAT+TCP", - "SAT+USB", - "SAT+UART", - "SAT+IP", - "SAT+PORT", - "SAT+UPDATE" - ], - "pcba" : [ - "SAT+TIMEOUT", - "SAT+REBOOT", - "SAT+WIFI", - "SAT+BT" - ], - "wcn" : [ - "RF+AP2WB", - "RF+WB2AP", - "AT+WIFIRF", - "ATA+WIFI", - "AT+BTRF", - "ATA+BT", - "AT+GPSFTTEST", - "AT+SPITEST", - "ATA+GPS", - "SAT+WCNTCP", - "SAT+WCNTCPIP", - "SAT+WCNTCPPORT", - "SAT+WCNSETTIME" - ] - } - } -} - diff --git a/location/gnssd/release/spad b/location/gnssd/release/spad deleted file mode 100644 index a0791ea..0000000 Binary files a/location/gnssd/release/spad and /dev/null differ diff --git a/location/gnssd/release/spad.json b/location/gnssd/release/spad.json deleted file mode 100644 index ee97a4c..0000000 --- a/location/gnssd/release/spad.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "misc" : { - "libpath" : "/vendor/lib64/libmphal_default.so", - "default_timeout" : 15, - "support" : true - } -} - diff --git a/location/gnssd/release/swcnd b/location/gnssd/release/swcnd deleted file mode 100644 index 4578fca..0000000 Binary files a/location/gnssd/release/swcnd and /dev/null differ diff --git a/location/gnssd/release/swcnd.json b/location/gnssd/release/swcnd.json deleted file mode 100644 index 31e049b..0000000 --- a/location/gnssd/release/swcnd.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "console" : { - "tcp" : { - "support" : true, - "active" : false, - "ip" : "", - "port" : "2543" - }, - "local" : { - "support" : true, - "active" : true, - "ip" : "/dev/socket/sync_wcn" - } - }, - "module" : { - "interaction" : { - "wlan&bt" : { - "libpath" : "/vendor/lib64/libwlbt.so", - "support" : true, - "timeout" : 15 - }, - "gnss" : { - "libpath" : "/vendor/lib64/hw/android.hardware.gnss@2.1-impl.so", - "timeout" : 15, - "support" : true - } - }, - - "whitelist" : { - "wlan&bt" : [ - "RF+AP2WB", - "RF+WB2AP", - "AT+BTRF", - "ATA+BT", - "AT+WIFIRF", - "ATA+WIFI" - ], - "gnss" : [ - "AT+GPSFTTEST", - "AT+SPITEST", - "ATA+GPS" - ], - "internal" : [ - "SAT+WCNTCP", - "SAT+WCNTCPIP", - "SAT+WCNTCPPORT", - "SAT+WCNSETTIME" - ] - } - } -} - diff --git a/location/gnssd/release/gps.cfg b/location/gps.cfg similarity index 100% rename from location/gnssd/release/gps.cfg rename to location/gps.cfg diff --git a/location/gnssd/release/gps_user.cfg b/location/gps_user.cfg similarity index 100% rename from location/gnssd/release/gps_user.cfg rename to location/gps_user.cfg