Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 741
HelloCW Avatar asked Nov 29 '22 21:11

HelloCW


1 Answers

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.

like image 121
Paul P Joby Avatar answered Dec 04 '22 14:12

Paul P Joby