Hi All,
Just a quick general question, has Android 5.x (Lollipop) changed the filesystem paths in general...??
For as long as I can remember, most Android releases, both Internal and External locations have remained the same... I think one of the Android versions changed it ever so slightly, but can't remember which one.
However with Android 5.x (Lollipop), certainly with ours (and other devices I've seen trying to get Lollipop builds going). They all talk about having difficulties with accessing Internal and External, and now the paths are either...
\mnt\Emulated\SDcard\0\
\mnt\Media_RW\SD0
\mnt\SDCard\SDCard0
or variations of that, instead the usual paths.....
Is this the new way that Android 5.x has changed, or is it just a case of while people are trying to compile it, it will then return to the same locations as previous versions once all the bugs are out and its good to go....?
Thanks, Lister
Anyone...?
Is this the way forward now for Android 5.0 / Lollipop builds, that Google have changed the filesystem/paths....??
Or is this just while in development, alpha/beta, compiling modes, and when goes final... It will link back to the original locations where previous data currently is...? (same with recovery I believe, at moment).
Thanks, Lister
I'm confused, does Android 5.0 Emulate SD Cards now...??
Do we get a folder, within a folder within INTERNAL storage now?? Does this apply to just our device, or all devices...
It seems Google has changed the goal posts...??
The internal sdcard /storage/sdcard0 will show you the files inside the 0 folder
The full internal sdcard (with the 0 folder inside) will be mounted on /storage/oldsdcard0
Click to expand...
Click to collapse
Related
howdy yy'all
i have sucessfully upgraded my nexus 7 to 4.2 today but when using storage analyser i get error
unable to detect detect any valid sdcard or usb device
i have installed apps succesffuly with sd data being installed on the device
please can some advise the method i used for upgrade was
nexus toolkit
flashed stock 4.1.2 lost root and cwm
upgraded using tool kit to 4.2 and then reflashed root and cwm
same problem here... they prob just need to update something for 4.2... suspect an update will follow soon
The multi-user abilities in 4.2 are now causing havoc with some apps. used to be /data/media on 4.12. On 4.2, now the partition is /data/media/0/ for the 1st user, /data/media/1/ for the second, and so on and so on. If you're rooted, I think creating a symlink manually should fix this. I suggest you don't create other uses, just stick with the one for now, then you just need a single symlink from /data/media/0 back to just /data/media
There will need to be a lot of apps updated.....
rootbrain said:
The multi-user abilities in 4.2 are now causing havoc with some apps. used to be /data/media on 4.12. On 4.2, now the partition is /data/media/0/ for the 1st user, /data/media/1/ for the second, and so on and so on. If you're rooted, I think creating a symlink manually should fix this. I suggest you don't create other uses, just stick with the one for now, then you just need a single symlink from /data/media/0 back to just /data/media
There will need to be a lot of apps updated.....
Click to expand...
Click to collapse
I could not have said this any better. There will be Hundreds of not thousands of apps that will have to be updated.. Nearly any app that stores data without it having any logic for looking for where to store it at..
I Like the multi user . will create a guest user to keep prying eyes (my son ) off my tablet.
New software has bugs to work out.. this one going to have more then useual
erica_renee said:
I could not have said this any better. There will be Hundreds of not thousands of apps that will have to be updated.. Nearly any app that stores data without it having any logic for looking for where to store it at..
Click to expand...
Click to collapse
Any app which manually specifies a path, such as apps like Storage Analyzer must do in order to operate, should be few. The vast majority of apps ask Android to store the data and Android handles the path.
I decided to start this thread as both assistance for some as well as a collaberation on workarounds when you a person flashes a 4.2.2 rom coming from a 4.1.2.
Just like some (maybe most) I flashed CM 10.1 and played around a bit with it and decided it was just not ready to be run as a daily. Being the flashalohic that I am, I made sure I backed up before flashing CM 10.1 so when I went into recovery and went to restore imagine my surprise when it was blank, yep nothing was there. Why did this happen? Well doing some research and reading/searching I found out that the update from Android 4.1.2 to 4.2.2 changes the file structure of the 'virtual' sdcard on our devices. Actually it changes it for every device. What has changed is that the ability to add user accounts, similar to any regular computer, has been implemented. However, if the proper steps are not taken before you flash a new 4.2.2 Rom, you will end up with a huge mess and run out of room on your device in a hurry.
The actual location when viewed with a root file manager has been here on 4.1.2:
/data/media
And though you will see the same files in /sdcard and /storage/sdcard0, those are just symlinks to the same info, just like a shortcut (on a windows box) or alias (on a mac box). Once you flash a 4.2.2 ROM, the actual location gets changed (and all the files moved) to here:
/data/media/0
And the symlinks get changed to /sdcard/0 and /storage/sdcard0/0. On the surface, no big deal, right? Wrong. The problems arise if the version of your custom recovery is not compatible with a 4.2.2 ROM. If it is not and you keep flashing 4.2.2 ROMs you might soon end up in trouble. If, while using the 'older' custom recovery, you continue flashing, your sdcard ends up somewhere around here:
/data/media/0/0/0/0/0/0 (etc.) with all your files copied to every '0' directory and your symlinks end up the same way, and your device quickly runs out of space (the dreaded "your device is low on storage" message).
This may also make it very difficult to restore your nandroid of a 4.1.2 ROM as well. If you are already in that situation, not to worry, the solution for that is later in this post.
So far I have only been able to to copy all the files found in the last /data/media/0/0/0/0 (?) folder to my computer. Then using a file manager that will show hidden files and folders, copy/move the files in the last '0' directory to:
/data/media/0
And then use file explorer to delete all the other '0' directories until I have just this one:
/data/media/0
leaving nothing else in the symlinks but /sdcard/0 and /storage/sdcard0/0. This techniques is if you end up with a huge file structure.
****BACK UP YOUR SD CARD FIRST!!!!! before deleting any 0 folders!!!****
NOTE: A reboot of your device is essential at this point.
If after flashing a 4.2.2 ROM you decide you don't like it and want to restore your nandroid to your saved 4.1.2 ROM, how does that work out?
1.) Get yourself a (good) root file browser.
2.) Brows to /data/media/0
note: this is where android (and almost everything else that uses a Linux kernel) mounts anything that is considered "external" storage.
3.) Do all of your file fixing from here. It will make changes universally.
4.) select all within /data/media/0 and then paste everything back into /data/media selecting merge and/or overwrite. Once done, just delete the /data/media/0 folder, reboot your phone and Profit.
This is a pain and I agree but at this point is the only way I know how to get around this. If anyone knows other ways please share.
* While writting this I came across this info from user elfaure. I havent tried this yet as I am at work and get crappy signal but please post results if you try and if it works, please thank him! *
elfaure: Ok folks for next guy who decides to upgrade to 4.2 but does NOT want the multi-user environment, give this a try.
1. Download the attached file
2. Remove the .txt extension
3. Copy it to your /data directory
4. Open Android Terminal Emulator (Free Market app if you don't already have it)
5. At the prompt type "cd /data"
6. Type "chmod 644 .layout_version" on the file in /data (/data/.layout_version)
Code:
cd /data
chmod 644 .layout_versionNow when you upgrade to 4.2 you should stay single user and have no /data/media/0 directory when you are done. If anyone tries this please let me know if it works and thank me if it does.
ps-its just a special file in a special location, the presence of which tells Android NOT to upgrade your system to a multi-user environment. If you later decide you want multi-users, delete the file and reflash (from recovery) the stock or custom firmware or ROM or recovery. If your custom ROM or recovery wipes the entire /data partition less /data/media including this file, obviously then this will not help, but with latest versions of ROMs and recoveries that should not happen any more.
http://forum.xda-developers.com/showthread.php?p=40911246#post40911246
It also looks as if he may be working on a script to help as well and I will keep track and update as needed.
So far this is what I have come up with and I hope it helps some and I hope others that are smarter than I can correct me if I am wrong on any of the above or other add information on other ways to correct this.
I think this is part of my issue but I don't have any 0 folder under data?
I too flashed the 4.2.2 ROM, and noticed that every everything on my sd card had somehow moved to my internal memory? When I went to reflash the ROM it failed. It I also tried to reflash the ROM I was originally running and it too failed. Luckily I was able to do a nandroid restore so the phone is "usable" but TWRP 2.5 still does not see my my external sd and that seems to be that make reason I can not do anything within in the recovery.
Any suggestions?
The op is telling you exactly how to fix it.
lizardking7112 said:
I think this is part of my issue but I don't have any 0 folder under data?
I too flashed the 4.2.2 ROM, and noticed that every everything on my sd card had somehow moved to my internal memory? When I went to reflash the ROM it failed. It I also tried to reflash the ROM I was originally running and it too failed. Luckily I was able to do a nandroid restore so the phone is "usable" but TWRP 2.5 still does not see my my external sd and that seems to be that make reason I can not do anything within in the recovery.
Any suggestions?
Click to expand...
Click to collapse
Let my clarify:
I have used two different file managers and even used to terminal emulator using ls -la to make sure i have no hidden files
sdcard0/data/ there is no media directory
Maybe this isn't my problem, since I don't see any file/dir with a 0, but all this mess started when I loaded up a 4.2.2 ROM?
Everyone should check this out to aid you in your flashing addiction.
Happy flashing!
http://forum.xda-developers.com/showthread.php?p=42237249
Sent from my HTCONE using Tapatalk 2
I flashing an aosp Rom and nothing in my sd card changed. Maybe I'm lucky?
Sent from my HTCONE using Tapatalk 4 Beta
Good information
so does this work? will i be able to nad back to sense and all my files are in the right place?
I couldn't get it to work, the attachment. However the new recovery I linked to looks to have promise but I haven't tested it yet cause I'm remote right now and need my phone at the moment. Will give it a go this weekend.
Sent from my HTCONE using Tapatalk 2
Seems @imneveral0ne has found a way to assist folks that like to go between 4.2.2 and 4.1.2
Check out his thread here.
http://forum.xda-developers.com/showthread.php?p=42512892
Sent from my HTCONE using Tapatalk 2
Weighing in, worked like a charm for the most part. TWRP recreated another TWRP folder inside its original TWRP folder (it has to be left at /data/media/0/TWRP for you to be able to reinstall a nandroid backup) [also forgoing obvious yo dawg joke here], but besides that my phone is back to being right as rain.
Nice write up on this issue. Thanks
sent via my tranquil⊙NE
I'm sure it wouldn't work for doing a nandroid restore, but on my Galaxy Nexus I would just make certain I had the latest version of TWRP, boot into recovery, format the SD card, and then push the rom files to /data/media/ and flash. That is my only complaint about this change, really...truly "clean" installations are inherently more risky or difficult, dependent on your knowledge level.
It won't let me delete folder 0 no matter what. Inside that folder is a ViperRom folder that won't delete as well no matter what I do!
Thanks for this info. I think I'm going to take the plunge this weekend so this will be very helpful info.
Sent from my HTC ONE using xda app-developers app
I think it moved my ROM data into the 0 folder, how do I get it out? Everything else from the 0 folder is deleted except for ViperROM's folder, and whenever I try to move or delete it, it just fails the operation. I already have a copy out of the 0 folder, but I still want it out, because otherwise I can't flash things, since it just shows the the almost* empty sdcard/0 folder. Help? Should I just put my mods in the 0 folder and deal with it?
Bseagull said:
I think it moved my ROM data into the 0 folder, how do I get it out? Everything else from the 0 folder is deleted except for ViperROM's folder, and whenever I try to move or delete it, it just fails the operation. I already have a copy out of the 0 folder, but I still want it out, because otherwise I can't flash things, since it just shows the the almost* empty sdcard/0 folder. Help? Should I just put my mods in the 0 folder and deal with it?
Click to expand...
Click to collapse
No. There is a script out there you can flash that will help. Check out post # 10.
Sent from my One using Tapatalk 4
So can we delete the legacy file now? I haven't done anything with my internal storage since coming from 4.1.2 for the first time. It looks like twrp 2.6.3 copied all my files correctly to the 0 file but all the files are still also in "legacy" folder. Is it duplicate that I can delete from legacy or are they just symlinked? I am never going back now that we have official 4.3 release.
ivwonka said:
So can we delete the legacy file now? I haven't done anything with my internal storage since coming from 4.1.2 for the first time. It looks like twrp 2.6.3 copied all my files correctly to the 0 file but all the files are still also in "legacy" folder. Is it duplicate that I can delete from legacy or are they just symlinked? I am never going back now that we have official 4.3 release.
Click to expand...
Click to collapse
I am not certain to be honest. It looks like the file structure didn’t change with the release of 4.3 so it’s possible that they are symlinked. If all your files are moved to the /0/ folder and you have nothing in the legacy folder it would make sense that you would be able to but I have yet to test this.
I suppose this weekend I could back up the phone and file tree and give it a shot
Thanks for the response. I haven't tested out yet either but will post back if I do.
Ok so, this is a bit hard to explain, I can only take SS's of some of the problem. So a while ago I installed android revolution hd 10. I've since upgraded to 12.x. I noticed sometime inbetween then. That when I go to clock work recovery I am always greeted with the contents of my sd card before I installed the ROM, I have to click on a folder called '0' which is in my sdcard folder. so /sdcard (this is where all my old data is)/0 (then '0' is where all my new stuff since I installed revolution is. To access the location where all of my stuff saves.
So this is the highest level I can get to on my computer and with root browser/es file explorer on my phone: http://gyazo.com/7a3831c0d9934732b8dc5b2e700e422d
But, when I go into recovery I am greeted with this:
http://gyazo.com/13baa0cb30a21c0fb83db3a35965ced3
see how at the top there it says /sdcard That is full of all my old files. and here when I click on /sdcard/0 : http://gyazo.com/8d39545d7561de02452ef3964e4df6fc
You can see at the bottom of these two, a little window into the past. Because my phone has been using this /0 folder as root I guess? So what is going on, it's using about 8gb or so, maybe more idk, has all my pictures and stuff. And I can only get to it in clock work recovery. Which I don't understand.
Hope you can make sense of this. I'm Australian which is why I'm posting now. time zone is incredibly annoying I hardly get replies. Thanks though
I have the same question, hopefully bumping this will get a good response. I can't even transfer my cwm backups because I have no idea how to access them outside of cwm recovery.
lopuandroid said:
Ok so, this is a bit hard to explain, I can only take SS's of some of the problem. So a while ago I installed android revolution hd 10. I've since upgraded to 12.x. I noticed sometime inbetween then. That when I go to clock work recovery I am always greeted with the contents of my sd card before I installed the ROM, I have to click on a folder called '0' which is in my sdcard folder. so /sdcard (this is where all my old data is)/0 (then '0' is where all my new stuff since I installed revolution is. To access the location where all of my stuff saves.
So this is the highest level I can get to on my computer and with root browser/es file explorer on my phone: http://gyazo.com/7a3831c0d9934732b8dc5b2e700e422d
But, when I go into recovery I am greeted with this:
http://gyazo.com/13baa0cb30a21c0fb83db3a35965ced3
see how at the top there it says /sdcard That is full of all my old files. and here when I click on /sdcard/0 : http://gyazo.com/8d39545d7561de02452ef3964e4df6fc
You can see at the bottom of these two, a little window into the past. Because my phone has been using this /0 folder as root I guess? So what is going on, it's using about 8gb or so, maybe more idk, has all my pictures and stuff. And I can only get to it in clock work recovery. Which I don't understand.
Hope you can make sense of this. I'm Australian which is why I'm posting now. time zone is incredibly annoying I hardly get replies. Thanks though
Click to expand...
Click to collapse
Daman09 said:
I have the same question, hopefully bumping this will get a good response. I can't even transfer my cwm backups because I have no idea how to access them outside of cwm recovery.
Click to expand...
Click to collapse
OK, guys a bit of searching would have helped, but here's the short version:
In Android 4.1.2 /data/media = internal storage (or sdcard; whatever you feel like calling it)
as of 4.2.2+, (for multiuser support) it was changed to /data/media/0
so 4.1.2 /sdcard was a symlink to /data/media
in 4.2.2+ /sdcard is a symlink to /data/media/0
Everything (except 0 and legacy which is empty) in /data/media should be moved to /data/media/0
CWM still links to /data/media which you can no longer see on your PC, since it only shows /data/media/0
if you do want it to show, then use this guide to create a symlink: http://forum.xda-developers.com/showthread.php?t=1991657
That's it in a nutshell, if you want more details, search for differences of the file structures of 4.1.2 and 4.2.2+
nkk71 said:
OK, guys a bit of searching would have helped, but here's the short version:
In Android 4.1.2 /data/media = internal storage (or sdcard; whatever you feel like calling it)
as of 4.2.2+, (for multiuser support) it was changed to /data/media/0
so 4.1.2 /sdcard was a symlink to /data/media
in 4.2.2+ /sdcard is a symlink to /data/media/0
Everything (except 0 and legacy which is empty) in /data/media should be moved to /data/media/0
CWM still links to /data/media which you can no longer see on your PC, since it only shows /data/media/0
if you do want it to show, then use this guide to create a symlink: http://forum.xda-developers.com/showthread.php?t=1991657
That's it in a nutshell, if you want more details, search for differences of the file structures of 4.1.2 and 4.2.2+
Click to expand...
Click to collapse
Thanks for this. Oddly, my searching came with this thread.
Now I guess the question is, why hasn't CWM updated to place the backups in easily accessible locations one devices like the One?
Daman09 said:
Thanks for this. Oddly, my searching came with this thread.
Now I guess the question is, why hasn't CWM updated to place the backups in easily accessible locations?
Click to expand...
Click to collapse
You're gonna have to ask the developers about that, just create a symlink as described here: http://forum.xda-developers.com/showthread.php?t=1991657
and it works perfectly, it's what I've done to be able to access the CWM folder from my PC.
Hit the thanks button if I helped
I opted to encrypt the entire file system while running CM 13 and then switched over to L 14 on my T-810. Since doing that several months ago, however, I have multiple problems which forced me to put the tablet on the shelf as being wholly unusable. Posting in the L 14 thread has not led to any resolution, nor did I get any replies to questions posted in a couple of other non-Google OS threads. Installing various updates, reinstalling from scratch etc. have not resolved my problems.
My question is now: are there users on xda-developers.com who actually have encrypted the entire file system and where /everything/ works?
Myu problems, specifically, are:
- unable to play most, but not all mp3-/mp4-files using different players. Putting the same files on the external sdcard - not-encrypted - works fine.
- unable to open most, but not all, jpg-files in different view programs. Again, having the same files on the sd-card works fine.
- I also have problems accessing the external sdcard using the built-in file viewer whereas I am able to do so using Solid Explorer. This, however, may not have anything to do with encryption but to me not having fully understood changes to accessing the file system in Nougat.
Clearly there is something fundamentally borked related to encryption. Having the files on the unencrypted external sdcard is not a solution. Nor is the apparent new approach in Nougat where certain files can be encrypted, this is a huge security hole as has been discussed on the 'net.
Hi,
i have problems with file access under latest android 11 rooted firmware. I want to connect through ftp and want to backup files from internal storage and sdcard but with primitive ftpd and rooted access i can not see content in /storage/emulated/0 for me its empty :-(.
I have problems with a tasker task to move files from internal to external storage after the firmware update.
Is there any way to get access again with ftp for the full file system with root?
best regards,
Thomas
Hello,
I just want to know if it was a temporary problem or it's the same on Android 12 too ?
If not, how did you fix this problem please ?
Thank you
the problems exists still on the latest Android 12 version on S10e so still no solution yet :-(
My guess is that this isn't a problem with Android, but that your FTPd service doesn't have root access. If it doesn't have root access, it can't see the folder. If it's not "root aware" it won't be able to ask for root access either. That's my guess.
I'm not familiar with "primitive ftpd" so I don't know if it has this capability, maybe it does.
In the past, for remote access, I have used some file explorer apps that have root capability... those allowed me to remote into the phone. But that was a long time ago - these days I just connect from my phone to the network drive instead, and push files that way (instead of "pulling" from a remote server). This is safer since you aren't leaving an open FTP socket on the phone, which is a bad idea from a security standpoint.
till the last december update (this was an update i made maybe after about one year without updates) all access was fine and since then every access is impossible, its not only ftp, its tasker shell with root access too, worked before fine and now its horrible,
Samsung seems to break some folders, you can access the external sd card with /storage/emulated/[idforsdcard]/ but if you go one level up the folder /storage/emulated/ ist empty and does not show any subfolder, same if you are in /storage/emulated/0/Android and enter the data subfolder samsung takes you to /data
it is so strange what samsung does i don't understand
Thank you very much for your answer
Sorry for this ridiculous question, but even a factory reset can't help you regain access to all your folders ?
Precisely, I also see that Samsung is restricting its phones more and more so that we can't use many functions of our phones as before
I'm currently on Android 10, but with all that I hear, I'm afraid of Android 11 and Android 12
i have fresh installed VC6 Firmware (Android 12 March Update) with factory reset and all access problems still the same, so its the "scoped storage" feature and maybe some samsung addons what leads to this problems
if you want full access to your phone then Android 11 & 12 makes it hard to get and some apps are not optimized for this new scoped storage
FWIW, I have a non-rooted, pure stock phone. I can use FX to go to /storage/emulated/0 and see everything properly. I'm on A11, Snapdragon, S10+.
This implies your app is not being allowed to see the storage. This seems to confirm that it's an app issue - ie, the FTPd may not be able to deal with the new structures on A11/A12. As you noted, it might be this "Scoped Storage" feature... which the app is not able to work with?