diff --git a/device-tegu.mk b/device-tegu.mk
index c325bb3..c7e17ef 100644
--- a/device-tegu.mk
+++ b/device-tegu.mk
@@ -194,24 +194,7 @@ PRODUCT_SOONG_NAMESPACES += \
device/google/tegu/uwb
# Location
-# SDK build system
-$(call soong_config_set, include_libsitril-gps-wifi, board_without_radio, $(BOARD_WITHOUT_RADIO))
-include device/google/gs-common/gps/brcm/device.mk
-
-PRODUCT_COPY_FILES += \
- device/google/tegu/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
-
-ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
- PRODUCT_COPY_FILES += \
- device/google/tegu/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
- device/google/tegu/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
- device/google/tegu/location/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
-else
- PRODUCT_COPY_FILES += \
- device/google/tegu/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
- device/google/tegu/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
- device/google/tegu/location/gps_user.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
-endif
+include device/google/tegu/location/gnssd/device-gnss.mk
# Set zram size
PRODUCT_VENDOR_PROPERTIES += \
diff --git a/location/gnssd/Android.bp b/location/gnssd/Android.bp
new file mode 100644
index 0000000..e1e97dc
--- /dev/null
+++ b/location/gnssd/Android.bp
@@ -0,0 +1,316 @@
+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,
+ vintf_fragments: ["android.hardware.gnss@lassen.xml"],
+ init_rc: ["init.gnss.rc"],
+}
+
+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",
+ ],
+ },
+ },
+ compile_multilib: "64",
+ vendor: true,
+ relative_install_path: "hw",
+ strip: {
+ none: true,
+ },
+ // Bypass because libsitril-gps is Android.mk module
+ check_elf_files: false,
+}
+
+// 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,
+ //vintf_fragments: ["android.hardware.gnss@2.1-service-lass.xml"]
+}
+
+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,
+ //vintf_fragments: ["android.hardware.gnss@2.1-service-lass.xml"]
+}
+
+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,
+ //vintf_fragments: ["android.hardware.gnss@2.1-service-lass.xml"]
+}
+
+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,
+ //vintf_fragments: ["android.hardware.gnss@2.1-service-lass.xml"]
+}
diff --git a/location/gnssd/android.hardware.gnss@lassen.xml b/location/gnssd/android.hardware.gnss@lassen.xml
new file mode 100644
index 0000000..8d06407
--- /dev/null
+++ b/location/gnssd/android.hardware.gnss@lassen.xml
@@ -0,0 +1,7 @@
+
+
+ android.hardware.gnss
+ 3
+ IGnss/default
+
+
diff --git a/location/gnssd/device-gnss.mk b/location/gnssd/device-gnss.mk
new file mode 100644
index 0000000..b793004
--- /dev/null
+++ b/location/gnssd/device-gnss.mk
@@ -0,0 +1,2 @@
+$(call inherit-product-if-exists, device/google/tegu/location/gnssd/gnss_release.mk)
+
diff --git a/location/gnssd/gnss_release.mk b/location/gnssd/gnss_release.mk
new file mode 100644
index 0000000..70198d4
--- /dev/null
+++ b/location/gnssd/gnss_release.mk
@@ -0,0 +1,27 @@
+# only GPS libraries and binaries to the target directory
+GPS_ROOT := device/google/tegu/location/gnssd
+
+PRODUCT_PACKAGES += \
+ android.hardware.gnss@2.1-impl \
+ gnssd \
+ sctd \
+ spad \
+ swcnd \
+ libmptool_json \
+ libmptool_log \
+ libmptool_utils \
+ gnss-aidl-service_IGnssV2_ISlsiGnssV1 \
+ 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/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)
+
+PRODUCT_COPY_FILES += \
+ $(GPS_ROOT)/release/gps.cfg:vendor/etc/gnss/gps.cfg
diff --git a/location/gnssd/init.gnss.rc b/location/gnssd/init.gnss.rc
new file mode 100644
index 0000000..1ead72a
--- /dev/null
+++ b/location/gnssd/init.gnss.rc
@@ -0,0 +1,52 @@
+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
+
+# 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/release/android.hardware.gnss-service b/location/gnssd/release/android.hardware.gnss-service
new file mode 100644
index 0000000..4790fd7
Binary files /dev/null and b/location/gnssd/release/android.hardware.gnss-service differ
diff --git a/location/gnssd/release/android.hardware.location.gps.xml b/location/gnssd/release/android.hardware.location.gps.xml
new file mode 100644
index 0000000..3abccf3
--- /dev/null
+++ b/location/gnssd/release/android.hardware.location.gps.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/location/gnssd/release/android_hardware_gnss_2_1-impl.so b/location/gnssd/release/android_hardware_gnss_2_1-impl.so
new file mode 100755
index 0000000..94c30a9
Binary files /dev/null and b/location/gnssd/release/android_hardware_gnss_2_1-impl.so differ
diff --git a/location/gps.cer b/location/gnssd/release/ca.pem
similarity index 100%
rename from location/gps.cer
rename to location/gnssd/release/ca.pem
diff --git a/location/gnssd/release/gnssd b/location/gnssd/release/gnssd
new file mode 100644
index 0000000..88fe6d7
Binary files /dev/null and b/location/gnssd/release/gnssd differ
diff --git a/location/gnssd/release/gps.cfg b/location/gnssd/release/gps.cfg
new file mode 100644
index 0000000..99b9fa0
--- /dev/null
+++ b/location/gnssd/release/gps.cfg
@@ -0,0 +1,206 @@
+############################################
+GlueLayer_ToolConfigSelection=3
+user_ports_tcp_name=Autotest
+user_ports_tcp_port=7555
+debug_console=1
+debug_dir=/data/vendor/gps/logs
+############################################
+GlueLayer_IsGedKeyExist=1
+GlueLayer_isForceIPV6=0
+GlueLayer_EnableGnssCfgInterface=1
+debug_enable=1
+
+uni_log_max_file_count=5
+uni_log_max_size_mb=20
+uni_log_total_max_size_mb=100
+
+gnss_device_type=K041
+
+# send debug req on MCW oddity
+#Chip_Configuration_Io_Options=0x85
+
+# borrow this field to force CP crash on GAL bad ISM
+#Chip_Configuration_WT1=1
+
+# Chip_Configuration_TrackerDebugMode = 0x10
+
+# enables CHPP for SPI port
+# uncomment the *chpp* lines below (and comment gnss_device-data_port_kepslim_present above) to use SPI+CHPP
+# when using CHPP, make sure to enable the CHPP defines in build_settings.mak
+chpp_betp_client=1
+chpp_log_level=2
+gnss_device_data_port_chpp_spi_device=/dev/gnss_ipc
+gnss_device_data_port_chpp_present=1
+
+### Update for VTS ###
+GlueLayer_YearOfHW=2023
+scheduling_enabled=1
+
+### temporarily disable precise time aiding ###
+Chip_Configuration_AidingConfiguration=0x00020046
+
+# set shared reference clock for freq aiding (0x20)
+# enable dcxo (0x04)
+Chip_Configuration_RefClkControl=0x24
+
+### Override for DCXO Cnom/TuneValue
+#Chip_Configuration_DCXOtuneValue=3200
+
+### DCXO Optional Parameters. #####
+# Can specify Crystal type, and/or over-ride T0-inflection point ####
+#
+# Optionally specify DXCO Crystal type, and operation mode
+# 8 bits. Lower 4 bits Crystal ID# (0-15)
+# Upper 4 bits Poly Configuration: (0/1)
+# Poly Configuration: 0: Use CP's poly, 1: Force use of default manufactures polynomial
+### Crystal Types:
+## 0 - Unknown/Default
+## 1 - Kyocera CT1612RB
+## 2 - NDK NX1612SD CS12311
+## 3 - NDK NX1612SD CS13950
+## 4 - NDK NX1612SD CS15298
+## 5 - KDS 7CG07680A10
+## 6- TXC 0W76870003
+## E.g. Use Kyocera, and ignore CP's polynomial: DCXO_CrystalType=0x11
+## E.g. Use KDS, and Use CP's polynomial: DCXO_CrystalType=0x05
+Chip_Configuration_DCXO_CrystalType=0x11
+
+## Optionally specify DXCO Inflection point temperature, ####
+# This will override any default value or value in Crystal type ####
+# Value is degrees C x 100 E.g. 2855 = 28.55 deg C
+# Range should be 2000 to 3100
+#Chip_Configuration_DCXO_InflectionPoint=2855
+
+# disable spam dog to avoid loss of position request
+spam_dog_ms=0
+# disable HW watchdog
+Chip_Configuration_WatchdogPeriod = 0
+
+# GPS= 0x0001 GLO= 0x0002 GALILEO=0x0004 BEIDOU=0x0008 SBAS=0x0010 QZSS=0x0020
+# MEMS Static Detect=0x4000 MEMS Heading=0x2000
+### 2C48 L1 only MCW ###
+Chip_Configuration_GNSSConstConstraintDef=0x603F
+Chip_Configuration_RfMiscCtrl=0x80008001
+
+# DVS: 0 = Disabled (default), 1 = Enabled
+# DFS: 0 = Disabled (default), 1 = Enabled
+# JJM: disabling due to suspicion that DVFS is contributing to GAL BAD ISM
+Chip_Configuration_FeatureCfg_DVS = 1
+Chip_Configuration_FeatureCfg_DFS = 1
+
+# This is a bitfield that will disable incoming interrupts for mailboxes
+# AP = 0x1
+# APM = 0x2
+# CP = 0x4
+# CHUB = 0x8
+# The CHUB on the neus continually triggers a bit so this is to prevent
+# it from continually waking the gnss.
+mailboxDisabled=0x8
+
+### Specify RFIC ID for K40 ###
+# 55200001 = S5520 EVT1
+gnss_rfic_chip_id=55200001
+
+# Uncomment to Disable SUPL
+#Aiding_AidingType=0
+# Uncomment to Disable SUPL (Ignore Android Framework Requests to Enable SUPL)
+#GlueLayer_EnableFwConfiguration=0
+
+#Uncomment to disable SGEE
+#Sif_OperationMode=0
+
+# Enables RTC time aiding from Host
+# 1 - enable, 0 - disable (default)
+UseRtcForAiding=1
+
+# Min number of prior fixes needed for RTC time aiding
+rtc_min_num_of_fixes=10
+
+# increase rtc uncertainty from Host to hedge against bad fixes
+additional_rtc_uncertainty_ms=10
+
+# set to 1 for FW SGEE download - Requires Android FW to be properly configured
+Sif_UseFwXtraInterface=0
+
+# Low power configurations
+# ACT C/No loss limit: 0dB to 15dB (0 = ACT is disabled by default) 3dB = 50% Duty Cycle, 6dB = 25% Duty Cycle, 9dB = 12.5% Duty Cycle
+Chip_Configuration_FeatureCfg_ACT = 5
+
+ChipCfg_DspMemdumpEnable=1
+
+GNSS_CARRIER_CONFIG_BEGIN
+# DEFAULT
+GNSS_CARRIER_ID=0
+ENABLE_2G_CP_CAPS_MSA=1
+ENABLE_2G_CP_CAPS_MSB=1
+ENABLE_3G_CP_CAPS_MSA=1
+ENABLE_3G_CP_CAPS_MSB=1
+ENABLE_4G_CP_CAPS_MSA=1
+ENABLE_4G_CP_CAPS_MSB=1
+ENABLE_5G_CP_CAPS_MSA=1
+ENABLE_5G_CP_CAPS_MSB=1
+ENABLE_2G_UP_CAPS_MSA=1
+ENABLE_2G_UP_CAPS_MSB=1
+ENABLE_3G_UP_CAPS_MSA=1
+ENABLE_3G_UP_CAPS_MSB=1
+ENABLE_4G_UP_CAPS_MSA=1
+ENABLE_4G_UP_CAPS_MSB=1
+ENABLE_5G_UP_CAPS_MSA=0
+ENABLE_5G_UP_CAPS_MSB=0
+SUPL_UT2_SEC=20
+SUPL_UT3_SEC=20
+ENABLE_LPP_CP=1
+ENABLE_LPP_UP=0
+ENABLE_LPPE_CP=3
+ENABLE_LPPE_UP=0
+# ATT
+GNSS_CARRIER_ID=1
+# TMO
+GNSS_CARRIER_ID=2
+ENABLE_3G_CP_CAPS_MSA=0
+ENABLE_4G_CP_CAPS_MSA=0
+# VZW
+GNSS_CARRIER_ID=3
+ENABLE_LPP_UP=1
+ENABLE_LPPE_UP=3
+# VISIBLE
+GNSS_CARRIER_ID=4
+ENABLE_LPP_UP=1
+ENABLE_LPPE_UP=3
+# AIRTEL
+GNSS_CARRIER_ID=5
+# RAKUTEN
+GNSS_CARRIER_ID=6
+ENABLE_LPP_UP=1
+ENABLE_LPPE_UP=3
+# KDDI
+GNSS_CARRIER_ID=7
+ENABLE_LPP_CP=0
+ENABLE_LPP_UP=1
+ENABLE_LPPE_CP=0
+ENABLE_LPPE_UP=3
+# SBM
+GNSS_CARRIER_ID=8
+ENABLE_LPP_CP=0
+ENABLE_LPP_UP=0
+ENABLE_LPPE_CP=0
+ENABLE_LPPE_UP=0
+ENABLE_5G_CP_CAPS_MSA=0
+ENABLE_5G_CP_CAPS_MSB=0
+GNSS_CARRIER_CONFIG_END
+
+bdsUsedInUSPolicy=2
+sbasUsedInUSPolicy=2
+qzssUsedInUSPolicy=2
+navicUsedInUSPolicy=2
+
+Chip_Configuration_FeatureCfg_ANDRD_MEAS_CORR_ENABLE=1
+GlueLayer_MeasCorrCap=7
+
+RfPathLossDb_Ap=3.5
+RfPathLossDb_Cp=3.5
+
+Agnss_SuplUseCpNi=1
+PosReq_Supl2Params_SuplNiUdpPort=7275
+
+NmeaBitmask=0x010003fff
diff --git a/location/gnssd/release/libmptool_json.so b/location/gnssd/release/libmptool_json.so
new file mode 100644
index 0000000..d60c5dd
Binary files /dev/null and b/location/gnssd/release/libmptool_json.so differ
diff --git a/location/gnssd/release/libmptool_log.so b/location/gnssd/release/libmptool_log.so
new file mode 100644
index 0000000..f42109d
Binary files /dev/null and b/location/gnssd/release/libmptool_log.so differ
diff --git a/location/gnssd/release/libmptool_utils.so b/location/gnssd/release/libmptool_utils.so
new file mode 100644
index 0000000..f3da93c
Binary files /dev/null and b/location/gnssd/release/libmptool_utils.so differ
diff --git a/location/gnssd/release/sctd b/location/gnssd/release/sctd
new file mode 100644
index 0000000..c27cb7d
Binary files /dev/null and b/location/gnssd/release/sctd differ
diff --git a/location/gnssd/release/sctd.json b/location/gnssd/release/sctd.json
new file mode 100644
index 0000000..6f3f933
--- /dev/null
+++ b/location/gnssd/release/sctd.json
@@ -0,0 +1,88 @@
+{
+ "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
new file mode 100644
index 0000000..a0791ea
Binary files /dev/null and b/location/gnssd/release/spad differ
diff --git a/location/gnssd/release/spad.json b/location/gnssd/release/spad.json
new file mode 100644
index 0000000..ee97a4c
--- /dev/null
+++ b/location/gnssd/release/spad.json
@@ -0,0 +1,8 @@
+{
+ "misc" : {
+ "libpath" : "/vendor/lib64/libmphal_default.so",
+ "default_timeout" : 15,
+ "support" : true
+ }
+}
+
diff --git a/location/gnssd/release/swcnd b/location/gnssd/release/swcnd
new file mode 100644
index 0000000..4578fca
Binary files /dev/null and b/location/gnssd/release/swcnd differ
diff --git a/location/gnssd/release/swcnd.json b/location/gnssd/release/swcnd.json
new file mode 100644
index 0000000..31e049b
--- /dev/null
+++ b/location/gnssd/release/swcnd.json
@@ -0,0 +1,52 @@
+{
+ "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/gps.xml b/location/gps.xml
deleted file mode 100644
index 8955883..0000000
--- a/location/gps.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/location/gps.xml.hk3 b/location/gps.xml.hk3
deleted file mode 100644
index e2404a3..0000000
--- a/location/gps.xml.hk3
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/location/gps.xml.sb3 b/location/gps.xml.sb3
deleted file mode 100644
index a2c9baf..0000000
--- a/location/gps.xml.sb3
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/location/gps_user.xml b/location/gps_user.xml
deleted file mode 100644
index 713c43b..0000000
--- a/location/gps_user.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/location/gps_user.xml.hk3 b/location/gps_user.xml.hk3
deleted file mode 100644
index 015ea13..0000000
--- a/location/gps_user.xml.hk3
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/location/gps_user.xml.sb3 b/location/gps_user.xml.sb3
deleted file mode 100644
index f12eecc..0000000
--- a/location/gps_user.xml.sb3
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/location/lhd.conf b/location/lhd.conf
deleted file mode 100644
index c430b93..0000000
--- a/location/lhd.conf
+++ /dev/null
@@ -1,33 +0,0 @@
-LheName=bbd
-
-LheRsmResetTimeoutMS=10000
-GpioNStdbyPath=/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby
-
-LhePatch=/vendor/firmware/SensorHub.patch
-Lhe477xDebugFlags=RPC:FACILITY=65535-dKP+CUST+LHE:STDOUT_PUTS:STDOUT_LOG
-LheConsole=/data/vendor/gps/LheConsole
-
-LogEnabled=true
-Log=JAVA
-LogDirectory=/sdcard/gps/broadcom/storage
-
-LheBbdPacket=/dev/ttyBCM
-
-LheBbdControl=/dev/bbd_control
-
-# LheBbdSensor=/dev/bbd_sensor
-
-LheFailSafe=/data/vendor/gps/logs/esw-crash-dump.txt
-LogLevel=*:I
-
-NvStorageDir=/data/vendor/gps/
-
-# Enable BBD debugging at these stages:
-# LheDriverDebugFlags=PATCH_BBD:LHE_BBD:FSC_BBD
-
-LheAutoBaudDelayMS=10
-TrafficLogEnabled=false
-SecondaryConfigPath=/data/vendor/gps/overlay/lhd_overlay.conf
-
-SkipSensorWakeLock=true
-LoggerWakeLockEnable=false
diff --git a/location/lhd_user.conf b/location/lhd_user.conf
deleted file mode 100644
index 73e03bc..0000000
--- a/location/lhd_user.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-LheName=bbd
-
-LheRsmResetTimeoutMS=10000
-GpioNStdbyPath=/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby
-
-LhePatch=/vendor/firmware/SensorHub.patch
-Lhe477xDebugFlags=RPC:FACILITY=65535-dKP+CUST+LHE:STDOUT_PUTS:STDOUT_LOG
-# LheConsole=/data/vendor/gps/LheConsole
-
-LogEnabled=false
-Log=JAVA
-LogDirectory=/sdcard/gps/broadcom/storage
-
-LheBbdPacket=/dev/ttyBCM
-
-LheBbdControl=/dev/bbd_control
-
-# LheBbdSensor=/dev/bbd_sensor
-
-# LheFailSafe=/data/vendor/gps/esw-crash-dump.txt
-
-NvStorageDir=/data/vendor/gps/
-
-# Enable BBD debugging at these stages:
-# LheDriverDebugFlags=PATCH_BBD:LHE_BBD:FSC_BBD
-
-LheAutoBaudDelayMS=10
-TrafficLogEnabled=false
-
-SkipSensorWakeLock=true
-LoggerWakeLockEnable=false
diff --git a/location/scd.conf b/location/scd.conf
deleted file mode 100644
index 43f9cd2..0000000
--- a/location/scd.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-LogEnabled=true
-Log=JAVA
-LogDirectory=/sdcard/gps/broadcom/storage
-NvStorageDir=/data/vendor/gps/
-TcpConnectionTimeout=20
-SecondaryConfigPath=/data/vendor/gps/overlay/scd_overlay.conf
diff --git a/location/scd_user.conf b/location/scd_user.conf
deleted file mode 100644
index e75f209..0000000
--- a/location/scd_user.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-LogEnabled=false
-Log=JAVA
-LogDirectory=/sdcard/gps/broadcom/storage
-NvStorageDir=/data/vendor/gps/
-TcpConnectionTimeout=20