【GPS】Android O平台如何设置SUPL地址,以及GPS三个配置文件的优先级分析

Android O平台如何设置SUPL地址?shell

  SUPL地址:  SUPL_HOST测试

           SUPL_PORTgoogle


问题描述:spa

  Android O 之前的版本, SUPL地址是经过system/gps.conf进行配置的。debug

  在安卓O平台不少人将SUPL_HOST/SUPL_PORT的修改设置在/vendor/etc/gps.conf,这样作可能不会生效xml

        adb shellblog

        vendor/etc/gps.conf资源


解决办法:it

  Android O上有三处能够设置SUPL地址的地方,按优先级从低到高排列分别是:配置

  【优先级最低】/vendor/etc/gps.conf              

              SUPL_HOST=supl.google.com
              SUPL_PORT=7276

  【优先级较低】运营商资源文件 config.xml 能够覆盖gps.conf中的设置。

         frameworks/base/core/res/res/values/config.xml

              <item>SUPL_HOST=supl.google.com</item>

              <item>SUPL_PORT=7275</item>

  【优先级最高】/system/etc/gps_debug.conf能够覆盖gps.conf和config.xml配置。

   须要注意:gps_debug.conf这个文件并不默认存在,客户能够将/vendor/etc/gps.conf拷贝到/system/etc,而后重命名为gps_debug.conf。


 

建议

  用户在测试SUPL时尽可能在/system/etc/gps_debug.conf中设置SUPL地址。

相关文章
相关标签/搜索