Reputation: 3137
I just want to know how to wipe the virtual sdcard in the android emulator.
Upvotes: 3
Views: 14596
Reputation: 11691
Store your android avd data into a separate dir and just delete the dir and recreate the avd:
rm -rf $TMPDIR
install -d $TMPDIR
$android create avd --force --target "$target" --name $avdname \
--sdcard 32M --skin WVGA800 --path $TMPDIR
emulator -avd $avdname -wipe-data -qemu -enable-kvm ...
That way, you make sure that you always start from an at least somewhat consistent state.
Upvotes: 0
Reputation: 1474
You can do it easily from Android Settings app: "Storage"->"Erase SD card".
Upvotes: 8
Reputation: 13293
With the expected caveats and warnings about using commands in the "rm -r *" family, you can also use: adb -e shell rm -r /mnt/sdcard/*
Upvotes: 11
Reputation: 2063
You could try deleting this file: sdcard.img in the emulator directory. That's where it stores the info.
Just rename at first it in case it crashes things. I haven't tested this before.
Upvotes: 1
Reputation: 12823
When you launch the emulator there's a checkbox to wipe user data.
Upvotes: 0