Home > Tips and Tricks

How to Fix FAILED (remote: variable not found)

In this guide, we will show you the steps to fix the FAILED (remote: variable not found) error message. When it comes to the Android ecosystem, the ADB and Fastboot Commands are the unsung heroes, especially in custom development. These bunch of commands are used to carry out a plethora of useful tasks.

These include the likes of booting the device to Fastboot Mode, Unlocking the device’s bootloader, flashing custom recovery like TWRP, or even flashing stock firmware via Fastboot Commands. But on the flip side, they aren’t free of errors and issues too. Well, I have already documented a comprehensive guide on over 20+ ADB and Fastboot Errors and their Fixes, but they seem to welcome a new member every other day.

As of now, the issue seems to stem out from the inability of the CMD window to find out the device variable. This issue is mostly related to Pixel device owners when they are trying to flash the stock firmware via Fastboot Commands. Fortunately, this issue could be rectified pretty easily as well. Without any further ado, let’s get you acquainted with the steps to fix the FAILED (remote: variable not found) error.

How to Fix FAILED (remote: variable not found) in Pixel Devices

fix FAILED remote variable not found error

The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

Install Android SDK

install adb platform tools windows

First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform tools folder, which will be used throughout this guide.

Download Stock ROM

pixel-3a-stock-firmware-Fix-FAILED-remote- variable-not-found

Next up, download the stock firmware for your Pixel device from Google’s Factory Image page. Once downloaded, extract it inside the platform tools folder.

Boot Device to Fastboot Mode

There are two different methods to boot your device to Fastboot Mode. If you cannot access the OS or your device is bricked, then you would have to take the help of hardware key combinations. So power off your device. Then, press and hold the Power and Volume Down Keys for a few seconds and your device will be booted to Fastboot Mode.

On the other hand, if your device is perfectly working, then you may also boot it to Fastboot via the adb reboot bootloader command. Once it is booted to Fastboot, connect it to your PC via USB cable and move to the next step to fix the FAILED (remote: variable not found) error.

Edit Pixel’s Flash-All Firmware File

When you have downloaded the firmware file, you might have noticed a flash-all.bat file. We will be executing this file to fix the FAILED (remote: variable not found) error. But before that, there’s an important point to keep in mind. This flash-all file contains a command (fastboot -w) that will wipe off everything from your device. But not everyone is fine with this idea. if you also echo this thought, then refer to the below instructions to avoid your device from getting wiped off.

  1. To begin with, download an advanced Text Editor such as Notepad++.
  2. Then head over to the extracted Fastboot ROM and there you should see the flash-all.bat file.
  3. Right-click on it and select Edit with Notepad++.
    edit pixel flash all file Fix FAILED remote variable not found
  4. When the file opens, you should see the fastboot -w keyword. The -w in this command wipes off all the data, so just delete that alphabet and the hyphen, save the file and that’s it. Your data won’t be wiped now!
    flash stock firmware file Fix FAILED remote variable not found
  5. So if the line was:
    fastboot -w update image-sargo-rp1a.201105.002.zip
  6. It will be changed to:
    fastboot update image-sargo-rp1a.201105.002.zip
  7. Once the change has been made, save this file move over to the next step to fix the FAILED (remote: variable not found) error.

Fix FAILED (remote: variable not found) via Flash-All File

  1. First off, make sure that your device is booted to Fastboot and connected to the PC via USB cable.
  2. Likewise, all the contents of the firmware should be placed inside the platform tools folder.
  3. Finally, double click on the flash-all.bat file to launch it. It will now flash all the files to their respective partitions.
  4. Once done, your device shall boot to the OS. If that doesn’t happen automatically, then you could also use the Power key or the fastboot reboot command.
  5. That’s it. This should have fixed the FAILED (remote: variable not found) error.

Other Workarounds for FAILED (remote: variable not found)

If the aforementioned didn’t work out, or you don’t own a Pixel device but are still getting bugged with this issue, then here are a few other short bytes that could help you out.

Try out these workarounds and it should fix the FAILED (remote: variable not found) error. And on that note, we conclude the guide. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.


Share: