9

I need often to wipe data of a virtual device in Android Studio with Windows 10, is there a command line to wipe data of a virtual devices ?

Now I have to do it in Android Studio UI.

Image enter image description here

Added Content

I do by Wipe data/Factory reset through ADB, but I can't get the correct result.

WipeDate.bat

e:
cd E:\Android_SDK\platform-tools
adb shell
recovery --wipe_data
cmd

Result enter image description here

Community
  • 1
  • 1
HelloCW
  • 843
  • 22
  • 125
  • 310
  • Possible duplicate of [Wipe data/Factory reset through ADB](https://stackoverflow.com/questions/10817721/wipe-data-factory-reset-through-adb) – Martin Zeitler Aug 07 '19 at 02:17
  • Thanks! Would you please see the Added Content of this question? – HelloCW Aug 07 '19 at 02:51
  • Possible duplicate of [Android/Eclipse: where to write command-lines like “emulator -wipe-data”?](https://stackoverflow.com/questions/6831698/android-eclipse-where-to-write-command-lines-like-emulator-wipe-data) – SnakeException Aug 10 '19 at 18:40

1 Answers1

27

Open the terminal

android-sdk\tools>emulator -avd -wipe-data

Command Usage

emulator -avd Your_Device_Name -wipe-data

emulator -avd androidavd2 -wipe-data

For handling of Android Virtual Devices use can use avdmanager for more details see this link Command Line Tool For Android Emulator . This page also contains complete official documentation for using command line tools for doing almost everything using command line, like creating, deleting an avd, installing apk on the emulator and running you app on avd.

Hope this solves your issue.

Paul P Joby
  • 713
  • 7
  • 17