Tab Pro 10.1 --- /sdcard -vs- /mnt/shell/emulated/0 - Galaxy Tab Pro 12.2, 10.1, 8.4 Q&A, Help & Trouble

My internal sdcard (/mnt/sdcard) suddenly appears empty will all of the files located at /mnt/shell/emulated/0 (or /data/media/0)
All seems to run OK, but what could have happened? Is this simply an internal Android symlink that lost its way? Can I reconnect to more easily view these files and the download folder?
Thanks
Edit: Looks like I solved my own problem. The PlayStore offered to update SuperSU to v2.65 (from v2.49) which I had accepted. Reverting back solved the issue.

Related

[Q] How do I allow apps to write to internal SD? (Jelly Bean JRN84D)

Just put on this jelly bean ROM, and when trying to save files from dropbox onto the internal sd it says "error". Audiogalaxy, another app I use, won't allow me to save copies of my songs to the internal SD either. I feel like there's a setting somewhere that's preventing me from save files onto the internal sd, but can't find it. In ICS I was able to find it, pretty sure in Settings -> Storage, but no dice in Jelly Bean.
Any help?
I have you made sure settings>developer options>protect USB storage is not checked. That's where I'd start.
Just fired up Wugs toolkit 1.4 and set full file read/write/execute permissions to all those directories (or at least tried to). Still nothing.
Wanted to update that I was able to rename the DCIM folder to DCIM1 and now it can save camera pics to the phone. I still can't open up a dropbox file due to "storage full or unavailable".
I think you have an issue. You shouldn't have to grant any extra permissions for the apps to write to the SDcard, as there isn't actually an SDcard or partition for it. It's just a symlink to /data/local, a virtual "SDcard".
All my apps work fine writing/reading the "SDcard".
Have you made sure settings>developer options>protect USB storage is not checked. That's where I'd start.
o_z0ne said:
Have you made sure settings>developer options>protect USB storage is not checked. That's where I'd start.
Click to expand...
Click to collapse
Yessir this is not checked.
EDIT: also noticed that when I take a picture, it doesn't save it to the phone. The pic just disappears after it's taken.
Try fixing permissions and checking the permissions/owner on /sdcard/ and /data/media (where the /sdcard folder is symlinked from). There have been lots of threads about sdcard permissions and Jelly Bean,.
ex:
http://forum.xda-developers.com/showthread.php?t=174832
http://forum.xda-developers.com/showthread.php?p=2696762
Similar:
http://forum.xda-developers.com/showthread.php?p=21746289
Other possible solutions are suggested in links.
Just fired up Wugs toolkit 1.4 and set full file read/write/execute permissions to all those directories (or at least tried to). Still nothing. There's gotta be something I'm doing wrong here, I can't be the only guy who has this jelly bean rom installed and isn't using a microSD card.
papabri said:
There's gotta be something I'm doing wrong here, I can't be the only guy who has this jelly bean rom installed and isn't using a microSD card.
Click to expand...
Click to collapse
That's probably true, considering the GNex doesn't have a MicroSD slot .
haha yes true.
Wanted to update that I was able to rename the DCIM folder to DCIM1 and now it can save camera pics to the phone. I still can't open up a dropbox file due to "storage full or unavailable".
Solved this issue by doing this:
Reflash stock. Hold off on restoring data/media. There seems to be a problem with it in v1.4.
{{ WugFresh }}
I since put back on the JB rom and have full access with no issues. My issue was when I restored my backup to the phone, the permissions were messed up.
What you probably had was an ownership issue, not permissions.
http://forum.xda-developers.com/showpost.php?p=22970837&postcount=14
cmstlist said:
Latest CWM touch as of today, and also tried it with latest CWM non-touch.
Incidentally I just bumped into a caveat of transferring files to the GN in recovery mode. The permissions are set strangely when you push files over ADB in recovery, and as a result when booted into the OS I was unable to rename any of the pushed files/folders or put new files in. Since the DCIM directory was one that I'd pushed over, new photos weren't saving. And I did not have permission to change permissions.
To see the permissions properly when booted into the OS, you have to go into /data/media rather than /sdcard (same directory but permissions appear differently).
When I went in there and typed ls -n, I found that all the files I had pushed in recovery have UID & GID of 0. All files I had created afterwards had UID & GID of 1023. That explains everything. The owner is root for files that came from ADB in recovery, and media_rw for files created in the OS.
I can use chown, but it looks like the version of chown that comes with busybox does not have -R recursion implemented. Hrm. Aha! In CWM, chown does support -R. And we're off to the races. So from recovery I did:
cd /data/media
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
So if you bump into this again, try chown in ClockworkMod in ADB shell over USB.

