Android 10.0 custom boot wizard app

When the system is turned on for the first time, there is a boot wizard app in the system source code, which is Provision.apk, but it does not participate in the compilation, so there is no
boot wizard function. Next, we will study how to customize it to suit our own boot wizard.

The native code of Provision.apk located in package/app/ is very simple and only has one DefaultActivity.
First look at its AndroidMenifest.xml file

insert image description here

It is found that SETUP_WIZARD is the keyword of the boot wizard, which distinguishes it from other lanuchs.

And in DefaultActivity.java in
setProvision()
insert image description here

It can be seen that in the last step, setProvision() is called to end the app and enter the launch.
So when customizing the UI of the boot wizard, when you click the last step on the last page,
you can call this method and then restart the machine . After that, you will directly enter the launcher. After restoring the factory settings
, you will enter the boot wizard again. The entire function is completed.

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/124258129