mbonin / boot-unlocker-gnex

Automatically exported from code.google.com/p/boot-unlocker-gnex
1 stars 0 forks source link

Add option to flash a custom recovery #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Users who keep their bootloader locked, usually keep stock recovery as well, 
for security.

One of the reasons to unlock the bootloader is to "fastboot flash" (or 
"fastboot boot") a custom recovery to make nandroid backups.  Therefore users 
may save time by flashing the custom recovery here.  This will avoid not only 
the need for fastboot (and a USB connection) but the need to unlock (for this 
purpose) as well.

We can flash the recovery .img file by writing directly to the recovery mmc 
partition.  We need a way (perhaps hash-checking) to verify that the recovery 
is intact, as well as a way to verify that it is indeed a recovery image, and 
for this kind of device.

We should give the user a choice of a "temporary" or "permanent" flash of the 
new recovery...

Devices that have received OTAs will restore stock recovery the next time 
Android starts up; devices which have never received OTAs do not, and will keep 
the flashed recovery until stock is manually reflashed.  The OTA installs 
bootloader-specific files /system/etc/install-recovery.sh and 
/system/recovery-from-boot.p.  If the user has these files we should give them 
the choice of moving them to a backup location or leaving them alone; this is 
the "permanent" or "temporary" decision.

For devices that do NOT have these files, we should figure out how to give the 
user an easy way to restore stock recovery.  Perhaps we can dump their current 
recovery to SD card.

Original issue reported on code.google.com by jmason...@gmail.com on 23 Jun 2012 at 9:42

GoogleCodeExporter commented 8 years ago

Original comment by jmason...@gmail.com on 23 Jun 2012 at 7:28