Anthracite The USBC port is the only physical attack surface and when you can't protect it is I security issue.
The 'Off' setting for the USB-C port is implemented properly. I've never heard that the USB-C port setting can persistently disable the port so that it wouldn't work even before GrapheneOS is booted. I also think it's not the intention of the GrapheneOS devs to implement it this way (even if it was possible) because it'd just brick devices, and what's the use of permanently turning off the ability to charge a battery-powered device anyway?
The way it's currently implemented is secure and works correctly because:
- The port is enabled before the OS is booted — you can pause the boot on the verified boot yellow warning screen as was suggested, and I think you should be able to hold the volume down button to charge it while it's in Fastboot mode as well. All data (both Credentials Encrypted and Device Encrypted) should be safely locked so there shouldn't be any harm.
- The port is disabled while the OS is booted. You can disconnect the cable and reboot your device after it has charged, which would restart the verified boot process with nothing connected in the USB-C port and ensure you're booting a clean unmodified OS to unlock your data (DE) and give it your credentials to unlock the rest of your data (CE). It also clears the RAM. If any evil code executed in your device when the port was enabled before you rebooted, this code should be cleared from RAM and shouldn't exist on the storage.
Anthracite All new Pixel devices boot automatically when you connect them to the power cable and the device is powered off.
I have observed this myself on the Pixel 8, when connected to charging when powered off with 0% battery, it boots the full OS instead of the limited charging mode. I've reported it previously to the GrapheneOS project leader but he dismissed it as a bug or a faulty charger or something (I don't remember exactly what he said, but it's not a big deal). It's a serious usability issue with the 'Off' setting for the USB-C port, but what did you expect from the strictest setting for the charging port of your device? In any case, it doesn't brick the device, because as I said and as was suggested, you can charge it on the verified boot warning screen and should be able to boot it into Fastboot mode by holding the volume down button when you connect it to the charger. And I don't see how it compromises security either.
Anthracite use ADB to change the setting fastboot oem off-mode-charge 1
This sounds way too complicated to me. Have you tried charging it for a minute or two as I suggested above, then disconnecting it from charging, powering it off, and connecting again? This way the battery wouldn't be at 0% when you connect it to charging while it's powered off, so it should boot into the limited charging mode that displays the battery percentage rather than boot the full OS. This is way simpler and cleaner than the unneeded Fastboot hack. All you need is a bit of patience to charge the battery a bit blindly before the limited charging mode.
Anthracite my battery life degraded drastically because of the broken charging process.
Assuming your battery is degraded, it's because you ruined the battery. You're not supposed to keep your phone in a charging boot loop at/close to 0%. Having the battery at its extremes degrades its health, which is why there's a setting to limit charging to 80% to avoid the 81–100% extreme. You should also avoid the 0–19% extreme for the same reason.