How to emulate a real external sd card (update: removable storage) in Android Emulator
I am trying to emulate an external SD card as it would be in a real device.
In real device, external SD card cannot be written, except you are using the new "Storage Access Framework" (API 21 & 22)
When I add SD card with File or Size ...
I always get an SD recording to write, which doesn't match the real device (I think). I can create a "CreateFolder" folder with (I know I shouldn't be using direct access, but this is just for a test to see if I have write access):
String spathWriteTest="/storage/sdcard/";
new File(spathWriteTest + "createFolder").mkdir();
Any idea how to emulate a real external SD card?
+3
source to share
1 answer
When you set up an AVD and refer to "SD card", it really refers to external storage , not removable storage . The emulator does not emulate removable storage. You could see if Genymotion emulates removable storage.
+2
source to share