How to implement recovery mechanism

Hi Team,

How to implement recovery as like android devices when kernel corrupted and the device fails to boot.
Any pointers to begin with?

@Loic
@ndec

Thanks,
Arun

1 Like

Any idea on this?

Thanks,
Arun

Recovery in Android is basically a second OS that can be switched to by a special bootloader mode controlled by a hardware key. Typically the bootloader supports normal boot, recovery boot and fastboot. I suspect if you review the LittleKernel source code you will find the code (currently unused) that implements this.

@danielt

I am able to create recovery partition and enter recovery boot from lk. How to update the corrupted boot partition with recovery partition? for DB410c, I can see https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/installation/board-recovery.md.html SDcard recovery image which will update the corrupted partitions. How to create a similar image for DB820c? my idea is to build a similar image for recovery boot for DB820c and that will update all the corrupted partitions if i boot into recovery mode.

Thanks,
Arun

SD card recovery is not supported on DB820C. I’m not 100% certain but IIRC this is because there is not a working SD card driver for this platform in LittleKernel.

@danielt
yes, there is no SDcard driver for DB820c. my intention is to ask how to create a recovery image and what recovery image should contain for DB820c?

I want to implement like this:
if I make a boot in recovery mode, from recovery mode it should update corrupted partitions(example: boot partition) and boot back in normal mode. Any pointers to create recovery image to do this?

Thanks,
Arun

The recovery image is simply a regular userspace that automatically starts a service to rewrite the partitions. As it happens the DB410C recovery images are customised Debian images (mostly to reduce maintenance costs by using a similar userspace for recovery and for normal running).