diff --git a/device-akita.mk b/device-akita.mk
index 3ff5cb2..ea077e4 100644
--- a/device-akita.mk
+++ b/device-akita.mk
@@ -338,7 +338,7 @@ PRODUCT_PACKAGES += \
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/akita/prebuilts
# include GNSSD
-include device/google/akita/location/gnssd/device-gnss.mk
+include device/google/akita/location/device-gnss.mk
# Set zram size
PRODUCT_VENDOR_PROPERTIES += \
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..916c549
--- /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/akita/location/ca.pem:vendor/etc/gnss/ca.pem
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+ PRODUCT_COPY_FILES += \
+ device/google/akita/location/gps.cfg:vendor/etc/gnss/gps.cfg
+ PRODUCT_VENDOR_PROPERTIES += \
+ vendor.gps.aol.enabled=true
+else
+ PRODUCT_COPY_FILES += \
+ device/google/akita/location/gps_user.cfg:vendor/etc/gnss/gps.cfg
+endif
+
+# include pixel gnss hal service
+-include vendor/google_devices/gs-common/proprietary/gps/pixel_gnss_hal.mk
diff --git a/location/factory-gnss.mk b/location/factory-gnss.mk
new file mode 100644
index 0000000..d9c2b88
--- /dev/null
+++ b/location/factory-gnss.mk
@@ -0,0 +1,2 @@
+# include factory gnss binaries
+-include vendor/samsung_slsi/gps/s5300/gnss_factory.mk
diff --git a/location/gnssd/Android.bp b/location/gnssd/Android.bp
deleted file mode 100644
index f7fb192..0000000
--- a/location/gnssd/Android.bp
+++ /dev/null
@@ -1,88 +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,
- 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,
- required: [
- "libcustomgnss",
- "libsighandler",
- ],
-}
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 9f0e349..0000000
--- a/location/gnssd/device-gnss.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-$(call inherit-product-if-exists, device/google/akita/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 3e606fb..0000000
--- a/location/gnssd/gnss_release.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# Enable coredump funtcion for all the ROM.
-$(call soong_config_set_bool,sighandler,coredump,true)
-# Enable pixel gnss hal service
--include vendor/google/gnss/aidl_service/pixel_gnss_hal.mk
-
-PRODUCT_PACKAGES += \
- gnssd \
- android.hardware.gnss-service \
- android.hardware.location.gps.prebuilt.xml
-
-PRODUCT_COPY_FILES += \
- device/google/akita/location/gnssd/release/ca.pem:vendor/etc/gnss/ca.pem \
- device/google/akita/location/gnssd/release/kepler.bin:vendor/firmware/kepler.bin
-
-PRODUCT_SOONG_NAMESPACES += \
- device/google/akita/location/gnssd
-
-ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
- PRODUCT_COPY_FILES += \
- device/google/akita/location/gnssd/release/gps.cfg:vendor/etc/gnss/gps.cfg
- PRODUCT_VENDOR_PROPERTIES += \
- vendor.gps.aol.enabled=true
-else
- PRODUCT_COPY_FILES += \
- device/google/akita/location/gnssd/release/gps_user.cfg:vendor/etc/gnss/gps.cfg
-endif
diff --git a/location/gnssd/init.gnss.rc b/location/gnssd/init.gnss.rc
deleted file mode 100644
index accee2f..0000000
--- a/location/gnssd/init.gnss.rc
+++ /dev/null
@@ -1,36 +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 0777 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
-
diff --git a/location/gnssd/release/android.hardware.gnss-service b/location/gnssd/release/android.hardware.gnss-service
deleted file mode 100644
index 35eed54..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/build.properties b/location/gnssd/release/build.properties
deleted file mode 100644
index d9e713e..0000000
--- a/location/gnssd/release/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-BUILD_TIMESTAMP_UTC=2024-12-02 20:55:44.202302
-USER_COMMIT=b6b33124ee635ea551601e3d5fb9bd0958c2bb21
-BASE_COMMIT=f40f31115750f412c4860692772ef6b0b4141105
-GNSS_SW_VER_BRANCH=R4.13
-GNSS_SW_VER_STRING=4.13.2_28_Release_248164
-WORD_SIZE=arm64
-ANDROID_VERSION=34
diff --git a/location/gnssd/release/gnssd b/location/gnssd/release/gnssd
deleted file mode 100644
index 1c88321..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 77f7ab4..0000000
Binary files a/location/gnssd/release/kepler.bin and /dev/null differ
diff --git a/location/gnssd/release/gps.cfg b/location/gps.cfg
similarity index 81%
rename from location/gnssd/release/gps.cfg
rename to location/gps.cfg
index 2a3bbcf..747b927 100644
--- a/location/gnssd/release/gps.cfg
+++ b/location/gps.cfg
@@ -1,6 +1,6 @@
############################################
GlueLayer_ToolConfigSelection=3
-debug_console=1
+debug_console=0
debug_enable=4
mem_dump_to_node=1
force_instant_logging=0
@@ -10,11 +10,11 @@ debug_dir=/data/vendor/gps/logs
############################################
GlueLayer_IsGedKeyExist=1
GlueLayer_EnableGnssCfgInterface=1
+GlueLayer_IsUseCustomGnssLib=1
-
-uni_log_max_file_count=5
+uni_log_max_file_count=15
uni_log_max_size_mb=20
-uni_log_total_max_size_mb=100
+uni_log_total_max_size_mb=300
# to enable ism stream for GAAM
ism_stream_enable=1
@@ -24,12 +24,25 @@ gnss_device_type=K041
gnss_device_patch_address=0
gnss_device_patch_file=/vendor/firmware/kepler.bin
+# 1pps timemark output: 0: disable 1: enable
+ChipCfg_Timemark_Option=0
+
+# Enable/Disable 1PPS Time Sync policy
+Is1PPSTimeSyncEnable=0
+
# send debug req on MCW oddity
#Chip_Configuration_Io_Options=0x85
# Disable dynamic HSI
Chip_Configuration_Dynamic_HSI=0
+# Set UBSAN to operate on logging mode on FW
+# 0: disable 1: crash mode 2: logging mode
+Chip_Configuration_ubsan_opt=2
+
+# MCW Link failure behavior: 0 = SW Assert (default), 1 = GNSS restart (hot start)
+Chip_Configuration_FeatureCfg_SDL_BYASS=1
+
# borrow this field to force CP crash on GAL bad ISM
#Chip_Configuration_WT1=1
@@ -100,11 +113,15 @@ Chip_Configuration_WatchdogPeriod = 0
Chip_Configuration_GNSSConstConstraintDef=0x602F
Chip_Configuration_RfMiscCtrl=0x80008001
-# Disable BDS in the U.S.
-bdsUsedInUSPolicy=2
-sbasUsedInUSPolicy=2
-qzssUsedInUSPolicy=2
-navicUsedInUSPolicy=2
+# Certain constellation permission overriding LocTech config setting: only to possibly
+# disallow constellations allowed in LocTech, not vice versa. Note: GPS and GAL are
+# allowed in all markets so no such overriding.
+# 0: not to override (default), 1-disabled, 2- disabled if in US
+#gloUsedPolicy=2
+bdsUsedPolicy=2
+sbasUsedPolicy=2
+qzssUsedPolicy=2
+navicUsedPolicy=2
# DVS: 0 = Disabled (default), 1 = Enabled
# DFS: 0 = Disabled (default), 1 = Enabled
@@ -144,6 +161,9 @@ rtc_min_num_of_fixes=10
# increase rtc uncertainty from Host to hedge against bad fixes
additional_rtc_uncertainty_ms=10
+# debug output time interval for LAL metrics logging (0 means disable)
+lal_metrics_interval_ms=0
+
# set to 1 for FW SGEE download - Requires Android FW to be properly configured
Sif_UseFwXtraInterface=1
@@ -151,10 +171,29 @@ Sif_UseFwXtraInterface=1
# 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
+# GNSS power value
+SingleBandAcq=379
+MultiBandAcq=5
+SingleBandFullTrkNm=341
+SingleBandFullTrkUd=306
+MultiBandFullTrkNm=5
+MultiBandFullTrkUd=5
+SingleBandDutyCycleTrkNm=313
+SingleBandDutyCycleTrkUd=271
+MultiBandDutyCycleTrkNm=5
+MultiBandDutyCycleTrkUd=5
+SingleBandVddGnssNmTrk=73
+MultiBandVddGnssNmTrk=5
+SingleBandVddGnssUdTrk=36
+MultiBandVddGnssUdTrk=5
+
ChipCfg_DspMemdumpEnable=1
-Agnss_IsGloAidingEnable=0
+Agnss_IsGloAidingEnable=1
+Agnss_IsGalAidingEnable=1
+Agnss_IsBdsAidingEnable=1
Agnss_SuplUseCpNi=1
+Agnss_SuplAidIntvlCrossSess=1
SETCaps_IsOtdoa=1
SETCaps_IsLpp=1
SETCaps_SuplUT1=20
@@ -216,6 +255,7 @@ ENABLE_LPP_CP=1
ENABLE_LPP_UP=0
ENABLE_LPPE_CP=3
ENABLE_LPPE_UP=0
+ENABLE_NLP_ALONG_WITH_UBP=0
ENABLE_NLP_IN_LPPE=1
ENABLE_NLP_IN_AGNSS=0
ENABLE_LPP_HA_GAD_SHAPE=0
@@ -248,10 +288,14 @@ ENABLE_LPP_UP=1
ENABLE_LPPE_UP=3
# KDDI
GNSS_CARRIER_ID=6
+ENABLE_CAPS_OTDOA=0
ENABLE_LPP_CP=0
ENABLE_LPP_UP=1
ENABLE_LPPE_CP=0
ENABLE_LPPE_UP=3
+ENABLE_2G_UP_CAPS_MSA=0
+ENABLE_3G_UP_CAPS_MSA=0
+ENABLE_4G_UP_CAPS_MSA=0
# SBM
GNSS_CARRIER_ID=7
ENABLE_LPP_CP=0
@@ -265,4 +309,8 @@ GNSS_CARRIER_ID=8
GNSS_CARRIER_ID=9
ENABLE_LPP_UP=1
ENABLE_LPPE_UP=3
+# TELUS
+GNSS_CARRIER_ID=10
+ENABLE_5G_CP_CAPS_MSA=0
+ENABLE_5G_CP_CAPS_MSB=0
GNSS_CARRIER_CONFIG_END
diff --git a/location/gnssd/release/gps_user.cfg b/location/gps_user.cfg
similarity index 79%
rename from location/gnssd/release/gps_user.cfg
rename to location/gps_user.cfg
index 7366ef2..c2eb5e8 100644
--- a/location/gnssd/release/gps_user.cfg
+++ b/location/gps_user.cfg
@@ -1,15 +1,20 @@
GlueLayer_ToolConfigSelection=3
debug_console=0
debug_enable=0
-mem_dump_to_node=1
+mem_dump_to_node=0
GlueLayer_IsGedKeyExist=1
GlueLayer_EnableGnssCfgInterface=1
+GlueLayer_IsUseCustomGnssLib=1
ism_stream_enable=1
caplay_port_tcp_port=@GNSS_ISM_CAPTURE_PLAYBACK
gnss_device_type=K041
gnss_device_patch_address=0
gnss_device_patch_file=/vendor/firmware/kepler.bin
+ChipCfg_Timemark_Option=0
+Is1PPSTimeSyncEnable=0
Chip_Configuration_Dynamic_HSI=0
+Chip_Configuration_ubsan_opt=2
+Chip_Configuration_FeatureCfg_SDL_BYASS=1
GlueLayer_IsPlatformRefTimeEnable=1
chpp_betp_client=1
chpp_log_level=0
@@ -28,10 +33,10 @@ spam_dog_ms=0
Chip_Configuration_WatchdogPeriod = 0
Chip_Configuration_GNSSConstConstraintDef=0x602F
Chip_Configuration_RfMiscCtrl=0x80008001
-bdsUsedInUSPolicy=2
-sbasUsedInUSPolicy=2
-qzssUsedInUSPolicy=2
-navicUsedInUSPolicy=2
+bdsUsedPolicy=2
+sbasUsedPolicy=2
+qzssUsedPolicy=2
+navicUsedPolicy=2
Chip_Configuration_FeatureCfg_DVS = 1
Chip_Configuration_FeatureCfg_DFS = 1
Chip_Configuration_FeatureCfg_MTPL = 0
@@ -40,11 +45,29 @@ gnss_rfic_chip_id=55200001
UseRtcForAiding=1
rtc_min_num_of_fixes=10
additional_rtc_uncertainty_ms=10
+lal_metrics_interval_ms=0
Sif_UseFwXtraInterface=1
Chip_Configuration_FeatureCfg_ACT = 5
+SingleBandAcq=379
+MultiBandAcq=5
+SingleBandFullTrkNm=341
+SingleBandFullTrkUd=306
+MultiBandFullTrkNm=5
+MultiBandFullTrkUd=5
+SingleBandDutyCycleTrkNm=313
+SingleBandDutyCycleTrkUd=271
+MultiBandDutyCycleTrkNm=5
+MultiBandDutyCycleTrkUd=5
+SingleBandVddGnssNmTrk=73
+MultiBandVddGnssNmTrk=5
+SingleBandVddGnssUdTrk=36
+MultiBandVddGnssUdTrk=5
ChipCfg_DspMemdumpEnable=1
-Agnss_IsGloAidingEnable=0
+Agnss_IsGloAidingEnable=1
+Agnss_IsGalAidingEnable=1
+Agnss_IsBdsAidingEnable=1
Agnss_SuplUseCpNi=1
+Agnss_SuplAidIntvlCrossSess=1
SETCaps_IsOtdoa=1
SETCaps_IsLpp=1
SETCaps_SuplUT1=20
@@ -98,6 +121,7 @@ ENABLE_LPP_CP=1
ENABLE_LPP_UP=0
ENABLE_LPPE_CP=3
ENABLE_LPPE_UP=0
+ENABLE_NLP_ALONG_WITH_UBP=0
ENABLE_NLP_IN_LPPE=1
ENABLE_NLP_IN_AGNSS=0
ENABLE_LPP_HA_GAD_SHAPE=0
@@ -124,10 +148,14 @@ GNSS_CARRIER_ID=5
ENABLE_LPP_UP=1
ENABLE_LPPE_UP=3
GNSS_CARRIER_ID=6
+ENABLE_CAPS_OTDOA=0
ENABLE_LPP_CP=0
ENABLE_LPP_UP=1
ENABLE_LPPE_CP=0
ENABLE_LPPE_UP=3
+ENABLE_2G_UP_CAPS_MSA=0
+ENABLE_3G_UP_CAPS_MSA=0
+ENABLE_4G_UP_CAPS_MSA=0
GNSS_CARRIER_ID=7
ENABLE_LPP_CP=0
ENABLE_LPPE_CP=0
@@ -138,4 +166,7 @@ GNSS_CARRIER_ID=8
GNSS_CARRIER_ID=9
ENABLE_LPP_UP=1
ENABLE_LPPE_UP=3
+GNSS_CARRIER_ID=10
+ENABLE_5G_CP_CAPS_MSA=0
+ENABLE_5G_CP_CAPS_MSB=0
GNSS_CARRIER_CONFIG_END