Enable the developer options menu by going to Settings > About phone/tablet and repeatedly pressing the Build number menu entry until developer mode is enabled.
go to Settings > System > Developer options and toggle on the OEM unlocking setting. On device model variants (SKUs) which support being sold as locked devices by carriers, enabling OEM unlocking requires internet access so that the stock OS can check if the device was sold as locked by a carrier.
Obtaining fastboot on Arch Linux by installing android-tools with sudo pacman -S android-tools, fastboot --version fastboot version 34.0.4-android-tools
Flashing as non-root on Arch Linux requires udev: sudo pacman -S android-udev
You need to boot your device into the bootloader interface. To do this, you need to hold the volume down button while the device boots. The easiest approach is to reboot the device and begin holding the volume down button until it boots up into the bootloader interface.
Unlock the bootloader to allow flashing the OS and firmware: fastboot flashing unlock The command needs to be confirmed on the device and will wipe all data. Use one of the volume buttons to switch the selection to accepting it and the power button to confirm. OKAY [ 0.009s] Finished. Total time: 0.009s. Do not start the device - remain in bootloader until completely flashed.
Download the factory images for the device from the releases page. For example, to download the VERSION release for a device with the codename DEVICE_NAME:
cd DEVICE_NAME-factory-VERSION => cd panther-factory-2024031400
Flash the images with the flash-all script in the directory:
./flash-all.sh => Finished. Total time: 110.445s. Rebooting into bootloader
GrapheneOS did not boot. On first attempt it hang after the Google Logo. After the automatic reboot you have the option to do a factory reset - this solved it.
Reboot into the boot loader and lock it again with fastboot flashing lock.