getExternalStorageDirectory not working
Actually, that is the correct location.
From android 4,2 onwards, Google introduced multiple user accounts. Every user has his/her own external storage, which has the user ID in the path to maintain uniqueness.
The primary (default) user's ID is 0. So you get /storage/emulated/0/
as the path to the external storage.
I just learned this is the Jelly Bean's way of dealing with the lack of android.permission.WRITE_EXTERNAL_STORAGE
permission. I haven't seen such a behavior with older versions of Android.
Just add this line to your AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Environment.getExternalStorageDirectory()
refers to whatever the device manufacturer considered to be "external storage". I can be something else than the SD-card.
You may get more informations here: Find an external SD card location