Google launched Android in 2008 as an operating system for Mobile devices. Since then Android is increasingly being used as an operating system of choice for a variety of devices. Google officially supports mobile, tablet, TV, watch, and Automotive devices however Android is being used in lots of other types of embedded devices including medical devices, toys, infotainment, home gateways, gaming consoles, and so on.
With every new release, Google introduces new features in Android some of those features impacts the boot time of Android devices. Android devices typically take 20 seconds to about a minute to boot. Longer boot time can have a negative impact on user experience. For some of the devices e.g. IVI and medical devices, longer boot time may be problematic.
Boot time for an Android device can be defined as the time between powering on a device to the time when the devices’ home screen is displayed. Android boot process typically involves steps depicted in the diagram below:
Depending on the usages of the device, different strategies may be followed to reduce the boot time. Here are three popular approaches for doing the same:
The first boot optimization technique involves removing the services/applications that are not needed for the target use case of the device. For example, a gaming console may not need location services, or a smart toy without a screen may not need UI related services. Once redundant services are removed, the boot process can be analyzed using tools like “boot chart” to identify the critical paths where optimization is needed/possible. Based on this analysis, out of the services that are needed for the device use case, only the essential services/application can be started during boot, the start-up of the rest of the services can be delayed. Processes that hogg CPU/memory during boot time should be identified and optimized. Something as harmless as boot animation may impact boot time if it consumes more CPU/RAM or it may delay the user’s access to the home screen if animation continues even when the rest of the system is booted. Some of the other possible optimizations are
Hibernation based approach involves saving the system memory and hardware registers snapshot in flash storage at the time of device shutdown and restoring it back to memory on power on.
The Standby mode approach may be used in IVI systems. In this approach, by doing ignition "off", the device screen and other peripherals are switched off however device may remain powered on. At the time of ignition "on", the screen and peripherals of the device are switched on giving the impression of quick bootup.
Google has been working on improving the Android boot time. Android provided significant improvement in the timing of the first boot. The following table lists the modifications done by Google and subsequent optimization achieved:
• Saved 1.6s by removing UART log
• Saved 0.4s by changing to LZ4 from GZIP
• Saved 0.3s by removing unused kernel configs and reducing driver size
• Saved 0.3s with dm-verity prefetch optimization
• Saved 0.15s to remove unnecessary wait/test in driver
• Saved 0.12s to remove CONFIG_CC_OPTIMIZE_FOR_SIZE
• Saved 2s on normal boot
• Saved 25s on first boot
• Saved 1.5s by paralleling init commands
• Saved 0.25s by starting zygote early
• Saved 0.22s by cpuset tune
• Started 2s earlier on boot without fsck triggered, much bigger on boot with fsck triggered boot
• Saved 5s on Pixel XL with the immediate shutdown of the boot animation
Saved 0.2s on by genfscon
Do you have an upcoming project and wantus
to help speed up your time to market?
These cookies are necessary for the website to function and cannot be switched off.
These cookies allow us to monitor traffic to our website so we can improve the performance and content of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited or how you navigated around our website.
These cookies enable the website to provide enhanced functionality and content. They may be set by the website or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.