Using the emulator, with external storage attached, I would like to emulate what happens when the application starts up and certain files are already present in the relevant directory on ext storage.
Is the external storage actually located on my machine, after enabling it in the AVD? Or should I be creating the files with some temporary, throw away code? Or should I just test on a real device?
What is best practice for this scenario?
The
sdcard.imgis in the avd folder (~/.android/avd). If you are using Linux or OSX you can mount it, manipulate the files inside, and unmount it.Probably there’s a program in Windows that let you do the same.
As an alternative, you can start the emulator and then manipulate the sdcard content using
adb push/pullorDDMS.