Tried to get back to stock on Pixel 5a via update from ADB, but getting the following errors:

...
Verifying update package...
ERROR:    recovery: failed to verify whole-file signature
Update package verification took 45.5 s (result 1)
ERROR:    recovery: Signature verification failed
ERROR:    recovery: error: 21

Install from ADB completed with status 2.
Installation aborted.

I unlocked the bootloader and removed the custom key as described here, but still can't flash the stock.

Please advise.

    other8026
    Thank you for your reply.
    I tried to use the web installer as you suggested, but couldn't connect to the phone, even when enabled the dev mode and USB debugging.

      Yuriy I'm not familiar with flashing Stock. Are you trying this from Fastboot? I think that's where you'd want to be, so enabling USB debugging and all of that shouldn't be necessary (unless I am misunderstanding something).

      Could you give us the commands/arguments you are using in the terminal when flashing? Are you using the script provided if there is one?

      Yuriy sideloading won't work because you have a different OS flashed on your phone. You need to use the full factory images: https://developers.google.com/android/images. You'll have to boot into Fastboot and install from there.

      You can use the web tool that I mentioned earlier. Also, if you want to do it via the command line, you basically follow the same instructions as flashing GrapheneOS, but instead you use the Stock image. See https://grapheneos.org/install/cli#replacing-grapheneos-with-the-stock-os

      Yuriy You can't install a different operating system by sideloading. Sideloading has signature verification with downgrade protection. The stock OS is not signed with the GrapheneOS signing keys. Even if you could bypass this, it would be broken, and would just be rolled back due to boot failing. If there was no A/B update system with rollback, the device would be soft or hard bricked depending on whether OEM unlocking was enabled. It's a good thing that it checks the signature beyond security.

      Thank you guys, I didn't know that. I will try the full image and get back to you with results

      I was able to restore the stock via the web installer.
      Thank you, appreciate your help.