Low battery handling during boot
There are cases with the phone where the battery power is not sufficient to boot (1% and lower) . Android very agressively blocks the boot process showing a charge animation. We want to do something similar (to prevent teh battery from being damaged) but easier to override (there is no need to block booting if you already have 5% battery and are connected to the charger for example) and a lot less agressive. this function needs to live in our initrd.
Blueprint information
- Status:
- Not started
- Approver:
- Michael Frey
- Priority:
- Undefined
- Drafter:
- Oliver Grawert
- Direction:
- Approved
- Assignee:
- Oliver Grawert
- Definition:
- New
- Series goal:
- Accepted for trusty
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Whiteboard
UDS notes from the session:
There are cases with the phone where the battery power is not sufficient to boot (1% and lower) . Android very agressively blocks the boot process showing a charge animation. We want to do something similar (to prevent the battery from being damaged) but easier to override (there is no need to block booting if you already have 5% battery and are connected to the charger for example) and a lot less agressive. this function needs to live in our initrd.
* Detect the battery status from initrd (how do we get that info generically, upower inside the initrd ?)
* There seems to be a capacity file in android that we could make use of to determine the data
* Hand over a specific boot arg to upstart to intercept it from emitting the startup event (much like the desktop recovery mode does)
* We just need to change /usr/share/
* Have an upstart job that specifically holds back the boot until at i.e. 2%, shows an animation via plymouth and
once the threshold is reached, emits "startup" to move on with the boot
* Design needs to create some graphical feedback for the user when
* Note that we already have percentage support in plymouth for fsck: https:/
Work Items
Work items:
[ogra] check on non nexus devices if /sys/class/
[ogra] include the necessary pieces in the initrd to hand the right bits to upstart on boot (see /etc/init/
[ogra] create an upstart job to intercept the boot and show an animation (jodh happy to help with this): TODO
[ogra] contact design for a "charging" animation for plymouth (*): TODO