Android 系统配置修改

1.修改wifi 是否可用的检测地址:

由于编译的源码用的是谷歌的检测url,国内访问不了,系统会认为wifi网络受限,所以改成国内的地址

adb shell settings delete global captive_portal_https_url

adb shell settings delete global captive_portal_http_url

adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204

adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204

2.通过adb 修改时间服务器,由于编译的源码用的国外的服务器,国内无法通过网络自动获取时间,需要改成国内的

adb shell settings put global ntp_server ntp.ntsc.ac.cn  //更改服务器地址
adb shell setprop persist.sys.timezone Asia/Shangha  //更改时区
adb shell settings get global ntp_server  //查看当前使用地址
adb shel1 settings put global auto_time 1  //打开网络同步时间开关
adb shel1 settings put global auto_time 0  //关闭网络同步时间开关

3.命令行输入返回按键事件,我编译的版本是android TV 没有返回键,用命令输入返回事件

adb shell input keyevent KEYCODE_BACK

4.通过adb 连接wifi  ,刷机到Android板,但是没显示器 ,连接不了wifi ,可以用以下命令连接,需要root 权限

cmd wifi set-wifi-enabled enabled //打开wifi
cmd wifi set-wifi-enabled disabled //关闭wifi
cmd wifi status   //查看wifi状态
cmd wifi start-scan  //扫描wifi网络
cmd wifi list-scan-results //获取扫描结果
cmd wifi connect-network WIFINAME wpa2 WIFIPASSWAORD //连接wifi
cmd wifi list-networks  //查看已保存的网络
cmd wifi forget-network <networkId>  //<networkId> 通过 查看已保存的网络 得到。
cmd wifi start-softap hotpot11 wpa2 12345678  //开启/关闭wifi热点开启 wpa2 类型、名称为hotpot11 、密码是 12345678 的 wifi热点
cmd wifi stop-softap  //关闭热点
cmd wifi set-scan-always-available enabled|disabled  //打开/关闭 自动开启wifi

5.使用Rk3288 的android 板时,发现usb 调试已打开,用wifi连接adb ,发现连接不上,原因是android系统没有设置service.adb.tcp.port,需要设置后重启android 系统的adbd,在androd 系统上安装termux.apk,输入以下命令。然后就可以正常连接。

su
setprop service.adb.tcp.port 5555  
stop adbd  
start adbd  

6. 替换默认Launcher 

adb shell cmd package set-home-activity com.teslacoilsw.launcher
adb shell pm disable-user --user 0 com.android.launcher3
//恢复原来的Laucher
adb shell cmd package set-home-activity com.android.launcher3
adb shell pm enable com.android.launcher3

7.清除 Dalvik/ART 缓存(需要 root)

adb shell
su
rm -rf /data/dalvik-cache/*
reboot

                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值