
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
| Parameter | Use Case | Limitation |
|---|---|---|
| adb | Transfer files, install apps, view device state | Requires device to be in normal Android state; cannot write to flash partitions |
| fastboot | Write to flash partitions, unlock bootloader | Only works in bootloader mode; not usable if USB debugging is off |
| scrcpy | Mirror device screen, record UI | Needs 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-toolspackage gives usbsdtar, whileandroid-sdk-platform-tools-commoninstalls 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
adbandfastbootbinaries. 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
$PATHlets you typeadborfastbootfrom 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
| Problem | Cause | Fix |
|---|---|---|
Device not listed in adb devices | Missing udev rule or incorrect USB driver | Re-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 binary | Enable USB debugging, update platform-tools, or try fastboot flashing reboot |
| Bootloader refuses to unlock | OEM unlocking toggle is off, or the device is carrier-locked | Go 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 data | You forgot to back up before unlocking | Make 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 bootloader | You used fastboot flashing lock by mistake | Never run the lock command unless you intentionally want to lock. |
| The phone is still locked after the unlock command | The device requires a newer fastboot binary than the one bundled in the ZIP | Download 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
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
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 UnlockingIs USB debugging safe? USB debugging gives a computer running
adbfull 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 — ADBCan 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
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 UnlockingHow 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 — FastbootCan 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