sdcard0 and sdcard?

I have a Sprint GNex running RU Jelling M1 RC2 and I have two internal storages (if that makes sense). I have sdcard/ and I have storage/sdcard0. Both seem to contain all data on my sd card and appear to be the exact same. I just don't know why there is two. Anyone know?
symlinks.
Elaborate? Sorry but I do not know what that is/means?
DRatJr said:
Elaborate? Sorry but I do not know what that is/means?
Click to expand...
Click to collapse
In computing, a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution
Source Wiki.
Ok but it gets weirder. When I download an attachment from Yahoo mail and save it, a pic for example, it is in both destinations, but in gallery shows in sdcard0. why is that?
i believe this is the bug ppl are facing with jelly bean(including me).
jb seems to use the sdcard0 so previous files dont show up in apps such as gallery, music, etc..
i might be wrong but hope someone clears this up for the people having issues...
bluemoon1221 said:
i believe this is the bug ppl are facing with jelly bean(including me).
jb seems to use the sdcard0 so previous files dont show up in apps such as gallery, music, etc..
i might be wrong but hope someone clears this up for the people having issues...
Click to expand...
Click to collapse
It's not a bug. It's by design. The physical media of your sdcard exists as /data/media. On boot, your phone uses /data/media to create a virtual sdcard, found at /storage/sdcard0. After that, symbolic links are set up that point /sdcard and /mnt/sdcard to /storage/sdcard0.
The data exists in one place, /data/media. The rest are essentially just pointers to the information for backward/forward compatibility.
Edit: Code snippets showing the above. Note, these are from my VZW Nexus:
init.tuna.rc
Code:
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
# for backwards compatibility
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
mkdir /mnt/usbdisk 0755 system system
on post-fs-data
# we will remap this as /storage/sdcard0 with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
[...]
# create virtual SD card at /storage/sdcard0, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
[...]
Cilraaz said:
It's not a bug. It's by design. The physical media of your sdcard exists as /data/media. On boot, your phone uses /data/media to create a virtual sdcard, found at /storage/sdcard0. After that, symbolic links are set up that point /sdcard and /mnt/sdcard to /storage/sdcard0.
The data exists in one place, /data/media. The rest are essentially just pointers to the information for backward/forward compatibility.
Click to expand...
Click to collapse
yup.
thanks for the explanation
DRatJr said:
Ok but it gets weirder. When I download an attachment from Yahoo mail and save it, a pic for example, it is in both destinations, but in gallery shows in sdcard0. why is that?
Click to expand...
Click to collapse
A symlink can be looked at as basically a shortcut. So if you open sdcard0 you're in sdcard.
Sent from my Galaxy Nexus
Sprint, the Not Right Now Network
So can we delete sdcard with Root Explorer and just use sdcard0?
Vaporsilver said:
So can we delete sdcard with Root Explorer and just use sdcard0?
Click to expand...
Click to collapse
No, you can't.
That's designed that way because some apps look for /sdcard and others for /sdcard0. It doesn't affect in ANYTHING to you because after all, the files are actually stored in /data/media. There are no duplicate folders in any way.
Just use Root explorer and save the files wherever you want. One day you can use /sdcard and the other /sdcard0. The second day you'll find that the files you put in /sdcard are in /sdcard0.
Android from ICS and onwards wasn't meant that you look for the files using a Root explorer. In fact, all apps can browse the storage area how they want and you don't need to worry about it.
Cheers!
el_charlie said:
No, you can't.
That's designed that way because some apps look for /sdcard and others for /sdcard0. It doesn't affect in ANYTHING to you because after all, the files are actually stored in /data/media. There are no duplicate folders in any way.
Just use Root explorer and save the files wherever you want. One day you can use /sdcard and the other /sdcard0. The second day you'll find that the files you put in /sdcard are in /sdcard0.
Android from ICS and onwards wasn't meant that you look for the files using a Root explorer. In fact, all apps can browse the storage area how they want and you don't need to worry about it.
Cheers!
Click to expand...
Click to collapse
Awesome thanks! That really clears things up.
I have a question along the same lines, but don't feel it needs it's own thread.
I have a VZE Gnex (toro) that I unlocked and rooted. I've previously owned the G1, G2, and Sensation. I'm not too bad of a n00b, but I have my moments, and this may be one of them haha.
I was looking to flash the AOKP JB nightly, and I was reading up on how to wipe everything properly, as this is my first experience without an SD card. I use TWRP and I performed factory reset, wiped system, flashed ROM, flashed Gapps, wiped cache + dalvik, rebooted. Upon reboot, most of my folders were missing from my 'SD card' when viewing them from my PC, so I reverted back to the backup I made prior to starting all of this. The backup wasn't all that big, yet all of my stuff was back. Also, even though the fresh install of AOKP didn't show much of anything on the 'sdcard' from my PC, I could still access the AOKP ROM file in recovery, so it seems the data was still there, just hidden from view on my PC.
My questions are:
What exactly does a Factory Reset wipe when it comes to the 'SDcard'?
Is my issue just a remnant of the .nomedia issue? I thought I had fixed that prior to doing any of this, but who knows how far it went.
What types of folders are affected by a wipe on the 'SDcard'?
What types of folders are not affected by a wipe on the 'SDcard'?
What do I see the files in ICS and not JB, yet it appears they are still there (just not on my PC)? Is it because of the stupid MTP and not Mass Storage?
How do I know what folders are MTP viewable and which aren't so I don't have to mess around with "ADB Pull" command as much?
I'm confused on what I need to back up, and what will be OK to leave on the internal storage. Any help would be appreciated. I did my best searching here on XDA and RootzWiki with things I thought may be valid. If I missed something, don't flame me. I did actually search
1. A factory reset with a custom Recovery wipes /data and /cache partitions BUT in the case of the GNexus, /data/media is not affected. In that location is where the "sdcard" resides. That's what you look when you connect the phone to a PC. The stock recovery wipes everything and leaves the phone as new.
2. The .nomedia is to hide certain files from the media scanner and avoid to display unwanted files in the Gallery or Music Player.
3. and 4. Like I said, using a custom recovery (TWRP or CWM) doesn't touch the /data/media folder, so no files are deleted there. You wouldn't want to delete the folder where your NANDROID backup is stored, do you?
5. If you're still on ICS connect the phone to the PC and backup EVERY THING just to be safe, including the NANDROID folder.
After you wipe and flash the new ROM you'll still see the old files (like pictures, music, and so on). You can delete them if you like.
Cheers!
el_charlie said:
1. A factory reset with a custom Recovery wipes /data and /cache partitions BUT in the case of the GNexus, /data/media is not affected. In that location is where the "sdcard" resides. That's what you look when you connect the phone to a PC. The stock recovery wipes everything and leaves the phone as new.
2. The .nomedia is to hide certain files from the media scanner and avoid to display unwanted files in the Gallery or Music Player.
3. and 4. Like I said, using a custom recovery (TWRP or CWM) doesn't touch the /data/media folder, so no files are deleted there. You wouldn't want to delete the folder where your NANDROID backup is stored, do you?
5. If you're still on ICS connect the phone to the PC and backup EVERY THING just to be safe, including the NANDROID folder.
After you wipe and flash the new ROM you'll still see the old files (like pictures, music, and so on). You can delete them if you like.
Cheers!
Click to expand...
Click to collapse
Thanks for the fast reply, but I still am wondering why I can't see the exact same files in AOKP that I could see in stock ICS. Any clues? Should I just move everything to /data/media/ using root explorer and see if they all show up?
Well the solution I've come to is to run
adb pull /sdcard/ c:\android\sdcardbackup8-17-2012
to back absolutely everything up, perform a full wipe of everything (including storage), flash AOKP, flash Gapps, wipe cache, wipe dalvik, reboot, then run
adb push c:\android\sdcardbackup8-17-2012 /sdcard/
Hopefully this helps someone else out
I find there is a problem in the sync's. /sdcard/ does not show always what's in /storage/sdcard0/. From pc I see no new files while on my nexus in /storage/sdcard0/ i see the file and /sdcard/ i don't. Not sure why the sync does not occur any faster. Seems like a bug. I thought hmm, maybe the disconnect usb near clock might do the trick to fix the problem but it doesn't. My pc is a slave to whenever my driod syncs the two.
Flukester69 said:
I find there is a problem in the sync's. /sdcard/ does not show always what's in /storage/sdcard0/. From pc I see no new files while on my nexus in /storage/sdcard0/ i see the file and /sdcard/ i don't. Not sure why the sync does not occur any faster. Seems like a bug. I thought hmm, maybe the disconnect usb near clock might do the trick to fix the problem but it doesn't. My pc is a slave to whenever my driod syncs the two.
Click to expand...
Click to collapse
What files aren't you seeing?
*Shaolin Shadowboxing*
Flukester69 said:
I find there is a problem in the sync's. /sdcard/ does not show always what's in /storage/sdcard0/. From pc I see no new files while on my nexus in /storage/sdcard0/ i see the file and /sdcard/ i don't. Not sure why the sync does not occur any faster. Seems like a bug. I thought hmm, maybe the disconnect usb near clock might do the trick to fix the problem but it doesn't. My pc is a slave to whenever my driod syncs the two.
Click to expand...
Click to collapse
I find that MTP is slow to show updates to sdcard. Same for Asus TF101. So may be it is the design or problem of MTP, something to do with MTP cache update?

