I know how to use ADB during recovery to upgrade the operating system, but I wonder how to upgrade the custom recovery itself.
My understanding is that the following command will flash an upgraded recovery image to the device without causing any data loss to the operating system and the user data. Can someone please confirm before I try and brick my device (FP3)?
fastboot flash boot recovery.img
That is, after all, the command I used to flash the original recovery image when I first installed LineageOS (with the exception that I used
boot_<activeslot> instead of
boot to indicate which partition to flash to).
fastboot erase boot or
fastboot format boot before flashing?
These instructions state to
fastboot reboot bootloader and
fastboot erase cache afterwards, but they don’t explain why, and I fail to see how the cache partition relates to the recovery ROM?
Yes, you understood it well. AFAIK, updating a recovery is the same as originally flashing it, flashing will overwrite the partition.
The first command won’t work, if I’m not mistaken it doesn’t exist, and I can’t see the purpose of the second either… But it doesn’t bother to wipe the cache anyway.
Thanks a lot! As it turns out, I apparently don’t need to upgrade my recovery image, because it has apparently been upgraded when I upgraded the operating system itself a few days ago.
At least that’s what I understand from the output of
adb shell getprop, which shows timestamps that are in sync, where I expected the bootimage timestamp to be behind the system’s:
[ro.bootimage.build.date]: [Mon Aug 9 04:10:21 UTC 2021]
[ro.build.date]: [Mon Aug 9 04:10:21 UTC 2021]
[ro.system.build.date]: [Mon Aug 9 04:10:21 UTC 2021]
I’m surprised because I thought that the system and recovery ROMs were two different things and that changing one would not affect the other, hence my original question about how to upgrade the recovery. I should’ve mentioned that I had upgraded the system already. Still, good to know how to do it, thanks!
It’s a detail but it exists, at least in current fastboot version 31.0.2
Oh yes, if you are talking of the Lineage it gets updated along with the Lineage updates.
Indeed, they are different, but in this case, when Lineage gets updated, it also updates the recovery. IIRC you can even disable these recovery updates somewhere.
Well, I believe you, it might have been updated because I remember having tried this command sometime without success.
You can check if on/off or change in the Updater, the three dots in the upper right corner under “presetting”
I had never noticed! Good to know.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.