HelloCW
HelloCW

Reputation: 2295

Is there a command line to wipe data of a virtual devices in Android Studio 3.4.2?

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

Upvotes: 10

Views: 7667

Answers (1)

Paul P Joby
Paul P Joby

Reputation: 773

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.

Upvotes: 28

Related Questions