The low level details are vendor and hardware specific if a device performs a complete power-on reset (PoR) or if the hardware is not reset at all. During reboot kernel kills itself and hands over the control to bootloader(s) which may boot device in different possible modes ( fastboot/bootloader, recovery or normal boot). However a normal reboot isn't a warm reboot either. They include Baseband Processor (modem), Digital Signal Processor (DSP), WiFi / BT module etc. Similarly some other memory regions allocated to SoC components and signed firmware which are isolated from application processor (AP on which main OS runs) may also not be erased. See some more hints in bootloader boot reason specification. On Android phones (and on other systems as well) a normal reboot is not completely cold as power is not cut at least to RAM because it holds an area where kernel panic logs are stored which can be accessed on next boot (refer to ramoops used for last_kmsg or pstore). However this may cause data loss, particularly due to filesystem corruption.Ī brutal way is the long press of power button (handled by PMIC) which is a cold reboot (or shutdown) in true sense because the power to CPUs (and RAM) is suddenly cut without waiting for userspace processes and kernel to terminate gracefully. Or we can ask kernel to perform a quick reboot killing everything. init can handle this on modern OSes or you can do manually through /proc/sysrq-trigger interface. It's init which then starts and takes care of all services and processes.Ī civilized way to do reboot or shutdown is to let all processes terminate themselves saving any pending work, un-mount filesystems and then ask the kernel to reverse the boot process. Kernel initializes necessary hardware and prepares a basic environment before executing init - the very first userspace process we can see. From my answer to What is the fastest way to shutdown un-rooted Android phone?: Android is based on Linux kernel - the very first executable of operating system which is run during boot process. On (re)boot SoC firmware loads bootloaders in memory which then load executable binaries and start processes (actual OS). Power management is part of open-source ACPI/UEFI/BIOS standard on PCs while on phones PMIC firmware is usually used with SoCs. Soft reboot only kills and starts the processes, while retaining power to hardware components. In case of cold reboot, usually power is cut to CPUs, and also possibly to RAM and even to whole motherboard. For mobile phones or embedded devices it's difficult to draw a clear line between cold and warm boot. Terms cold (or hard) boot and warm (or soft) boot are more associated with PCs, particularly Windows. In order to answer your question we need to define what a hot (or warm) reboot is on an Android device. If you want to poweroff now, use poweroff, and if you want halt the system now, use halt.While the other answer correctly states a way to force a (very) soft reboot, I'd like to add some in-depth details (which may not make sense to everyone :). But why confuse matters? These commands are best used at face value. However, each of them will accept command line options to make any one of them perform a reboot, a halt, or a poweroff. These commands perform the action their name suggests. shutdown -r 08:20 System rebooting at 08:20 Here’s an example where we have scheduled a reboot.
0 Comments
Leave a Reply. |