From 5eaabb8a5c6311b5d3e39d07237b97561b075b0b Mon Sep 17 00:00:00 2001 From: Stricted Date: Wed, 23 May 2018 11:25:55 +0200 Subject: [PATCH] add gps support back Change-Id: Ic499097d9d2ed86c7b4dd75ed922385556e3903c --- configs/agps_profiles_conf2.xml | 125 ++++++++++++++++++++++++++++---- device.mk | 3 +- proprietary-files.txt | 3 + ramdisk/init.mt8127.rc | 7 ++ sepolicy/mnld.te | 7 ++ 5 files changed, 128 insertions(+), 17 deletions(-) diff --git a/configs/agps_profiles_conf2.xml b/configs/agps_profiles_conf2.xml index 58beea2..bc1e480 100644 --- a/configs/agps_profiles_conf2.xml +++ b/configs/agps_profiles_conf2.xml @@ -18,7 +18,7 @@ ===== load SLP profile automatically based on PLMN ===== mcc (optional): - auto configure the supl_profile if the current MCC on DUT are the same as mcc parameter you specified and auto_profile_enable is enabled + auto configure the supl_profile if the current MCC on DUT are the same as mcc parameter you specified and auto_profile_enable is enabled mcc_mnc (optional): auto configure the supl_profile if the current MCC and MNC on DUT are the same as mcc_mnc paramter you specified and auto_profile_enable is enabled @@ -40,6 +40,14 @@ available value: 1 -> SHA1 for SUPL1.0 and SUPL2.0 available value: 2 -> SHA256 for SUPL1.0 and SUPL2.0 + supl_ver_minor (optional): + auto configure the minor of supl_version if above mcc_mnc condition is met + available value: 0~255, default value is 0 + + supl_ver_ser_ind (optional): + auto configure the service indicator of supl_version if above mcc_mnc condition is met + available value: 0~255, default value is 0 + ===== other parameters are used for DM ===== app_id (optional): "ap0004" @@ -128,7 +136,7 @@ port="7275" tls="true" /> - + @@ -261,15 +271,15 @@ @@ -287,14 +297,54 @@ gpevt: enable/disable GPEVT report available value: true, false (default) + + e911_gps_icon_enable: + enable/disable showing GPS icon during E911 location + available value: true (default), false + + e911_open_gps: + enable/disable opening GPS earlier when E911 call is dialed --> + + + diff --git a/device.mk b/device.mk index a551596..4894f36 100644 --- a/device.mk +++ b/device.mk @@ -56,7 +56,8 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ frameworks/native/data/etc/android.software.webview.xml:system/etc/permissions/android.software.webview.xml \ frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ - frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml + frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml \ + frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml # media codecs files that are not copied from stock rom PRODUCT_COPY_FILES += \ diff --git a/proprietary-files.txt b/proprietary-files.txt index 56ac180..ea39352 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -50,6 +50,7 @@ lib/egl/libGLESv1_CM_mali.so lib/egl/libGLESv2_mali.so lib/hw/audio.primary.mt8127.so lib/hw/camera.mt8127.so +lib/hw/gps.default.so lib/hw/gralloc.mt8127.so lib/hw/hwcomposer.mt8127.so lib/hw/power.default.so @@ -132,6 +133,7 @@ lib/libmatv_cust.so lib/libmemtrack.so lib/libmhalImageCodec.so lib/libmmprofile.so +lib/libmnl.so lib/libmp2dec_sa.ca7.so lib/libmp4enc_sa.ca7.so lib/libmpo.so @@ -167,6 +169,7 @@ lib/libvp8dec_sa.ca7.so lib/libvp9dec_sa.ca7.so vendor/media/LMspeed_508.emd vendor/media/PFFprec_600.emd +xbin/mnld # Widevine - from crackling vendor/lib/libwvdrm_L3.so|7e77482481197997294a834bfbc817a01b6075cd diff --git a/ramdisk/init.mt8127.rc b/ramdisk/init.mt8127.rc index e0cf390..1e51456 100644 --- a/ramdisk/init.mt8127.rc +++ b/ramdisk/init.mt8127.rc @@ -509,6 +509,13 @@ service MtkCodecService /system/bin/MtkCodecService user system group audio media sdcard_r +#MNLD daemon +service mnld /system/xbin/mnld + class main + user gps + group gps inet misc sdcard_rw sdcard_r media_rw system + socket mnld stream 660 gps system + on boot # AGPS mkdir /data/agps_supl 0771 gps system diff --git a/sepolicy/mnld.te b/sepolicy/mnld.te index 8e86efc..cc9c703 100644 --- a/sepolicy/mnld.te +++ b/sepolicy/mnld.te @@ -44,3 +44,10 @@ allow mnld block_device:dir search; file_type_auto_trans(mnld,system_data_file,mnld_data_file); file_type_auto_trans(mnld,apk_data_file,mnld_data_file); + + +allow mnld nvram_device:chr_file { read write open ioctl }; +allow mnld mmc_device:blk_file { read write open }; +allow mnld sysfs_boot_mode:file { read open }; +allow mnld system_data_file:dir { remove_name }; +allow mnld system_data_file:file { open }; -- 2.20.1