Error flashing img files: 'Invalid command resize-logical-partition:product_a:0'
jordanss1 opened this issue · 4 comments
If I wanted calyx would I download the calyx zip then use those commands, for example, 'avbroot ota extract' with the path to the zip file?
Also, whenever there is an upgrade to the calyx I couldn't automatically download it I would have to patch it similar to the original install? Similarly with Magisk?
I just want to make I understand this before I try anything.
If I want to use calyx do I go back to stock firmware and follow your instructions or do I first change to calyx then follow your steps? I downloaded the OTA update and also the normal zip file just in case. Confused which one to use first
Edit: Okay I think I understand. First install custom rom to latest Calyxos - then patch the latest OTA update to recieve the patched boot.img. Is that correct?
I am using Pixel 7 and Calyx and I have my first error while flashing the images:
I read in another issue that you have to flash all img files in normal fastboot and then use recovery fastboot to flash the system.img, does that apply to me?
Edit: I took system.img out of directory and flashed every other img and still the same error
It turns out the issue I quoted before was the resolution. Certain partitions that have to be resized needed to be flashed in fastboot mode and not in the normal bootloader. Trying to use:
fastboot flashall --skip-reboot
Would give me the above error from my previous comment because the normal bootloader can't flash some of the partitions. I used the --all flag to extract all files from the patched OTA:
`avbroot ota extract --input /path/to/ota.zip.patched ...... --all`
Then I flashed each partition one by one to find the ones causing the issue which were these:
To flash these partitions I did this:
- From normal bootloader choose Recovery
- Hold power button and press up volume key once
- Choose Fastboot
- From here you can flash all the .img files that wouldn't flash in normal bootloader
It would be great if you could add these steps somewhere because I think other users could benefit from this. I was stuck on this for hours but luckily I have a lot of patience.
After running the final command before locking bootloader:
`adb shell su -c 'dmesg | grep libfs_avb'`
This is the result. I got the success message but a big message also. Is this normal? Everything seems to be working ok and the bootloader is locked now.
Thanks for the detailed info! Let me look into this a bit.
The behavior you're seeing is not expected. fastboot flashall
is supposed to be flashing some of the partitions in the bootloader version of fastboot, and then automatically rebooting to the recovery version of fastboot to flash the rest.
This is the result. I got the success message but a big message also. Is this normal? Everything seems to be working ok and the bootloader is locked now.
Yep, everything looks all good. The reason for those errors is because of this: #282 (comment).
Could you post the output of fastboot --version
?
Ahh, it must have been the old version of fastboot! I was using version 33 for the Calyx install.
I actually decided to go for Graphene instead and upgraded my platform-tools and used the latest version, which explains why it flashed in the bootloader and switched to fastbootd automatically for the last partitions.
Thanks for the help and great program! For people with no experience with this stuff, like me, you make it easy to do!
No problem at all, glad you like avbroot!
Version 33 would definitely explain that behavior. A bunch of bugs related to fastboot flashall
were fixed in version 34. I'll update the README to mention that 34 or newer is required.