Question

In genymotion settings->storage there is only the internal storage, no SD card.

Is there a way to have a SD card also?

Was it helpful?

Solution

There's already some emulation of SD card (external) storage in Genymotion that might work for you, depending on what you're trying to do. Although Settings->Storage doesn't show it separately as External Storage like you might expect, Genymotion does emulate external storage. The size of files stored there will be reflected in the totals shown under Internal Storage by Settings-Storage.

Running in Genymotion, an app using Environment.getExternalStorageDirectory().getPath() or .getAbsolutePath() will get back /storage/emulated/<userId>, where userId=0 if the app is running as Owner, and 10, 11, 12, etc. if the app is running as another user or restricted/managed profile. The Android framework actually maps this for you to /mnt/shell/emulated/<userId>, which is why you won't find /storage/emulated/<userId> if you use a shell to poke around.

The paths /sdcard and /mnt/sdcard are symlinks to /storage/emulated/legacy, which is basically the Owner's storage. Don't use these in your apps, since they might not exist everywhere and/or your app might not have access to them if not running as Owner. They are just there to support legacy hardcoded apps.

Not being sure what you're trying to do, it's probably also worth mentioning that Genymotion now supports VirtualBox shared folders which will appear under /mnt/shared inside your VM. Check their Google+ post for instructions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top