From c9d1d305f6d381647a103aa71333f1eca9efe5eb Mon Sep 17 00:00:00 2001 From: Thierry Strudel Date: Wed, 2 Nov 2016 16:21:37 -0700 Subject: [PATCH] enable GPS Bug: 32638326 Change-Id: Ia29405b93b9616a84bf68d3417124824dc50cbb1 --- device-common.mk | 3 +++ init.hardware.rc | 12 ++++++++++ lowi.conf | 51 ++++++++++++++++++++++++++++++++++++++++++ sepolicy/file_contexts | 2 ++ sepolicy/location.te | 4 ++++ 5 files changed, 72 insertions(+) create mode 100644 lowi.conf create mode 100644 sepolicy/location.te diff --git a/device-common.mk b/device-common.mk index 71b7712..cbf8576 100644 --- a/device-common.mk +++ b/device-common.mk @@ -200,5 +200,8 @@ PRODUCT_COPY_FILES += \ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ $(LOCAL_PATH)/media_profiles.xml:system/etc/media_profiles.xml \ +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/lowi.conf:system/etc/lowi.conf + # setup dalvik vm configs $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) diff --git a/init.hardware.rc b/init.hardware.rc index a98d9e7..0332811 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -163,6 +163,14 @@ on post-fs-data chown radio radio /data/misc/radio/db_check_done chmod 0660 /data/misc/radio/db_check_done + # Create directories for Location services + mkdir /data/misc/location 0770 gps gps + mkdir /data/misc/location/mq 0770 gps gps + mkdir /data/misc/location/xtwifi 0770 gps gps + mkdir /data/misc/location/gpsone_d 0770 system gps + mkdir /data/misc/location/quipc 0770 gps system + mkdir /data/misc/location/gsiff 0770 gps gps + # Set indication (checked by vold) that we have finished this action setprop vold.post_fs_data_done 1 @@ -397,3 +405,7 @@ service hci_filter /vendor/bin/wcnss_filter user bluetooth group bluetooth diag disabled + +service loc_launcher /vendor/bin/loc_launcher + class late_start + group gps inet diag wifi diff --git a/lowi.conf b/lowi.conf new file mode 100644 index 0000000..cfadcb2 --- /dev/null +++ b/lowi.conf @@ -0,0 +1,51 @@ +#*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* +# +# LOWI Config file +# +# GENERAL DESCRIPTION +# This file contains the config params for LOWI +# +# Copyright (c) 2012-2013 Qualcomm Atheros, Inc. +# All Rights Reserved. +# Qualcomm Atheros Confidential and Proprietary. +# +# Export of this technology or software is regulated by the U.S. Government. +# Diversion contrary to U.S. law prohibited. +#=============================================================================*/ + +# X86 ONLY - UBUNTU: +# Copy this file in the same directory where the executable is + +# The RSSI threshold used in the RTT outlier detection in half decibels. Default value recommended by the +# system team currently is -140 (corresponding to -70 dB). +LOWI_RSSI_THRESHOLD_FOR_RTT = -140 + +# Number of measurment per AP for RTS/CTS +LOWI_RTS_CTS_NUM_MEAS = 5 + +# Maximum Number of Outstanding Requests supported +LOWI_MAX_OUTSTANDING_REQUEST = 255 + +# Maximum number of records in Cache +LOWI_MAX_NUM_CACHE_RECORDS = 200 + +# Default threshold before issuing another fresh scan (ms) +LOWI_FRESH_SCAN_THRESHOLD = 500 + +# Timeout in case no result is reported by the driver (seconds) +LOWI_NO_RESULT_WAIT_TOLERANCE = 10 + +# Use Fake Wifi driver. Only valid for engineering builds +LOWI_USE_FAKE_WIFI_DRIVER = 0 + +# Use ROME Wifi driver. Only valid for engineering builds +# Will be removed later only for development support +LOWI_USE_ROME_WIFI_DRIVER = 0 + +# Use LOWI LP. +# When enabled the Discovery Request will be routed to LOWI-LP +LOWI_USE_LOWI_LP = 1 + +# Log level +# EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 +LOWI_LOG_LEVEL = 2 diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index b19f3e6..9628796 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -62,6 +62,8 @@ /system/vendor/bin/netmgrd u:object_r:netmgrd_exec:s0 /system/vendor/bin/port-bridge u:object_r:port-bridge_exec:s0 /system/vendor/bin/wcnss_filter u:object_r:wcnss_filter_exec:s0 +/system/vendor/bin/loc_launcher u:object_r:location_exec:s0 +/system/vendor/bin/lowi-server u:object_r:location_exec:s0 # data files /data/time(/.*)? u:object_r:time_data_file:s0 diff --git a/sepolicy/location.te b/sepolicy/location.te new file mode 100644 index 0000000..8ad78a3 --- /dev/null +++ b/sepolicy/location.te @@ -0,0 +1,4 @@ +type location, domain; +type location_exec, exec_type, file_type; + +init_daemon_domain(location)