So I have my NAM Desire Z (unlocked, WWE Desire Z rom, s-off), and I wanted the stock audio sounds for notifications and alarms as well, so I pulled them out of a stock rom and adb pushed them into the /system/media/(respective alarm and notification files). But now when I go to select them, they show up twice of each (i.e. Pixie Dust, Pixie Dust, Buzzer Alarm, Buzzer Alarm). I didn't push it twice, and I have already cleared out the media storage and other indexing data caches to try and force it to reindex but it still does it. Any thoughts?
By any chance are those files on your SD card as well?
raitchison said:
By any chance are those files on your SD card as well?
Click to expand...
Click to collapse
Nope, I made sure I removed them. I did back up the original media file before messing around with it though and put that on my computer.
I would try removing all the files in those folders and see if they disappear from the list, then add one back and see what happens.
Sorry I don't have a lot of expertise in this area.
raitchison said:
I would try removing all the files in those folders and see if they disappear from the list, then add one back and see what happens.
Sorry I don't have a lot of expertise in this area.
Click to expand...
Click to collapse
To do that though would require me to adb rm <each file> which would take forever. I tried just deleting the whole folder, but it would not let me, saying "that is a directory." Any other ideas?
mrmartin86 said:
To do that though would require me to adb rm <each file> which would take forever. I tried just deleting the whole folder, but it would not let me, saying "that is a directory." Any other ideas?
Click to expand...
Click to collapse
You should be able to do it with a file explorer app on the phone, there are a few that allow you to select multiple files and delete in one operation, I know Android Mate is one. You may need to remount your /system first.
raitchison said:
You should be able to do it with a file explorer app on the phone, there are a few that allow you to select multiple files and delete in one operation, I know Android Mate is one. You may need to remount your /system first.
Click to expand...
Click to collapse
I have root explorer, but I can only access read only when i go into the media folder in /system. The only spot I can change from R/O to R/W is at the main / level, but not /system
Have you tried remounting /system from a command line?
mount -o remount, rw /system
raitchison said:
Have you tried remounting /system from a command line?
mount -o remount, rw /system
Click to expand...
Click to collapse
You are alright by me sir. Excellent. Solves one issue on removing those things. The only problem is there are not multiples, so why they showing up multiple times?
So when you removed all the files did they all disappear from the list? If the system is reading a duplicate somewhere else on the phone the list should still show them, if not the list should be empty.
raitchison said:
So when you removed all the files did they all disappear from the list? If the system is reading a duplicate somewhere else on the phone the list should still show them, if not the list should be empty.
Click to expand...
Click to collapse
Alright I tried that, removed them completely, cleared the media storage, then nothing showed, rebooted, still nothing, then I copied them over from the sdcard card and it still indexes them twice (and yes I deleted it from the sdcard). What gives?
Related
Probably I missed this question being answered somewhere, but I am tired of searching for it, so here it goes...
I decided not to root my device for now, and I am trying to get the most of it with stock limitations. Generally it is fine, but what bothers me most is the fact that i seem to be unable to write any files on phones internal memory. Is it so, that all / filesystem is inaccessible for write, or is there a dir where i could store some files i would like my phone to be able to access while sdcard is unmounted?
I may be wrong but thats the limitations of a "stock" phone,if you want access to the files you would have to root AFAI
That's exactly the impression I have, and I don't like the idea. I'm ex WM5/WM6 user, and I simply cannot understand why can't I have let's say /tmp/ dir just for myself...
banannq said:
That's exactly the impression I have, and I don't like the idea. I'm ex WM5/WM6 user, and I simply cannot understand why can't I have let's say /tmp/ dir just for myself...
Click to expand...
Click to collapse
Any reason for not rooting then? there are plenty stock roms/alternatives out there.
I grown tired of constantly tweaking my previous htc smartphone, decided to keep this one stock at least for now. I know rooting is an open door I will not want to close
and also I think there's no rooting method for gingerbread so far, is there?
As much as I know a downgrade is involved,I know what you mean about tinkering with the phone!It gets obsessive at times
You should have access to /data/local or at the very least /data/local/tmp
That's where fiels get pushed for rooting.
-Nipqer
The problem is I cannot even open /data directory
How are you trying to access the /data folder?
Cause if its some file manager app, some of them will only read sdcard.
-Nipqer
I'm used fre3vo to get temproot on my device (Z, Android 2.3.3),
and after that called:
mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system
i can write to /system, but after reboot or remount into readonly all my changes dissapearing. Should i need S-OFF on my device? Can i get S-OFF without rollback to v1.34 on temp rooted 2.42?
Yeah the emmc is write protected when you are s-on, so any changes to /system will dissappear on reboot.
Unfortunately you cannot get s-off without downgrading to 1.34.
-Nipqer
Nipqer said:
How are you trying to access the /data folder?
Cause if its some file manager app, some of them will only read sdcard.
-Nipqer
Click to expand...
Click to collapse
Normaly I use total commander for android, but tried also ES File explorer, Linda manager, andexplorer... all of them basicaly let me view / folders (with exception of /data, /root, /cache etc) so i think it is filesystem condition rather than file manager fault...
banannq said:
Normaly I use total commander for android, but tried also ES File explorer, Linda manager, andexplorer... all of them basicaly let me view / folders (with exception of /data, /root, /cache etc) so i think it is filesystem condition rather than file manager fault...
Click to expand...
Click to collapse
try root explorer. you can still view directories without root (the app will just tell you that it failed to request superuser access). I'm pretty sure everything under /data is r/w access by default. My phone is rooted so I can't verify whether or not you can write to that directory on stock (I'd assume you could as long as there's free space available) but I can definitely recall being able to look at all my directories on stock using root explorer.
sephiroth1439 said:
try root explorer. you can still view directories without root (the app will just tell you that it failed to request superuser access). I'm pretty sure everything under /data is r/w access by default. My phone is rooted so I can't verify whether or not you can write to that directory on stock (I'd assume you could as long as there's free space available) but I can definitely recall being able to look at all my directories on stock using root explorer.
Click to expand...
Click to collapse
I guess it doesn't matter what software i use android simply locks me out of internal phone memory. It sucks, because phone was advertised as having over 1GB of internal storage space (no mention about it being inaccessible), and i can't even store ringtones on my device (have to use sdcard, and suffer side effect of it being unmounted at times). What a shame... with all the greatness, android sucks at very simple things
banannq said:
I guess it doesn't matter what software i use android simply locks me out of internal phone memory. It sucks, because phone was advertised as having over 1GB of internal storage space (no mention about it being inaccessible), and i can't even store ringtones on my device (have to use sdcard, and suffer side effect of it being unmounted at times). What a shame... with all the greatness, android sucks at very simple things
Click to expand...
Click to collapse
Don't blame Android for your carrier locking down your device
Sent from my HTC Vision using XDA App
How the hell can i delete a folder that can't be seen via PC connection but i can see it using es file explorer?
I can't delete it using ES even with root enabled....
zerozoneice said:
How the hell can i delete a folder that can't be seen via PC connection but i can see it using es file explorer?
I can't delete it using ES even with root enabled....
Click to expand...
Click to collapse
Depending on where it is you need to mount it first. Which folder are you trying to delete?
Sent from my Galaxy Nexus
I had a folder that became corrupted (repeatedly interrupted game data downloads, I think). I was unable to delete it (even as root) and received an Access Denied error. I was able to rename the folder (so it wouldn't conflict anymore) and delete the majority of its contents (still received the Access Denied error on a file or two). I eventually had to do a full wipe via fastboot -w to get rid of the corrupted files.
had the same problem. had to reflash su.zip and it worked. can't explain it though. just reaching at straws
matt30 said:
Depending on where it is you need to mount it first. Which folder are you trying to delete?
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
it's the folder created by the Photaf application.
i uninstalled the app and the folder is still there...permissions are writable, not hidden...
i can rename it, but can't delete it....and the subfolder within it as well...
i remember it happened once before and the only way to get rid of it was to reinstall the ROM (AOKP). Once installed, i could delete the folder.....
Try reinstalling the game and using settings/application/name of game clear data
Sent from my Galaxy Nexus
bwcorvus said:
Try reinstalling the game and using settings/application/name of game clear data
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
no effect, still can't be removed
LE: WTF, i just plugged in the phone into USB for charging and i saw the folder?! It deleted just fine?
Damn weird didn't do anything different than yesterday when i couldn't even see the folder via PC...
Thank you!
My Asus Transformer (TF101) hasn't been able to download anything to the Download folder for months now. Even Opera (which I installed just to try and fix this) could only download to a different folder. I did what you said, plugged it into the computer and first renamed the folder with ADB but couldn't create a new Download folder. "File already exists." Lies. Windows Explorer said it was still there as Download so I deleted it in Explorer and created a new folder named Download. The create failed but Android said it was there and Voila! I can download again. Very weird, but not ready yet to reformat in fastboot. Thanks guys!
If you're rooted you may be able to delete the files from /data/media, which is the true location, instead of the visual SD that you are seeing.
Could also be a file ownership issue.
Using a terminal emulator, use the following command to list ownership and permissions:
ls -l
(Lower case letter L, not i or 1)
Most of the files and folders should show up as media_rw, but the problematic ones may show up as numbers. To fix them, boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
Hi
I recently restored my Nexus with the toolkit but when it put the files back, I think a permissions problem has occurred. I can rename folders, but I can't delete them. I have a rather large folder that I can't get rid of. When I try in various programs, it says delete failed, or no permissions, etc.
I am rooted, and have installed Terminal emulator, but am not terribly familiar with how to use it.
Any tips would be helpful.
Thanks
warlock257 said:
Hi
I recently restored my Nexus with the toolkit but when it put the files back, I think a permissions problem has occurred. I can rename folders, but I can't delete them. I have a rather large folder that I can't get rid of. When I try in various programs, it says delete failed, or no permissions, etc.
I am rooted, and have installed Terminal emulator, but am not terribly familiar with how to use it.
Any tips would be helpful.
Thanks
Click to expand...
Click to collapse
Simple solution might just be that your file explorer app doesn't have root access. Force stop it in apps->settings, check your superuser app and clear any saved entries for it, and launch the app again. It should request root privileges.
Where are the files/folders in question located? If they're in a secure place like /system/ then it's more likely to be the above scenario. If they're just in your sdcard folder, are they user made, or at all special?
Edit: Also in the future, this sort of thing is what the Q&A forum is for.
JoeSyr said:
Simple solution might just be that your file explorer app doesn't have root access. Force stop it in apps->settings, check your superuser app and clear any saved entries for it, and launch the app again. It should request root privileges.
Where are the files/folders in question located? If they're in a secure place like /system/ then it's more likely to be the above scenario. If they're just in your sdcard folder, are they user made, or at all special?
Edit: Also in the future, this sort of thing is what the Q&A forum is for.
Click to expand...
Click to collapse
I was using Root explorer, and have granted it root access
It is in /SDcard, so it shouldn't be anything that's protected
warlock257 said:
I was using Root explorer, and have granted it root access
It is in /SDcard, so it shouldn't be anything that's protected
Click to expand...
Click to collapse
Did you check the permissions for what you're trying to delete? They're displayed right in the normal view in root explorer, and you can edit them from the long press menu.
Anything unusual about the files/folders themselves? Were they created on the phone? By you? By apps? Copied and pasted over USB from a computer? You could try deleting from your computer over USB.
As for command line options, you can try 'rm -r [path]' for a folder and just 'rm [path]' for a file. rm is the delete(remove) command, -r is the recursive flag to apply the action to all items in the directory if a directory is the target. Pretty sure that you can do that straight from terminal emulator on your phone, and from a command prompt over usb you'd need to use 'adb shell' first.
JoeSyr said:
Did you check the permissions for what you're trying to delete? They're displayed right in the normal view in root explorer, and you can edit them from the long press menu.
Anything unusual about the files/folders themselves? Were they created on the phone? By you? By apps? Copied and pasted over USB from a computer? You could try deleting from your computer over USB.
As for command line options, you can try 'rm -r [path]' for a folder and just 'rm [path]' for a file. rm is the delete(remove) command, -r is the recursive flag to apply the action to all items in the directory if a directory is the target. Pretty sure that you can do that straight from terminal emulator on your phone, and from a command prompt over usb you'd need to use 'adb shell' first.
Click to expand...
Click to collapse
In root explorer the info under the folder says
rwxrwxr -x
I'm pretty sure that the problem started when I restored from the nexus toolkit on pc. I had a similar problem with my camera in that it couldn't save pictures to a folder, but all I did was rename the folder, and the camera app created a new one.
rm -r [path] in terminal emulator says "permission denied"
EDIT
upon further googleing, the 'chmod' command might be what I want, but I'm not sure which syntax is right.
warlock257 said:
In root explorer the info under the folder says
rwxrwxr -x
I'm pretty sure that the problem started when I restored from the nexus toolkit on pc. I had a similar problem with my camera in that it couldn't save pictures to a folder, but all I did was rename the folder, and the camera app created a new one.
rm -r [path] in terminal emulator says "permission denied"
EDIT
upon further googleing, the 'chmod' command might be what I want, but I'm not sure which syntax is right.
Click to expand...
Click to collapse
For chmod you want 'chmod [number] [path]', where number is a string that's a bit complicated to explain. You can learn about it by googling chmod probably better than I could type it out here on the fly. But if you use 777, it should assign full permissions, which would display as rwxrwxrwx in root explorer.
You can achieve the exact same effect in root explorer though, long press and choose permissions and you'll get a 3x3 grid. All boxes checked= full permissions, same as chmod 777. The three lower boxes for special permissions should be unchecked (fyi, they would turn chmod's numeric component into a 4 digit number, and as far as I know, android doesn't really use them at all).
Also, did you type su in terminal first? It doesn't innately have root (just like any app) so you need to do that and confirm the popup first. You'll need to do this before using chmod, and if you didn't do it before using rm, try it again.
Worth a try but just for reference, rwxrwxr-x is the normal permissions set for folders on the sdcard, so that's not immediately looking like a problem.
at the top of root explorer, theres a button that says mount r/w. press it, now it should say mount r/o. go ahead and delete that file now
simms22 said:
at the top of root explorer, theres a button that says mount r/w. press it, now it should say mount r/o. go ahead and delete that file now
Click to expand...
Click to collapse
Found the button, but didn't work
JoeSyr said:
For chmod you want 'chmod [number] [path]', where number is a string that's a bit complicated to explain. You can learn about it by googling chmod probably better than I could type it out here on the fly. But if you use 777, it should assign full permissions, which would display as rwxrwxrwx in root explorer.
You can achieve the exact same effect in root explorer though, long press and choose permissions and you'll get a 3x3 grid. All boxes checked= full permissions, same as chmod 777. The three lower boxes for special permissions should be unchecked (fyi, they would turn chmod's numeric component into a 4 digit number, and as far as I know, android doesn't really use them at all).
Also, did you type su in terminal first? It doesn't innately have root (just like any app) so you need to do that and confirm the popup first. You'll need to do this before using chmod, and if you didn't do it before using rm, try it again.
Worth a try but just for reference, rwxrwxr-x is the normal permissions set for folders on the sdcard, so that's not immediately looking like a problem.
Click to expand...
Click to collapse
it might be the files within the folder, rather than the folder itself. going into it, some of the files have a shield on them
When I go into its permissions, some of them were unchecked. I checked the 9 at the top, and it says:
"permissions change was not successful. Please note that some files systems (e.g. SD card) do now allow permission changes."
warlock257 said:
Found the button, but didn't work
it might be the files within the folder, rather than the folder itself. going into it, some of the files have a shield on them
When I go into its permissions, some of them were unchecked. I checked the 9 at the top, and it says:
"permissions change was not successful. Please note that some files systems (e.g. SD card) do now allow permission changes."
Click to expand...
Click to collapse
Well under normal circumstances, individual files on your sdcard should have permissions rw-rw-r--, and folders have rwxrwxr-x. (For reference, this is read as read, write, execute for Root, System, and Other, with dashes indicating that a permission is denied. So rwxrwxr-x means all permissions are granted to all three groups except for write to Other). This ties into larger aspects of the OS that basically exist to stop individual apps from reading or writing whatever they want without being included in groups.
The fact that you can't do something that shouldn't require elevated permissions, and you're getting that kind of error when you try to execute commands with higher permissions, suggests to me that your sdcard partition is using the wrong filesystem. Sort of sounds like a program tried to treat it like a real sdcard and formatted it to something else, in which case I have a hunch you're going to need to back up your data and do a full reset.
You might get a simpler solution if you ask in the thread for the toolkit you used. It's not something I have any experience with so good luck.
Out of curiosity, are you on Jellybean now? Jellybean changed the address for the sdcard partition, so if the toolkit wasn't updated to reflect this, it seems like the likely place things may have gone wrong.
---------- Post added at 07:04 PM ---------- Previous post was at 06:53 PM ----------
Actually if you want to check if it's using the right filesystem, run the command 'mount' from terminal. It'll give you a bunch of information, probably towards the bottom will be a line that mentions sdcard. Mine reads as
/dev/fuse /storage/sdcard0 fuse [more info about how it's currently mounted]
Yours -should- say that if you're on JB. If you're not, it should say something instead of /storage/sdcard0 (maybe /mnt/sdcard? I forget how it was on ICS). If it says something in place of fuse that may be the problem.
..I actually think mount used to say that the sdcard block was formatted as yaffs2, while everything else was formatted as ext4. Or maybe I just looked up that it was yaffs2 online, not from terminal on my phone? I wonder if this whole thing is the reason why some people seem bootloop-prone when flashing JB roms, if the changes have cut out access to important information about the filesystem, it may be triggering a really long error scan if their sdcard partition is large.
yes, backed up in ICS, and went to Jellybean.
doing a 'mount', I believe the line reads
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,realtime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
The files that have the shield icon have permissions:
rw-rw-r--
Yeah so everything that I can think of for you to check seems to be displaying as though normal. Although I don't know what aspect of these files root explorer is reading to mark them as protected and put the little shield on them.
You've tried these methods (rm, chmod) on individual files within the folder too, right? I guess this comes more from experience deleting protected files in windows, but I've found that sometimes a folder will deny deletion as long as it contains protected files, but it's relatively easy to give yourself permission to delete the individual files one by one, after which the folder goes down too. Possibly time consuming without a batch function, but easy.
My understanding of the fuse filesystem, by the way, is that it's just a virtual layer that allows the sdcard block to be treated differently than everything else on the phone, which is important for what happens when you plug it into a computer and the device is read. And I believe that the sdcard is supposed to be formatted as yaffs2 (everything else is ext4). Not sure how to check that directly, but it's possible that it has been changed to something else. But unless you can't delete -anything- on the sdcard, this seems unlikely.
JoeSyr said:
Yeah so everything that I can think of for you to check seems to be displaying as though normal. Although I don't know what aspect of these files root explorer is reading to mark them as protected and put the little shield on them.
You've tried these methods (rm, chmod) on individual files within the folder too, right? I guess this comes more from experience deleting protected files in windows, but I've found that sometimes a folder will deny deletion as long as it contains protected files, but it's relatively easy to give yourself permission to delete the individual files one by one, after which the folder goes down too. Possibly time consuming without a batch function, but easy.
My understanding of the fuse filesystem, by the way, is that it's just a virtual layer that allows the sdcard block to be treated differently than everything else on the phone, which is important for what happens when you plug it into a computer and the device is read. And I believe that the sdcard is supposed to be formatted as yaffs2 (everything else is ext4). Not sure how to check that directly, but it's possible that it has been changed to something else. But unless you can't delete -anything- on the sdcard, this seems unlikely.
Click to expand...
Click to collapse
yeah, I tried deleting files individually on the phone, and in windows. Wont let me do anything.
I guess the only sure fire method of clearing these files at the moment is to do a factory reset.
I can back up my stuff with titanium, so not that big a deal.
Your assistance has been much appreciated
:good:
warlock257 said:
yeah, I tried deleting files individually on the phone, and in windows. Wont let me do anything.
I guess the only sure fire method of clearing these files at the moment is to do a factory reset.
I can back up my stuff with titanium, so not that big a deal.
Your assistance has been much appreciated
:good:
Click to expand...
Click to collapse
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
That worked :laugh:
It's gone from all those folders.
Thanks very much!!!!!
warlock257 said:
That worked :laugh:
It's gone from all those folders.
Thanks very much!!!!!
Click to expand...
Click to collapse
+1 This worked for me as well. Thanks for posting...:good:
Had the same problem. Deleting through the /media path worked.
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
+4 You Sir are a genius! Thanks given!
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Sorry to necro this thread almost 4 years later, but I had the exact same issue with deleting a folder on internal storage (Android Lollipop). Regardless if you're still here on XDA or not: thanks for this solution.
So.. Not really a I9250, but I guess my problem on i9100 is the same.
For some weird reason this just happened to WhatsApp directory.. But whatever.
After digging deeper and deeper in recovery, it seems like the folder wasn't own by media_rw group, but root
I just had to run
Code:
chown -R 1023:1023 <folder-path>
For some weird reason neither chown nor ls -l were correctly working when booted on normal system
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Click to expand...
Click to collapse
@Cilraaz, I have no idea if you're still on XDA but after at least a week of intense searching I found your advice which solved my problem! Thank you.
My problem was on i9500 (still) running stock Lollipop. I've been preparing to install a custom recovery, and did a TWRP (2.8.7.0) nandroid backup. Problem was I then couldn't find the TWRP backup folder. It would only show in TWRP's file manager. Root Browser didn't show it with SU privileges, nor ES File Browser and connecting it to the PC didn't help either. It's only after looking in /data/media/0 that I could find the TWRP folder.
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?
I have this folder on my phone that keeps coming back that is filled with old ROMs I had flashrd before. These add up to around 1.5GB. I can delete the whole folder but when I reboot my phone they are back. The folder name is called "!ReadytoFlash" I thought maybe these files are coming from the very top root folder of the phone but I can't seem to find where they are being restored from. There an example of a old ROM I had stored on the phone. Don't take into account that it is for the i9100 has this is not the phone I have. It is the Samsung galaxy nexus. The picture show me doing a search on one if the files that keeps coming back.
Post a screenshot of your phone - might help getting an answer
update your recovery and remove all the /0/ folders except 1.
Zepius said:
update your recovery and remove all the /0/ folders except 1.
Click to expand...
Click to collapse
OK I deleted all but one /0/ folder and after rebooting it remade the rest of the /0/0/... folders and add the .zip roms
Edit for got to mention that I update my recovery to the latest version.
Give this a try...
Boot into recovery, plug in the USB cable, go into adb shell, and make sure that /data is mounted. Then:
cd /data/media
chown -R media_rw.media_rw *