24

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?

2

2 Answers 2

16

You need:

Steps:

  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.

Alternate Option

You can also simply boot into the recovery then perform the reset manually. Type the following command on your terminal:

adb reboot recovery
3
  • 3
    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. Commented Jul 10, 2020 at 3:53
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Andrew T.
    Commented Jul 13, 2021 at 14:10
  • Not sure why this answer has so many upvotes but it is wrong at half. adb shell has no command recovery. Only small last part You can also simply boot into the recovery is correct (is it outdated?)
    – rzlvmp
    Commented Feb 8, 2022 at 4:42
9

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
5
  • 1
    What if the device doesn't support Fastboot commands?
    – esQmo_
    Commented May 31, 2017 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
    Commented May 31, 2017 at 11:16
  • @esQmo_ Which devices? Commented May 20, 2021 at 12:30
  • source 404; if we delete data, cache will also delete? Commented May 20, 2021 at 12:33
  • @SmartManoj Samsung devices don't support fastboot commands. Deleting data also deletes cache
    – esQmo_
    Commented May 20, 2021 at 13:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .