Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How to create an AVD with an external sd card?

Tags:

android

I'd like to create an Android Virtual Device against which I can test recent issues with writing to external SD cards. I would expect the external sd card to be found at location like "/storage/extSdCard/DCIM/" on the AVD's file system. Any suggestions on how I can accomplish this?

like image 583
ab11 Avatar asked Feb 12 '23 13:02

ab11


1 Answers

To add removable storage to your AVD use:

 ~/Android/android-sdk/tools/mksdcard [memory size] [output file] 

to create SD card image.

Then pass it in Advanced AVD Settings dialog: SD card -> External file

DONE :)

You can learn more about the mksdcard tool here: https://developer.android.com/studio/command-line/mksdcard

like image 114
i.shadrin Avatar answered Feb 24 '23 15:02

i.shadrin