Android刷机后操作 作者: morningp 时间: 2021-11-16 分类: Android技巧 lineageOS是相对来说比较原生的Android,而由于众所周知的原因,原生Android在中国大陆是有一些问题的,这些问题基于系统,需要执行adb命令来进行修改。个人比较喜欢刷机,刷机后的这些命令记不住经常需要搜索,为了免去搜索的麻烦,这边水篇blog记录一下: 首先,网络连通性服务器修改(去除叉叉): ```shell adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204; adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204; ``` 设置完成后重新连接应该就可以了,如果还不行就重启,这个设置永久有效,也可以自己搭建,自己搭建的话,nginx配置直接加入:`location /generate_204 { return 204; }`即可。 第二步,修改NTP服务器以同步时间(没错,Android的NTP也被你国墙了,流石墙国。PS.我知道有些人会说这是Google自己迁移了ntp服务器,但是你国要是不墙不就没有这些屁事了?): ```shell adb shell "settings put global ntp_server ntp.ntsc.ac.cn" ``` 这是中科院提供的NTP服务,如果对速度不满意可以改成阿里的ntp:ntp.aliyun.com,ntp后加数字一共可以到:ntp7.aliyun.com,总共8个域名。 至此才可以正常使用Android服务。 最后,Android9中加入了[[旋转建议]][旋转建议]这个东西,这个我个人不太喜欢,一般会给关了。关闭也很简单,按照aosp给出的调试命令: ```shell adb shell settings put secure show_rotation_suggestions 0 ``` [旋转建议]: https://source.android.google.cn/devices/tech/display/rotate-suggestions?hl=zh-cn 标签: none