I am curious about the "turned off" state and the boot process after that in details. I found some good articles on this topic like this one: http://www.lieberbiber.de/2015/07/05/mediatek-details-little-kernel/ but it's still not completely clear to me what's the exact process.
I know that the basic boot sequence is:
- Boot ROM
- Little kernel (LK)
- And then it may split into going to:
- Download mode (in case of a Samsung device for example)
- Fastboot mode or
- Recovery or
- Normal boot (starting Android boot itself)
But is the phone really off when we turn it off and the battery is inserted? I know that Android is really shut down but is the phone completely off regarding the software level? As the article linked above says, the little kernel is doing the charging animation, or selects the next boot image when pressing the keys (recovery, fastboot, normal boot, etc).
So my question is: when the phone is off and we press the power button is it the hardware which starts the boot really from zero (from the boot rom) or at this point the phone has already been finished with processing the boot rom, the preloader and loading the little kernel as well which is watching the key press events?
It's not clear to me because I checked the source code of the little kernel as well and there are some keyboard ckecking routines for example to enter to recovery mode.
Thanks in advance!