当前位置:   article > 正文

Framework定制系列(三)-----Android系统修改ntpServer服务器地址自动更新时间_framework时间更新

framework时间更新

1.修改ntpServer服务器地址

代码路径:frameworks/base/core/res/res/values/config.xml
默认服务器地址time.android.com,国内不可用,不多说,直接换cn.ntp.org.cn

<!-- Remote server that can provide NTP responses. -->
<string translatable="false" name="config_ntpServer">cn.ntp.org.cn</string>
  • 1
  • 2

2.修改系统默认时区

代码路径: build/core/main.mk

# It then uses ${ro.postinstall.fstab.prefix}/etc/fstab.postinstall to
# mount system_other partition.
ADDITIONAL_DEFAULT_PROPERTIES += ro.postinstall.fstab.prefix=/system

#set default timezone is Asia/Shanghai
ADDITIONAL_BUILD_PROPERTIES += persist.sys.timezone=Asia/Shanghai
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

								***行多久,方为执着;思多久,方为远见。***
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/808172
推荐阅读
相关标签
  

闽ICP备14008679号