I'll have to do the same shortly on my pixel 7a and I'm also a Linux user (not very skilled).

I might ask some clarification down the line , if you don't mind.

Reply to this note

Please Login to reply.

Discussion

I'll go ahead and post the steps here, for the room.

How to re-flash a Pixel back to Google OS via the terminal on Linux.

Prepare your device:

- Enable Developer Options (tap Build Number 7 times in Settings > About phone)

- Enable USB Debugging in Developer Options

- Enable OEM Unlocking in Developer Options

Download the appropriate OS image from

https://developers.google.com/android/images :

- Save to some directory (you choose)

- Extract file to same directory

Install Google developer tools via terminal:

https://developer.android.com/tools/releases/platform-tools

- Debian:

sudo apt install android-tools-fastboot android-tools-adb

- Fedora/RHEL:

sudo dnf install android-tools

- Arch:

sudo pacman -S android-tools

Check if fastboot is installed correctly:

fastboot --version

Check if adb is installed correctly:

adb --version

* If they are active, you will see version numbers.

Connect device to computer (avoid going through a dock):

- Verify connection (need to run with sudo)

sudo adb devices

- (Should show your device listed)

- Agree to the pop-up notification on device screen

Navigate to the uncompressed Android OS factory image directory:

cd [PATH TO EXTRACTED DIRECTORY FOLDER]

- * Alternatively, use file manager and open a terminal within the extracted OS image folder by right clicking on a blank space inside this folder and choosing "open terminal here" (or however your distro words it).

Make the flash script executable:

chmod +x flash-all.sh

Run the flash script:

./flash-all.sh

Your phone will now start flashing.

That's it. Let me know how it goes.

#IKITAO #Tech

Relocking the bootloader:

- Skip through the setup process on the device (it doesn't have to be online)

- Put the phone back into developer mode

- Make sure USB debugging is activated

- Agree to the pop-up notification on device screen to allow USB debugging

Run this command to see if adb can see your device:

sudo adb devices

- * You should see your device.

Run this command to reboot into fastboot mode:

adb reboot bootloader

- * You may get a request to authorize USB debugging on the device, if so, accept it.

Run this command to see if fastboot can see your device:

sudo fastboot devices

- * You should see your device.

Once the device is in bootloader mode, run this command to lock the bootloader (must use sudo):

sudo fastboot flashing lock

Once finished, use the volume buttons on your device to select "Lock the bootloader," then press the power button to accept

Once the bootloader is locked, your device may reboot into bootloader mode, either reboot the device, or issue this command:

fastboot reboot

- * This step is not necessary if your phone reboots into system after relocking the bootloader.

Reenable Developer Options and turn off OEM unlocking:

- Reenable Developer Options (tap Build number 7 times in settings > About Phone

- Go into System > Developer options and turn off OEM unlocking.

- Restart device for changes to be applied.

Perform a factory reset:

- Go to Settings > System > Reset options and choose Erase all data (factory reset). Check the box that says Erase eSIMs.

- * This will remove any eSIM information from the device, and it will also disable Developer mode.

Your phone will reboot, and now it is ready for resale.

Fond memories 🥹

I used to have a T-shirt that said "fastboot oem unlock" over a decade ago.

That's pretty epic.

It was a fine timeline.