I am trying to factory data reset my Oppo Neo 7 (Android 5.1) using ADB shell. Any way I can try and link to ADB shell?


You need:


  1. Open the folder where Minimal ADB & Fastboot is, launch it.

  2. Now on your phone, enable USB Debugging, then connect to the computer.

  3. On the terminal window, type adb devices [press enter]. You should see something like: xxxxxxxxx device detected

  4. Type adb shell [press enter]

  5. Type recovery --wipe_data [press enter], or if it doesn't work, type wipe data[press enter]

  6. Your phone should restart and begin the restoration process.

You can also simply boot into the recovery then perform the reset manually. Type: adb reboot recovery [press enter]

  • 2
    Worked for me! I had a Xiaomi Redme 7A, Android 9.0, which I had corrupted so badly I couldn't do a factory reset through Settings. So I went through your options. First adb shell and then recovery wipe_data, and got "... recovery: not found". Ditto for wipe data. Then I tried adb reboot recovery and the device responded (Joy!!!), and gave me a short sequence of confirmation dialogs, driven from the Volume Up/Down and power keys, and then did with the reset. The device was NOT in fastboot mode. It was just attached to the USB, with normal developer options enabled. Jul 10 '20 at 3:53
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Andrew T.
    Jul 13 at 14:10

For devices that support Fastboot mode, you can try the following commands:

  1. Enter fastboot mode: adb reboot bootloader
  2. Check whether the mobile phone is also in fastboot mode: fastboot devices
  3. Delete the data: fastboot erase userdata
  4. Delete cache: fastboot erase cache
  • What if the device doesn't support Fastboot commands?
    – esQmo_
    May 31 '17 at 10:58
  • good point. Then your solution will need to be used. Many devices support fastboot commands, so I think this is a good option in most cases.
    – user221603
    May 31 '17 at 11:16
  • @esQmo_ Which devices? May 20 at 12:30
  • source 404; if we delete data, cache will also delete? May 20 at 12:33
  • @SmartManoj Samsung devices don't support fastboot commands. Deleting data also deletes cache
    – esQmo_
    May 20 at 13:57

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