0

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.

Sasha Shpota
  • 111
  • 1
  • 5

2 Answers2

1

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.

Sasha Shpota
  • 111
  • 1
  • 5
0

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.

esQmo_
  • 3,237
  • 2
  • 13
  • 24
  • 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 09 '18 at 23:44
  • This could help , I guess: https://developer.android.com/studio/run/device.html – esQmo_ Mar 09 '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 09 '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 09: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 09:51
  • https://android.stackexchange.com/questions/58187/adb-can-discover-devices-but-not-fastboot – esQmo_ Mar 10 '18 at 10:12
  • Thank you. I'm running fastboot for sure ( lsusb shows that the device is in fastboot mode). I've found that the problem is somehow related to sudo access - fastboot devices works with root. – Sasha Shpota Mar 10 '18 at 11:22