One, foreword

In the process of playing the machine, the annoying boot Settings after the machine is often encountered. Especially people with obsessive-compulsive disorder, many want to boot after the jump to the main screen. After a bit of research, you can skip boot by modifying the default Settings in android source code, in addition to many other functions, such as whether to turn on Bluetooth, lock screen and so on can be modified through the default Settings.

Ii. Introduction to default configuration Settings of Android system

Android source code in the default configuration path is as follows:

frameworks/base/packages/SettingsProvider/res/values/defaults.xml
Copy the code

This file contains a lot of system initialization configuration information. Here are a few:

<! -- Enable Bluetooth by default -->
 <bool name="def_bluetooth_on">true</bool>
<! -- Default is open install non-market app-->
<bool name="def_install_non_market_apps">false</bool>
<! -- Whether package validation is enabled by default -->
<bool name="def_package_verifier_enable">true</bool>
<! -- Whether to turn on the data cable by default and not sleep when connected to the power supply -->
<bool name="def_stay_on_while_plugged_in">false</bool>
<! -- Key attributes of this article ====== Whether to enable the Skip Boot wizard by default -->
<bool name="def_user_setup_complete">false</bool>
Copy the code

Most of the properties in defaults.xml have either false or true values, which makes it easy to change.

Third, modify the default attribute actual combat

We change the values of the properties listed above from true to false and from false to true. As follows:

<! -- Turn off Bluetooth -->
 <bool name="def_bluetooth_on">false</bool>
<! - allows -- -- >
<bool name="def_install_non_market_apps">true</bool>
<! -- Disable package validation -->
<bool name="def_package_verifier_enable">true</bool>
<! -- Do not sleep when connected to power supply -->
<bool name="def_stay_on_while_plugged_in">true</bool>
<! -- Key attributes of this article ====== Enable the Skip boot wizard -->
<bool name="def_user_setup_complete">true</bool>
Copy the code

After modifying the above properties, compile. Double clear mobile phone brush, you can see the modified properties take effect, such as boot directly into the main interface.

If you are interested in the article, you can search the wechat public account “QDOIRD88888” to follow the public account. Receive updates to articles as soon as possible.