Can't restore clockworkmod backup.

As I've done a a handful of times, I was switching roms and did a data wipe. At that point it did something different and wiped my SD card. I thought I lost all my data, but my original backup is now located in /0/0/clockworkmod/backup -- but nothing I do can restore it. My computer won't copy it, clockworkmod doesn't recognize it, and a restore from the clockworkmod rom doesn't work....
Any ideas?
You need to move it outside of the 0 folders. The clockworkmod folder should be placed in /data/media. Easiest way would probably be to flash twrp from here http://goo.im/devs/billard412/d2spr/Flashable_recovery_US_GS3/TWRP2.3.zip using cwm and then select advance>reboot recovery. Then youll boot into twrp where you want to hit advance> file manager and go to data/media/0/0/ and move the clockworkmod folder to data/media. Once its there flash back to cwm using one from here
http://goo.im/devs/billard412/d2spr/Flashable_recovery_US_GS3 and then select reboot>recovery.and you'll be back in cwm where you can then restore
billard412 said:
You need to move it outside of the 0 folders. The clockworkmod folder should be placed in /data/media
Click to expand...
Click to collapse
I've tried moving it. It's a very large file, and it seems to get corrupted during the move.
My SDCARD now looks like this
0/
legacy/
obb/
Inside 0/ is all the normal folders such as data, downloads, etc. While inside the rom or windows, I can not access the root sdcard folder.
Try the way I mentioned above.
I'll give it a try if this doesn't work. There's a bunch of folders such as /sdcard and /storage. Inside of /storage there is /storage/sdcard1 (internal) /storesdcard2 (external) and /storage/emulated
I'm using Cyanogen 10 on my Galaxy S3 btw. I've never seen clockworkmod put in /data/media. I'm copying it to /storage/emulated since there is a 0 and a legacy folder inside.
Because /data/media and /sdcard were the same thing. Google changed that with 4.2 which is why you now have 0 folders. Clockworkmod still sees it the old way as data/media. Trust me on this the more you play around moving stuff inside /storage and /sdcard. The more screwed up and confusing this will get.
billard412 said:
Because /data/media and /sdcard were the same thing. Google changed that with 4.2 which is why you now have 0 folders. Clockworkmod still sees it the old way as data/media. Trust me on this the more you play around moving stuff inside /storage and /sdcard. The more screwed up and confusing this will get.
Click to expand...
Click to collapse
Makes sense. I updated to a new nightly of CM10, which put me on 4.2. I didn't like the way it was setup, so I tried to revert back. I'm not sure why I'm doing all this work when I have a titanium backup from last night.
It's still pasting.
Check when its done the layout should be /data/media/clockworkmod/backup/nameofbackup/stuff inside
Well, I don't think it's going to work.
I'll give your method a try, but I moved my SD card to /storage/emulated where it showed up, and it gave me an error restoring storage. Inside clockworkmod is my backup and files.
Edit: It appears everything is a symlink. /sdcard, /data/media, and /storage/emulated are all the same symlink'ed folder.
UrbanMuppet said:
Well, I don't think it's going to work.
I'll give your method a try, but I moved my SD card to /storage/emulated where it showed up, and it gave me an error restoring storage. Inside clockworkmod is my backup and files.
Click to expand...
Click to collapse
Well you're the expert. Swear it looked like u were asking since you posted in the q&a.
billard412 said:
Well you're the expert. Swear it looked like u were asking since you posted in the q&a.
Click to expand...
Click to collapse
There's no need to be passive aggressive. All I'm saying is it won't restore due to an error in the backup after moving it.
Well, I used a different file manager to move it to the same location (Root Explorer), and it works fine now. I still had to move all my files back from /0, but at least it's not fubar'ed. I'll wait for 10.1 to become more stable before I switch.
Sorry to hijack this thread, but I've had exactly the same problem and despite following the instructions in here (moving clockworkmod/backup to data/media with a root file explorer) nothing has changed.
The error shown in the log is as follows:
Error whilst restoring /system!
I: Can't partition non-vfat: datamedia
I: Can't format unknown volume: emmc
Any suggestions would be greatly appreciated - an entire afternoon and evening on google have so far yielded nothing but nonsense!
Thanks,
Will
The SD card file path issue (from the op and the most recent hijacker) reads like something that just happened to me too.
I installed a nightly cm update and then it went bad. Recovery wouldn't work, but file explorers looked OK. Recovery wouldn't even see zip files that were moved into the available directories for install.
I finally was able to use ROM manager to install rom updates and gapps.
sent from a secret underground bunker

SDcard problem, media contents can not be detected

No media files on the sdcard are showing up in any apps other than file explorers and they are viewable/playable on stock apps through the explorers. Started this morning. Only thing I noticed that was different was that a few apps auto updated while I was asleep which might have caused the problem. I tried dismounting/mounting, restarting the phone several times, made a backup of the sdcard on the computer and formated it on the phone but still no luck. I tried moving the files to different folders in the sdcard as well as the root destination (if thats what its called, I put the files on the sdcard not within a folder) still nothing. When I copy a file from the sdcard to the phone memory only then do they show up, but moving them back to the sdcard does not fix the problem. When taking a photo, the file is saved in the same destination as my older files on the sdcard but the new image is the only one that shows up in the gallery. It's driving me crazy! Please help! :crying:
Apps that were updated included some samsung update. Could that have caused the problem?
Samsung Galaxy Note 2 GT-N7100. Not rooted.

Question Internal storage '/sdcard' unmounted [SOLVED!]

I am running the latest stock Oxygen OS version (11.2.10.10.LE15AA), rooted with Magisk. Somehow the internal /sdcard directory got unmounted and now I cannot save anything to the user storage because it doesn't exist. I could not even take screenshots because it saves by default to /sdcard/DCIM/Screenshots which doesn't exist now, so I apologize for having to take photos of a screen (the first is from terminal, the other 2 are from ES File Explorer). However, when I run "ls -la /" as superuser in a terminal window it lists sdcard. Does anyone know how to fix this? How do I re-mount /sdcard and get it recognized again?
eudemonics said:
I am running the latest stock Oxygen OS version (11.2.10.10.LE15AA), rooted with Magisk. Somehow the internal /sdcard directory got unmounted and now I cannot save anything to the user storage because it doesn't exist. I could not even take screenshots because it saves by default to /sdcard/DCIM/Screenshots which doesn't exist now, so I apologize for having to take photos of a screen (the first is from terminal, the other 2 are from ES File Explorer). However, when I run "ls -la /" as superuser in a terminal window it lists sdcard. Does anyone know how to fix this? How do I re-mount /sdcard and get it recognized again?
Click to expand...
Click to collapse
Try to reboot to recovery and factory reset
Fixed the /sdcard unmounted error!
What finally ended up working was flashing the Oxygen OS zip in TWRP and rebooting without root. I noticed my internal storage was restored along with all the files in it — but then when I rebooted to bootloader to re-root the device with a Magisk-patched boot.img (booting into Android once as temp root with "fastboot boot magisk_patched.img", then running the Magisk app and selecting "direct install" to patch boot.img for permanent root) the /sdcard unmounted error came back! So I disabled all the newer Magisk mods I had installed, rebooted, and I have /sdcard again along with root. Yay! Factory reset was going to be my next attempt if that didn't work though.

Categories

Resources