chenxiaolong/avbroot

adb sideload stopped working with GrapheneOS 2024022600

hoyalu opened this issue · 2 comments

Hi everyone! Looks like I'm stuck with GrapheneOS 2024022600. :-(( I can't sideload new patched OTAs to my Pixel 8 anymore. Once in recovery mode, the USB port is invisible, no matter which of Graphene's new USB-C port settings I choose. I made sure to whitelist my laptop as a USB debugging device.

If I understood correctly, recovery mode is OS-specific. Unfortunately, I haven't found another place where discussing issues with rooted GrapheneOS is allowed.

Hey, unfortunately, you ran into a GrapheneOS bug that was fixed in the next release (2024022800):

Tensor Pixels: fix issue with the USB-C changes breaking recovery sideloading and the fastbootd flashing mode used by the web installer which blocked us being able to release the previous release to all users

You can work around this by using my other project, Custota. It's normally used for installing patched OTAs from your own server, but it can also be used to install a local file.

I'd suggest giving this a try:

  1. Download Custota-<version>-release.zip from https://github.com/chenxiaolong/Custota/releases and flash it from Magisk/KernelSU.

  2. Download custota-tool-<version>-<os>.zip for your desktop OS and unzip it.

  3. Generate a .csig file for your patched OTA. Use the same OTA key that you used for avbroot.

    ./custota-tool \
        gen-csig \
        --input path/to/ota.zip.patched \
        --key path/to/ota.key \
        --cert path/to/ota.crt
  4. Generate a .json file that points to your patched OTA.

    ./custota-tool \
        gen-update-info \
        --file <device codename>.json \
        --location <ota filename>.zip.patched
    • <device codename> would be shiba for the Pixel 8 or husky for the Pixel 8 Pro.
    • <ota filename> should be just the filename, without any folders.
  5. Copy your patched OTA, .csig file, and .json file to a folder on your phone.

  6. From the Custota app, go to OTA installation source -> Use local path -> Select directory, and select the folder that contains the 3 files.

  7. Hit Check for updates. A notification should pop up, asking to install your OTA. The OTA will install in the background similar to how GrapheneOS' or the stock OS' builtin updater works.

  8. Once the new OTA is installed, you'll have the GrapheneOS' USB fix and should be able to sideload from recovery mode again.


Regarding:

Once in recovery mode, the USB port is invisible, no matter which of Graphene's new USB-C port settings I choose. I made sure to whitelist my laptop as a USB debugging device.

In general, the recovery mode will not load any settings from Android. It does not (and cannot) decrypt the userdata partition to read the relevant files.

Thank you so much for your immediate and comprehensive help! Everything is back to normal.