What path to use to save files to SD card, not internal storage?

be the droid

Member
May 12, 2010
14
1
0
You know how some apps ask you to manually enter the download path in their settings to store files? (ie /music/)

This was no problem before...but now with ICS, 4.0 with the separate phone and card drives (using Windows 7), I've lost the ability to save to SD by entering a path to the SD card. Any path I enter now only goes only to the internal storage ("phone").

Do you know what path to use to save files the SD card and not internal storage?
 
Re: What path to use to save files to SD card, not internal stora

The path to the second data partition on internal storage is /mnt/sdcard
The path to the actual SD card is /mnt/sdcard/ext_sd

Yes, it is pretty stupid, but that is the way ICS is- same thing on my Xoom.
 
  • Like
Reactions: be the droid
Re: What path to use to save files to SD card, not internal stora

Yeah, I gathered that path from ES File Explorer, /mnt/sdcard/ext_sd.

Unfortunately, when I enter that path in the settings in the app, it just creates a folder "mnt" in the root of internal memory, with the subdirectory "sdcard", and the subdirectory "ext_sd".

Ugh...any other ideas? :-\
 
Re: What path to use to save files to SD card, not internal stora

Yeah, I gathered that path from ES File Explorer, /mnt/sdcard/ext_sd.

Unfortunately, when I enter that path in the settings in the app, it just creates a folder "mnt" in the root of internal memory, with the subdirectory "sdcard", and the subdirectory "ext_sd".

Ugh...any other ideas? :-\

Well, it couldn't be creating a "mnt" directory in "/", since there already is one. It sounds like your are saying it is creating a path called "/mnt/mnt/sdcard/ext_sd"? That is freaky.

It could be that the app is hardcoded to start looking in "/mnt" directory. If that is the case, try a path of "sdcard/ext_sd" instead.
 
  • Like
Reactions: be the droid
Re: What path to use to save files to SD card, not internal stora

Well, it couldn't be creating a "mnt" directory in "/", since there already is one. It sounds like your are saying it is creating a path called "/mnt/mnt/sdcard/ext_sd"? That is freaky.

It could be that the app is hardcoded to start looking in "/mnt" directory. If that is the case, try a path of "sdcard/ext_sd" instead.
Actually, I think the app adds whater path I put in it to the /sdcard/ path.

So it ends up creating /sdcard/mnt/sdcard/ext_sd

Also, I noticed when using ES File Explorer, there's two unique paths that lead to the SD Card
1. /sdcard/ext_sd/
2. /sdcard2/

Maybe why this is, is obvious to someone more knowledgeable...

Wait! I think by typing all that, I've answered my own question. I'm going to try entering the path /ext_sd/music and see how that works...

That's it! It's working now...whew! I can check that off my todo list of "stuff that used to work with OG EVO". ;)
 
  • Like
Reactions: crxssi
Re: What path to use to save files to SD card, not internal stora

Also, I noticed when using ES File Explorer, there's two unique paths that lead to the SD Card
1. /sdcard/ext_sd/
2. /sdcard2/

Neat! I never even noticed that before! They must be symbolically linking things around to make it seem less insane. I just confirmed, it looks like

/sdcard = /mnt/sdcard (which is not an SD card)
/sdcard2 = /mnt/sdcard/ext_sd (which is the SD card)

Doesn't do that on my Xoom, where:

/sdcard = /mnt/sdcard (which is not an SD card)
there is no /sdcard2
<nothing> = /mnt/external1 (which is the SD card)

Nothing like consistency!
 
Re: What path to use to save files to SD card, not internal stora

This whole thing threw me for a loop too. Titanium Backup and my TWRP nandroid backups are backed up to the SDcard that is not really and SDcard but internal storage in disguise. I started to freak out a little bit when my real SD card didn't have my backups when I needed them.
 
Re: What path to use to save files to SD card, not internal stora

Path on my phone to SD Card

/storage/40A1-0AE8

** Note 4 Marshmallow 6.0.1
 
Re: What path to use to save files to SD card, not internal stora

I have purchased and downloaded TV shows, APPS and Music from Google Play onto my devise. However these downloads always seem to go to the internal storage even when the default write disk is set to SD Card. Photos taken with the camera however do automatically write to the SD Card with no problems. I have more items on my so-called "Wish list" but my devise is running out of room on internal storage. Can you help me?
 
I just figured out something. At least for every phone I came across today and even my Android Emulator had the SD Card Path like ' /storage/????-???? ' where every ? is a capital letter or a digit.

So, if /storage/ directory has a directory which is readable and that is not the internal storage directory, it must be the SD Card.

My code worked on all phones I tested and even on my android emulator!

String removableStoragePath;
File fileList[] = new File("/storage/").listFiles();
for (File file : fileList)
{ if(!file.getAbsolutePath().equalsIgnoreCase(Environment.getExternalStorageDirectory().getAbsolutePath()) && file.isDirectory() && file.canRead())
removableStoragePath = file.getAbsolutePath(); }
//If there is an SD Card, removableStoragePath will have it's path. If there isn't it will be an empty string.

If there is an SD Card, removableStoragePath will have it's path. If there isn't it will be an empty string.