I want to restore factory android on my Nexus 7 2012 WiFi.

I'm following the official guide.

I start the device in fastboot mode by executiong:

adb reboot bootloader

This works well. But when I run any command that uses fastboot the execution gets stuck, eg:

$ fastboot oem unlock
< waiting for any device >

The same issue with flash-all.sh.

I also noticed that if I run

adb devices

it doesn't list the tablet. However it gets listed if I run the same command after entering Recovery Mode (I have TWRP recovery).

More details/preconditions: I used to have CianogenMod on the device but I smashed it by mistake (I removed Android in recovery mode instead of simply wiping the data). I can't find the CianogenMod image anymore on LinageOS site (there is only Nexus 2013 available) so I'm trying to install at least what is available.


Well, the device is detected in ADB only, you probably haven't installed fastboot drivers. < waiting for any device > means that the computer is waiting for a device in fastboot mode.

Download the drivers from this page then install. fastboot oem unlock should work now.

Learn the difference between these two protocols (ADB and Fastboot).

This question may also help.

  • Acoording to the link you’ve posted the drivers are needed only for windows, but I’m using Ubuntu. Anyway I’ll try tomorow. – Sasha Shpota Mar 9 '18 at 23:44
  • This could help , I guess: developer.android.com/studio/run/device.html – esQmo_ Mar 9 '18 at 23:49
  • You didn't mention anything about your OS, so I assumed you were on Windows... Oh skipped the flash_all.sh part. Sorry – esQmo_ Mar 9 '18 at 23:51
  • I installed android-tools-adb package, however I can't enable USB debugging (not sure if it is really needed) as I don't have Android on the device. I still end up with < waiting for any device > – Sasha Shpota Mar 10 '18 at 9:41
  • Your fastboot isn't working, phone is not being detected. Are you sure you're in Bootloader ? Any screenshot? – esQmo_ Mar 10 '18 at 9:51

The problem was that fastboot didn't see the device without sudo.

To make flash-all.sh work I replaced every fastboot call with sudo $(which fastboot) like was suggested in this post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.