Unlock Bootloader on a Google Pixel: The Complete Step-by-Step Guide | Brav

Unlock Bootloader on a Google Pixel: The Complete Step-by-Step Guide


Table of Contents

TL;DR

  • I walk you through enabling Developer Options, USB debugging, and OEM unlocking so you have full control of your device.
  • I show how to install and verify the newest platform-tools, bsdtar, and udev rules, then bring the phone into fastboot mode.
  • I explain every command, how to check the lock state, and how to unlock safely.
  • I include a quick screen-mirroring setup with scrcpy to see the bootloader on your desktop.
  • I cover common pitfalls and the security trade-offs you should know before you hit unlock.

Why This Matters

I’ve been rooting and flashing ROMs on Pixel devices for over a decade. The first thing that ever stopped me from making any progress was the fact that every Pixel comes with a locked bootloader by default. Without unlocking it, I could only tweak settings in the Play Store, install work-arounds, or install system-level apps that required root permissions on an unlocked device. Unlocking the bootloader gives you the ability to flash any recovery, custom ROM, or even build your own firmware from scratch. It also means the device becomes a sandbox you can experiment in without jeopardizing your main line of work. Android Open Source Project — Bootloader Locking and Unlocking demonstrates that OEM unlocking is an intentional, reversible feature, but it also reminds us that the device will factory-reset when you unlock it. That is why the next section covers the setup steps before you connect your phone.

Core Concepts

1. Developer Options, USB Debugging, and OEM Unlocking

On a Pixel, the “Developer Options” menu is hidden until you tap the build number seven times. I always do that first because it turns on the hidden settings needed to talk to the phone from the command line. Once the menu is visible, you flip the USB debugging toggle (so the ADB daemon on the device will accept commands from your computer) and the OEM unlocking toggle (which tells the bootloader that you’re allowed to switch its lock state). This is the only way to move from the normal Android UI to a state where fastboot can unlock the bootloader. Android Open Source Project — Bootloader Locking and Unlocking

2. Platform-Tools: ADB and Fastboot

adb is the bridge between your host and the device, while fastboot lets you write to the device’s flash partitions. The official Android SDK Platform-Tools bundle contains both, and it is the most reliable source. I usually grab the latest ZIP from the Android website and keep it in a ~/platform-tools folder, then add it to my $PATH so I can run adb, fastboot, and scrcpy without typing the full path. Android Developer — Platform Tools and Android Developer — ADB describe the purpose of each binary and how to verify the version (adb --version, fastboot --version).

3. bsdtar and libarchive-tools

The platform-tools ZIP is a standard archive, but my Linux distro doesn’t ship a tar variant that can read ZIP files. The bsdtar utility from the libarchive-tools package handles it cleanly. On Debian/Ubuntu I install it with sudo apt install libarchive-tools. This step is optional on macOS or Windows, but on Linux it saves me from dealing with unzip’s limited progress output. Debian — libarchive-tools.

4. Udev Rules for Device Recognition

When you plug a Pixel into a Linux workstation, the kernel sometimes reports the device as “unknown” unless you have the correct udev rule. The android-sdk-platform-tools-common package supplies the rule that tells the kernel the device is a valid Android device. I install it with sudo apt install android-sdk-platform-tools-common. That’s all that’s required; no extra files need to be copied. Android Developer — Platform Tools.

5. Fastboot Mode and Unlock Command

Rebooting into fastboot mode is the gateway to unlocking. On a running device I type adb reboot bootloader. On a powered-off device I hold Volume-down while turning it on. Once in fastboot, the device displays the fastboot logo, and the command line shows fastboot. I then check the current lock state with fastboot flashing get_unlock_ability or simply fastboot oem device-info. The lock flag will be 0 (locked) or 1 (unlocked). Android Open Source Project — Bootloader Locking and Unlocking.

6. scrcpy for Screen Mirroring

After unlocking, I often want to see what the phone is doing while the bootloader is in a non-standard state. scrcpy is a lightweight, no-root screen-mirroring tool that works over USB. It is ideal for debugging fastboot messages on a larger monitor or recording the process. I install it with sudo apt install scrcpy (or brew install scrcpy on macOS). Once the device is in fastboot mode and USB debugging is on, I run scrcpy. It pops a window that shows the phone’s screen. Genymobile — scrcpy.

Tool Comparison Table

ParameterUse CaseLimitation
adbTransfer files, install apps, view device stateRequires device to be in normal Android state; cannot write to flash partitions
fastbootWrite to flash partitions, unlock bootloaderOnly works in bootloader mode; not usable if USB debugging is off
scrcpyMirror device screen, record UINeeds USB debugging; may drop frames on low-end PCs

How to Apply It

Below is the exact command sequence I use on a fresh Ubuntu 22.04 workstation. If you’re on Debian, Kali, or another distro, the commands are identical – just replace apt with your package manager.

1. Prepare the Host

# Update the package lists
sudo apt update && sudo apt upgrade -y
# Install tools that will help us
sudo apt install libarchive-tools android-sdk-platform-tools-common

Why? The libarchive-tools package gives us bsdtar, while android-sdk-platform-tools-common installs the udev rule that lets the kernel recognize a Pixel.

2. Download the Latest Platform-Tools ZIP

