Objective
Welcome everyone I share and recommend useful code Snippets ~ ~
Statement
Welcome reprint, but please keep the original source of the article:
CSDN:http://www.csdn.net
rainy season o mo away:http://blog.csdn.net/luckkof
Body
why can't adb reboot in the Factory mode after KK?
Under normal circumstances the ADB reboot can be restarted.
[Keyword]
ADB reboot, Factory mode, Factory mode, factory modes cannot be restarted
[version number constraint]
Android 4.4, KK or KK later version number
[Solution]
After KK Google will turn off/restart the last transfer to the INIT process to run. Other process informs Init to run through the system property sys.powerctl.
Sys.powerctl configuration in Init.rc, which can be included in the test
On property:sys.powerctl=*
Powerctl ${sys.powerctl}
Then run the System/core/init/builtins.c#do_powerctl function. Call Android_reboot restarts or shuts down. why can't adb reboot in the Factory mode?
Under normal circumstances the ADB reboot can be restarted, and the key is that it is not defined in mediatek/config/{platform}factory_init.rc
On property:sys.powerctl=*
Powerctl ${sys.powerctl}
Assuming that you want to add this functionality, you can simply add these two lines to the factory_init.rc
Why can't adb restart the machine in Factory mode after Android KK?