How to Install ADB via Android Studio and Flash an OTA Update from Google

This guide shows how to install the Android Debug Bridge (ADB) using Android Studio and then use it to manually flash an official OTA update from Google on a Pixel or Nexus device. This is useful if you want to install an update before it rolls out to your device, or if an OTA failed and you need to re-apply it.

⚠️ Important notes before you begin:

  • Make sure your device is charged to at least 50% before starting.
  • Back up important data (photos, messages, etc.) before flashing an OTA.
  • This process uses official Google OTA files; it does not require unlocking the bootloader or wiping data.
  • Only use OTA files that match your exact device model and carrier (if applicable).

1. Install Android Studio and ADB

ADB is included in the Android SDK Platform Tools, which come with Android Studio. Follow these steps to install it:

  1. Download and install Android Studio from the official site:
    https://developer.android.com/studio
  2. Launch Android Studio and go through the setup wizard (you can accept the default settings).
  3. Once Android Studio is installed, open it and go to Tools → SDK Manager.
  4. In the SDK Manager, go to the SDK Tools tab and make sure Android SDK Platform-Tools is checked.
  5. Click Apply and then OK to install the Platform Tools.
  6. After installation, the ADB tools will be located in a folder like:
Windows: C:UsersYourNameAppDataLocalAndroidSdkplatform-tools\
macOS: /Users/YourName/Library/Android/sdk/platform-tools/
Linux: /home/YourName/Android/Sdk/platform-tools/

Remember this path; you’ll need it to run ADB commands.

2. Enable Developer Options and USB Debugging

On your Android device, you need to enable Developer Options and USB Debugging:

  1. Open Settings on your phone.
  2. Go to About phone (or About tablet).
  3. Tap Build number 7 times until you see a message like “You are now a developer!”
  4. Go back to the main Settings screen and open Developer options.
  5. Enable USB debugging.
  6. When prompted, allow USB debugging for your computer by tapping Allow on the device.
See also  My EndeavourOS KDE Setup With BTRFS

3. Download the Correct OTA File from Google

Google provides full OTA images for Nexus and Pixel devices. To download the right file:

  1. Visit the official OTA page:
    https://developers.google.com/android/ota
  2. Find your device model (e.g., Pixel 6, Pixel 7 Pro, etc.) and the correct build (e.g., TQ3A.230901.001).
  3. Download the OTA zip file for your device and save it to your computer.
  4. Move the OTA zip file into the platform-tools folder where ADB is installed (from step 1).

4. Connect Your Device and Test ADB

Now connect your device to your computer and verify that ADB can see it:

  1. Connect your phone to your computer using a USB cable.
  2. On Windows, open Command Prompt or PowerShell. On macOS or Linux, open Terminal.
  3. Navigate to the platform-tools directory. For example, on Windows:
cd C:UsersYourNameAppDataLocalAndroidSdkplatform-tools
  1. Run this command to list connected devices:
adb devices

You should see your device’s serial number listed with the word “device” next to it. If you see “unauthorized”, unlock your phone and tap “Allow” on the USB debugging prompt.

5. Reboot into Recovery and Sideload the OTA

Now you can flash the OTA update using ADB sideload:

  1. Make sure the OTA zip file is in the same platform-tools folder as ADB.
  2. In the terminal/command prompt, run this command to reboot your device into recovery:
adb reboot recovery
  1. When the device reboots, you’ll see the Android recovery menu (a robot with an exclamation mark).
  2. Press and hold the Power button, then press the Volume Up button once to enter the recovery menu.
  3. Use the Volume buttons to highlight Apply update from ADB and press the Power button to select it.
  4. Back on your computer, run this command (replace ota_file.zip with the actual filename):
adb sideload ota_file.zip

ADB will now transfer and apply the OTA update. This can take several minutes; do not disconnect the cable or turn off the device.

See also  Meet The Ray‑Ban Meta Gen 2 AI Glasses

6. Reboot and Verify the Update

Once the sideload is complete:

  1. On the device, use the Volume buttons to highlight Reboot system now and press the Power button.
  2. Wait for the device to boot normally.
  3. Go to Settings → About phone and check that the Android version and build number match the OTA you just installed.

Troubleshooting Tips

  • “adb: command not found” – Make sure you are in the platform-tools directory, or add that folder to your system PATH.
  • Device not listed in adb devices – Check USB debugging is enabled, try a different USB cable/port, and ensure the device is unlocked when prompted.
  • Sideload fails with an error – Double-check that you downloaded the correct OTA file for your exact device model and that the file is not corrupted (verify the SHA-256 checksum if provided).
  • Recovery menu does not appear – Ensure the device is fully powered on before running adb reboot recovery.

By following these steps, you can install ADB through Android Studio and safely flash an official Google OTA update without losing your data.