mkdir -p ~/platform-tools
cd ~/platform-tools
# Grab the ZIP from the official site
curl -LO https://dl.google.com/android/repository/platform-tools-latest-linux.zip
# Verify the checksum – the SHA256 hash is posted on the same page
EXPECTED_HASH=$(curl -s https://dl.google.com/android/repository/platform-tools-latest-linux.zip.sha256 | awk '{print $1}')
ACTUAL_HASH=$(sha256sum platform-tools-latest-linux.zip | awk '{print $1}')
if [ \"$EXPECTED_HASH\" != \"$ACTUAL_HASH\" ]; then
  echo \"Checksum mismatch! Aborting.\"
  exit 1
fi

Why? Using the official ZIP guarantees you have the newest adb and fastboot binaries. Checking the SHA256 protects against corrupted or malicious downloads. Android Developer — Platform Tools

3. Extract and Add to PATH

# bsdtar handles ZIP archives natively
bsdtar -xvf platform-tools-latest-linux.zip
# Clean up the ZIP
rm platform-tools-latest-linux.zip
# Add the folder to your shell profile
echo 'export PATH=\"$HOME/platform-tools:$PATH\"' >> ~/.bashrc
source ~/.bashrc

Why? Adding the directory to $PATH lets you type adb or fastboot from any terminal without prefixing the full path. Android Developer — ADB

4. Verify ADB and Fastboot

adb --version
fastboot --version

Both commands should print a version number that ends in 36.0.x, the latest at the time of writing. Android Developer — ADB

5. Enable Developer Options, USB Debugging, and OEM Unlocking

On the Pixel, open Settings → About Phone and tap Build number seven times. A toast will say “You are now a developer!” Then go back to Settings → System → Developer options and toggle USB debugging and OEM unlocking. Keep the phone connected to the workstation while doing this. Android Open Source Project — Bootloader Locking and Unlocking

6. Connect and Confirm Device Recognition

adb devices

The output should list your device’s serial number with the status device. If it shows unauthorized, unlock USB debugging on the phone by tapping the prompt that appears. If it shows nothing, make sure the udev rule from android-sdk-platform-tools-common is installed correctly (re-boot the machine if needed). Android Developer — Platform Tools

7. Reboot into Fastboot Mode

adb reboot bootloader

The phone should power down, then show the fastboot logo. If you’re starting from a powered-off state, hold Volume-down while pressing the power button.

8. Verify Lock State

fastboot flashing get_unlock_ability

You should see unlock_ability=0 if the bootloader is locked. The same command can be replaced with fastboot oem device-info which prints the lock status in the output. Android Open Source Project — Bootloader Locking and Unlocking

9. Unlock the Bootloader

fastboot flashing unlock

A prompt will appear on the phone: “Do you want to unlock the bootloader? This will erase all data.” Confirm it. The phone will factory-reset itself and then display Unlocking … Done. The unlock flag will now be 1. After the process finishes, run

fastboot flashing get_unlock_ability

to double-check the state. If you see unlock_ability=1, you’re done. Android Open Source Project — Bootloader Locking and Unlocking

10. Reboot Back to Android

fastboot reboot

The phone will boot into the regular Android OS. All data is wiped, so make sure you have a backup if you plan to keep your current data.

11. Optional: Mirror the Device with scrcpy

scrcpy

A window pops up that shows the phone’s screen. This is handy if you want to capture a video of the bootloader or simply confirm that the device is unlocked. Genymobile — scrcpy

Pitfalls & Edge Cases

ProblemCauseFix
Device not listed in adb devicesMissing udev rule or incorrect USB driverRe-install android-sdk-platform-tools-common, reboot the host, or use sudo adb kill-server && sudo adb start-server
fastboot fails with “device offline”USB debugging disabled or old fastboot binaryEnable USB debugging, update platform-tools, or try fastboot flashing reboot
Bootloader refuses to unlockOEM unlocking toggle is off, or the device is carrier-lockedGo back to Developer options and toggle OEM unlocking; if the device is locked by the carrier, you’ll need to contact the carrier or use a different unlock method
Fastboot shows “unknown bootloader state”Using a Pixel model that requires a custom unlock key (e.g., Pixel 6+ require a device-specific unlock key from Google)For those models, you must first generate a device-specific unlock key via the Google Fastboot Unlocking page and flash it with fastboot flashing unlock-key. The guide on the Custom Droid site explains the procedure.
Unlocking erases all dataYou forgot to back up before unlockingMake a full system backup with adb backup -apk -shared -all -f backup.ab (though this will still be erased). Always back up data before unlocking.
Rebooting the phone re-locks the bootloaderYou used fastboot flashing lock by mistakeNever run the lock command unless you intentionally want to lock.
The phone is still locked after the unlock commandThe device requires a newer fastboot binary than the one bundled in the ZIPDownload the latest platform-tools ZIP again or use sdkmanager --install \"platform-tools\" from Android Studio.

Security Note: USB debugging gives a computer running adb full read/write access to your device’s file system. Keep it enabled only when you’re actively using it, and turn it off afterward. If you suspect your host is compromised, disable it. Android Developer — ADB

Quick FAQ

  1. Does unlocking the bootloader void my warranty? For most carriers, unlocking is a software change that Google does not consider a warranty-violating action. However, some carriers (e.g., Verizon, AT&T) may still consider it a violation, so check your contract. Android Open Source Project — Bootloader Locking and Unlocking

  2. Will my Pixel automatically lock again after a reboot? No. Once unlocked, the bootloader stays unlocked until you explicitly run fastboot flashing lock. This is a safety feature that protects against accidental re-locking. Android Open Source Project — Bootloader Locking and Unlocking

  3. Is USB debugging safe? USB debugging gives a computer running adb full read/write access to your device’s file system. Keep it enabled only when you’re actively using it, and turn it off afterward. If you suspect your host is compromised, disable it. Android Developer — ADB

  4. Can I unlock a Pixel that is already factory-reset? Yes. The bootloader state is independent of the data partition. If the device is locked, you can still unlock it via fastboot. If it’s unlocked, the process is identical. Android Open Source Project — Bootloader Locking and Unlocking

  5. What if my Pixel shows “No bootloader mode” when I try adb reboot bootloader? Some Pixel models require a specific key combination to reach fastboot (e.g., Volume-down + Power). If the command fails, power off the phone and then press Volume-down while turning it on. Android Open Source Project — Bootloader Locking and Unlocking

  6. How do I revert to a stock ROM after unlocking? Download the official factory image for your Pixel model from the Google factory images page and flash it with fastboot flashall. This restores the device to a stock state while keeping the bootloader unlocked. Android Developer — Fastboot

  7. Can I flash a custom recovery after unlocking? Absolutely. Once the bootloader is unlocked, you can flash TWRP, OrangeFox, or any other custom recovery using fastboot flash recovery recovery.img. Then boot into recovery by holding Volume-down + Power during startup. Android Open Source Project — Bootloader Locking and Unlocking

Conclusion

Unlocking a Google Pixel bootloader is a well-documented, reproducible process that opens up a world of custom ROMs, root access, and development hacks. The key steps—enabling developer options, installing the latest platform-tools, checking USB recognition, entering fastboot mode, and running the fastboot flashing unlock command—are all that’s required. From here you can flash a custom recovery, install a new ROM, or simply use the device as a sandbox for testing. Just remember: the unlock command wipes data, the phone may lose its carrier lock, and USB debugging should be turned off when not in use to keep your device safe.

For developers who want a clean development environment, the next logical step is to flash a custom recovery, install Magisk for root, and experiment with Android Open Source Project builds. For hobbyists who just want a different UI, a custom ROM from LineageOS or Pixel Experience will give you the Pixel hardware with a new interface. If you hit a roadblock, revisit the pitfalls section or consult the FAQ; most problems stem from a missing driver, a typo in the command, or an un-enabled OEM toggle.

Good luck, and enjoy the power of an unlocked bootloader! 🔓

References

  • Android Open Source Project — Bootloader Locking and Unlocking
  • Android Developer — Platform Tools
  • Android Developer — ADB
  • Debian — libarchive-tools
  • Genymobile — scrcpy
  • The Custom Droid — Pixel Bootloader Unlock Guide
Last updated: March 20, 2026

Recommended Articles

Unlocking the Invisible Internet: How I2P Lets Me Browse Censorship-Resistant Sites | Brav

Unlocking the Invisible Internet: How I2P Lets Me Browse Censorship-Resistant Sites

Learn how to install i2pd, configure LibreWolf, host a private Nginx site, and navigate the invisible internet with step-by-step instructions.
Unmasking the Google Botnet: How Your Clicks Are Tracked and What Browser Isolation Can Do | Brav

Unmasking the Google Botnet: How Your Clicks Are Tracked and What Browser Isolation Can Do

Discover how the Google Botnet tracks your clicks via cookies and how browser isolation stops it. Learn practical steps to protect your privacy.
Mastering Mobile Hacking: Building a Complete Android Testing Lab | Brav

Mastering Mobile Hacking: Building a Complete Android Testing Lab

Set up a complete Android hacking lab: root an emulator with Magisk, install Frida, configure Burp Suite, and bypass SSL pinning and root detection for mobile app security testing quickly.
PG Text Search: Unlock BM25 Ranking in PostgreSQL for AI & RAG Developers | Brav

PG Text Search: Unlock BM25 Ranking in PostgreSQL for AI & RAG Developers

Discover how PG Text Search brings BM25 ranking to PostgreSQL, boosting search relevance for AI and RAG systems—no external search engines needed.
Unlocking Android Secret Codes: How I Built a Bash Script to Find Codes on Moto G Play and Beyond | Brav

Unlocking Android Secret Codes: How I Built a Bash Script to Find Codes on Moto G Play and Beyond

Discover how to automatically find Android secret codes with a Bash script, and unlock hidden menus on Moto G Play and other devices.
Unlocking Physics with Pure Mathematics: How Its Unreasonable Effectiveness Reveals Nature’s Secrets | Brav

Unlocking Physics with Pure Mathematics: How Its Unreasonable Effectiveness Reveals Nature’s Secrets

Explore how pure mathematics powers physics—from Gaussian distributions to complex Hilbert space. Uncover its unreasonable effectiveness and future trends.