Is it possible to write bootloader from recovery ?

67 views
Skip to first unread message

Oleksandr Tereshchuk

unread,
Aug 1, 2017, 10:39:37 AM8/1/17
to android-porting
Hi,
I may answer my question here myself - just correct me if I wrong :)

As far as I know, there is two partitions:
boot.img is /boot - bootloader (and kernel ?)
recovery.img is /recovery - recovery program

FOTA packages may contain boot and recovery images (from recovery.cpp)


 
* 8. main() calls maybe_install_firmware_update()
 
*    ** if the update contained radio/hboot firmware **:
 
*    8a. m_i_f_u() writes BCB with "boot-recovery" and "--wipe_cache"
 
*        -- after this, rebooting will reformat cache & restart main system --
 
*    8b. m_i_f_u() writes firmware image into raw cache partition
 
*    8c. m_i_f_u() writes BCB with "update-radio/hboot" and "--wipe_cache"
 
*        -- after this, rebooting will attempt to reinstall firmware --
 
*    8d. bootloader tries to flash firmware
 
*    8e. bootloader writes BCB with "boot-recovery" (keeping "--wipe_cache")
 
*        -- after this, rebooting will reformat cache & restart main system --
 
*    8f. erase_volume() reformats /cache
 
*    8g. finish_recovery() erases BCB
 
*        -- after this, rebooting will (try to) restart the main system --


So if I want to deliver bootloader update over the air - all I need is a regular FOTA package with boot.img within ?

Joey Troy

unread,
Aug 1, 2017, 2:06:12 PM8/1/17
to riv...@gmail.com, android-porting
Oleksandr,

Actually the bootloader is it's own partition and has nothing to do with the boot.img. The bootloader is normally aboot.img and the boot.img is the kernel which then boots the OS. This may help


In terms of your question when you are doing an OTA update it will update the boot.img with a new kernel and can also include the recovery.img as well.

--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages