adb命令控制设备初始化设置

#!/bin/bash

# 确保设备已连接且USB调试已启用
echo "正在应用系统设置..."

# 1. 禁用屏幕锁定-设置为None
adb shell locksettings set-disabled true

# 2. 关闭USB验证应用--pass
adb shell settings put global verifier_verify_adb_installs 0

# 3. 保持唤醒状态(充电时)-pass
adb shell settings put global stay_on_while_plugged_in 3

# 4. 使用12小时制-pass
adb shell settings put system time_12_24 12

# 5. 设置屏幕超时30分钟(1800000毫秒)-pass
adb shell settings put system screen_off_timeout 1800000

# 6. 设置亮度为5%并禁用自动调节-pass
adb shell settings put system screen_brightness 13
adb shell settings put system screen_brightness_mode 0

# 7. 设置所有音量为1-pass
#media volume 设置为0
adb shell service call audio 13 i32 3;
#Ring volume 设置为0
adb shell service call audio 13 i32 1;
#Notification volume 设置为0
adb shell service call audio 13 i32 5;
#Alarm volume 设置为0
adb shell service call audio 12 i32 4;

# 8. 启用蓝牙-pass
adb shell svc bluetooth enable
#关闭蓝牙adb shell svc bluetooth disable

# 9. WiFi启用-pass
echo "正在配置WiFi连接..."
adb shell svc wifi enable
# 等待WiFi启用
adb shell cmd wifi start-scan 
#--------------------------------------------------------
# 10.自动链接wifi-pass
adb shell cmd wifi connect-network GMS1 wpa2 yhk.0755
#adb shell cmd wifi connect-network GMS2 wpa2 yhk.0755
#--------------------------------------------------------
#sleep 10

echo "系统设置已完成!"
#adb reboot
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值