Android,跳过开机向导 SetupWizard

SetupWizard完成后会把下面两个设置的值由0改为1。

USER_SETUP_COMPLETE

DEVICE_PROVISIONED

然后下次开机只要USER_SETUP_COMPLETE不为0就不会再进入SetupWizard

所以用adb把这两个值改为1重启后就可以跳过SetupWizard。

adb shell settings put secure user_setup_complete 1

adb shell settings put global device_provisioned 1

或者也可以直接删除system/priv-app/SetupWizard,如果系统原来自带的app Provision没有被SetupWizard覆盖,SetupWizard被删除后Provision会把这两个值直接设为1,如果这两个值不为1开机后会影响有些功能的使用。

Provision:

// Add a persistent setting to allow other apps to know the device has been provisioned.
Settings.Global.putInt(getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 1);

Settings.Secure.putInt(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 1);

原文链接:https://blog.csdn.net/li_jin_shen/article/details/53101932

你可能感兴趣的:(android进阶之爬坑,Android,跳过,SetupWizard)