教你用ADB命令修改Android系統默認設置
1.關閉安裝確認(USB應用安裝攔截):
adb shell settings put secure adb_install_need_confirm 0
2.設置永不休眠(測試機型:紅米4 ):
adb shell "settings put system screen_off_timeout 2147483647"
3.安裝完畢后再設回15秒休眠時間:
adb shell settings put system screen_off_timeout 15000
4.設置默認輸入法
獲取當前輸入法
adb shell settings get secure default_input_method
設置輸入法:
Advertisements
adb shell settings put secure default_input_method com.baidu.input/com.baidu.input.ImeAppMainActivity
adb shell settings put secure default_input_method com.sohu.inputmethod.sogouoem/com.sohu.inputmethod.sogouoem.SogouIMELauncher
方法2:(有效)
adb shell "ime enable com.sohu.inputmethod.sogou/.SogouIME;ime set com.sohu.inputmethod.sogou/.SogouIME"
Advertisements
5.adb命令安裝應用許可權(樂視)
思路:可以反編譯設置來獲取開關,用adb shell settings put secure設置默認
關閉:
adb shell settings put system leui_allow_adb_install 0
開啟:(測試可用)
adb shell settings put system leui_allow_adb_install 1
adb shell settings put system leui_install_dialog_always_ask 0