Hi guys,
I need some hints on what has changed from Android < 5 to Lollipop when it comes to internal storage.
I have booted my Nexus 4 running Lollipop into ClockworkMod recovery and mounted the internal storage.
Then I did an "adb push" of files that I have backed up before to restore those onto the internal storage.
Once that was done I have opened a shell and changed ownership back to media_rw:media_rw and also
checked POSIX permissions to be correct.
Basically this is what I have done so many different times on different Android devices.
Once I have booted back into the system ... I could not access any of those files and directories.
I assume that there was something added on top of plain POSIX access control. A SELinux thing or something
like ACL or stuff, or maybe a database referring to files stored on /sdcard.
Anyway what can I do in recovery mode to make manually copied files and directories available in the system?
Any help would be appreciated!
Thanks in advance!
/Al
I had this problem too but all I could do to correct it was to reflash my ROM.
Sent from my Nexus 4 using Tapatalk
GorfDroid said:
I had this problem too but all I could do to correct it was to reflash my ROM.
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
Well finally I went back to 4.4.4 and copied the files back to SD card via adb. I hope the OTA will do everything for me.
But still I would like to understand how it work. This is what I am looking for.
If you are running Lollipop and create a file on SD card it looks exactly the same in Recovery mode. Same user, same group and same POSIX permission ... but still different in some way. How?
Related
I have a rather urgent issue, in which a factory reset wiped my sdcard. First of all, is that normal? This is my first device with no external microsd, and my first time using TWRP. Before, I had been using various versions of Amon-Ra or CWM, and when I factory reset they never wiped the sd card. Next, whether it was normal or not, I need a way to recover my data. I had around 8 gigs in sdcard before it got wiped.
To give you more background info on what was going on, I had a rooted 4.1.2 16GB Nexus, and I decided that I wanted to try PA. I made a nandroid backup of course, and then proceeded to flash the rom. I followed the instructions on the PA thread, first doing a factory reset followed up by the actual flashing, then a wipe of cache/davlik. After I tried the rom out for a few minutes, I noticed that there weren't any redeeming features to make it worth the time-consuming switch from stock to PA, transferring all my data and setting up my settings once more.
I rebooted back into recovery and factory reset again, and then I went to restore and saw that there were no backups. Suspicious, I went to the install menu, and found my entire sdcard folder had been wiped out. What happened?
Edit: I'm currently still on the recovery, afraid to do anything in case I lose my data forever.
Was your boot loader already unlocked or did you unlock it right before you flashed the ROM?
littleemp said:
Was your boot loader already unlocked or did you unlock it right before you flashed the ROM?
Click to expand...
Click to collapse
Thanks for the reply, especially on Christmas, but I got around the issue myself. It had been unlocked for 2 months now.
I noticed that every time I booted into recovery, it would make a "0" folder and move the contents of my sdcard into that "0" folder. Then the 0 folder would go inside another 0 folder, and so on and so forth. It was a really strange issue because I was unable to restore my backup; TWRP could not find my /sdcard/TWRP/backup folder, because it did not exist! It was in sdcard/0/0/TWRP/backup. I used the built in file manager in TWRP, and moved the contents back into the proper folder. I could then restore, and now I'm feeling relieved.
However, two issues remain; the 0 folders are still there, and storage transfer speeds seem very slow.
Edit: I got rid of the 0 folders by moving my folders out of them and then deleting the 0 folders, but the size of my files seem to have been inflated. What took up 6 gigs before is now taking up 8.8gb. Lol wut? Also, when I hook it up to a computer it tells me that 12GB has been filled. So many discrepancies.
androidwkim said:
Edit: I got rid of the 0 folders by moving my folders out of them and then deleting the 0 folders, but the size of my files seem to have been inflated. What took up 6 gigs before is now taking up 8.8gb. Lol wut? Also, when I hook it up to a computer it tells me that 12GB has been filled. So many discrepancies.
Click to expand...
Click to collapse
I am having the same problem. I think everybody has that problem, because it's caused by jelly bean 4.2 and its new emulated storage.
The only way I have found to get arround it was to copy all files on the computer from the sdcard, then formating the sdcard in recouvery and moving everything back.
Only problem I am having right now is that I can't for the love of it copy my files. Stupid MTP filesystem is really buggy and extremly slow. I constantly crashes or gives me multiple erros. The one I am having at the moment is something about a parameter error.
Very annoying the stupid filesystem under 4.2.
Btw. I can't get the adb pull command to work either. When I tell it to copy system/storage/emulated/legacy (I believe thats where the sdcard is actually loccated, right?!) it doesn't copy a single file.
If anybody could help me I would be very greatfull.
xaboren said:
I am having the same problem. I think everybody has that problem, because it's caused by jelly bean 4.2 and its new emulated storage.
The only way I have found to get arround it was to copy all files on the computer from the sdcard, then formating the sdcard in recouvery and moving everything back.
Only problem I am having right now is that I can't for the love of it copy my files. Stupid MTP filesystem is really buggy and extremly slow. I constantly crashes or gives me multiple erros. The one I am having at the moment is something about a parameter error.
Very annoying the stupid filesystem under 4.2.
Btw. I can't get the adb pull command to work either. When I tell it to copy system/storage/emulated/legacy (I believe thats where the sdcard is actually loccated, right?!) it doesn't copy a single file.
If anybody could help me I would be very greatfull.
Click to expand...
Click to collapse
I had the same fear, emotion and discovery a week ago when trying a new Rom thanks multi users feature .
You may try to switch from MTP mode to MSC in system setting to increase the speed.
Take care of the different tools because as example JROMFlasher will format the SD card for better cleaning. (I had backup!)
I think I read that the Factory Reset from the settings menu WILL erase everything.
Formatting with ClockworkMod, saves your sdcard files.
I also recommend unlocking asap just for laughs. Even if you don't plan on rooting or Modding... unlocking will ensure your files won't be deleted if you decide to or something happens that requires it
Sent from my Nexus 7 using XDA Premium HD app
Hello,
So after I flashed XXUFME3 I noticed that non of my files on my internal memory are showing any more.
When checking the storage, I can see that there was 5 GB worth of files un-accounted for, IE they still exist they just don't show any more.
After further digging up, here is what I have found:
The mount point for internal memory is no longer /sdcard/ it is now /sdcard/0/ and to my knowledge, I couldn't find a way to actually see /sdcard/ since it was not mounted to begin with.
Here is what I did to circumvate this:
1 - I rebooted to CWM recovery
2 - From there, I went to mounts & storage and mounted /data, /sdcard and /external_sd
3 - I opened an adb shell and from there browsing to /sdcard/ showed me all my precious files again.
From here on out, the solution was simple.
You can either:
Move all contents from /sdcard/ to /sdcard/0/ this can be done by running the following:
Code:
mv -r !(0) /sdcard/0/
OR
Copy all of your contents to your external SD by running the following:
Code:
cp -r !(0) /external_sd/
Both the above commands will exclude the directory "0" and all of its contents since you do not need to move them.
Hope this helps anyone who had the same problem.
Or you can go to /storage/emulated/0/0 folder and find all your old files in there.
bcostea said:
Or you can go to /storage/emulated/0/0 folder and find all your old files in there.
Click to expand...
Click to collapse
I looked and they weren't showing there. I had a similar issue when I moved to AOKP and I was able to restore them as you said, however this time they simply weren't there.
The mount point is actually /data/media normally but here it's /data/media/0 so you can just copy everything from /data/media to /data/media/0 with a root explorer (i use es)
/sdcard and /storage/emulated essentially just redirect you to be media folder.
Sent from my GT-I9300 using Tapatalk 2
delsus said:
The mount point is actually /data/media normally but here it's /data/media/0 so you can just copy everything from /data/media to /data/media/0 with a root explorer (i use es)
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Yeah that's definitely an easier solution never found it while browsing though ! Thanks
I wrote a thread on this. Link in my signature
Sent from my GT-I9300 using Tapatalk 2
rootSU said:
I wrote a thread on this. Link in my signature
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
sir how can i restore my nandroid backup 4.1.2 from this 4.2.2? is it possible. it says md5 sum mismatch thanks in advance
The thread title is wrong. The files are not "lost".
Also, anyone who's used 4.2.2 before knows the deal here.
Kryten2k35 said:
The thread title is wrong. The files are not "lost".
Also, anyone who's used 4.2.2 before knows the deal here.
Click to expand...
Click to collapse
So are these duplicate files or just in a different place? I did a full wipe and flashed 4.2.2, then put all my stuff back from the backup on my computer. Does this effect me?
s14sh3r said:
So are these duplicate files or just in a different place? I did a full wipe and flashed 4.2.2, then put all my stuff back from the backup on my computer. Does this effect me?
Click to expand...
Click to collapse
Different location. Full explanation in the thread I wrote in my signature
Sent from my GT-I9300 using Tapatalk 2
Turns out it is because of multi user support... If you create another user profile, all the files from that user will get saved to /sdcard/1. Only way out is to move all files from /sdcard to /sdcard/0.
Sent from my GT-I9300 using xda app-developers app
So I was about to flash a ROM and I had too many things on storage and cleaned and wiped everything. I then went on to use Format Data, hoping that it will only delete files and not the OS too. So now it deleted the OS and I'm stuck between bootloader or recovery mode and I can't seem to find a way to copy the zip file to my internal storage. Tried adb using cmd but it's not recognized and I'll have to dowload Google's SDK. This in turn will take about 2 hours and I'd really like to fix the problem ASAP. Anything I could do please?
Thanks and much appreciated.
You could always go to recovery, Mount your sd card and copy the file that way. Or setup fast boot and flash the stock image, or even just push the rom file through adb. You have a few options.
Sent from my Nexus 4 using Tapatalk 4 Beta
eqjunkie829 said:
You could always go to recovery, Mount your sd card and copy the file that way. Or setup fast boot and flash the stock image, or even just push the rom file through adb. You have a few options.
Sent from my Nexus 4 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Adb-toolkit is in the folder but cmd is not recognizing it unfortunately. And through TWRP I have no option to mount USB... usb-otg doesn't work...
Anyone please? I have no idea what to do at this point and I'm pretty much phone-less...
This was a bit unexpected. Lollipop is supposed to make using SDCARD (in this case there is NO sdcard) more sensible.
However now I can't copy any files to Nexus in MTP mode. I can do that in P2P mode but only to the picture folders. Any suggestions on that? Selinux setting?
And, yes, I did try making a new folder but no joy. I also noticed I can't see app-specific folders such as titaniumbackup.
Barleyman said:
This was a bit unexpected. Lollipop is supposed to make using SDCARD (in this case there is NO sdcard) more sensible.
However now I can't copy any files to Nexus in MTP mode. I can do that in P2P mode but only to the picture folders. Any suggestions on that? Selinux setting?
And, yes, I did try making a new folder but no joy. I also noticed I can't see app-specific folders such as titaniumbackup.
Click to expand...
Click to collapse
I just upgraded my N10 to Lollipop yesterday. I'm rooted, have SELinux Mode Changer (set to permissive mode) and have USB OTG Helper [root]https://play.google.com/store/apps/details?id=net.shajul.usbotg&hl=en installed. That gives me full unfettered RW access to my OTG SDCard reader. USB OTG Helper expands the number of SDCard file formats that Android supports. I have mine formatted to ext4 to remove the 2GB file limit but thats just my requirement. I used ES File Explorer to access the SDCard and move/copy files, although I'm sure many other file managers would have worked.
I hope that info helps.
It's not an actual SDCARD but the internal emulated sdcard which is being difficult.
Barleyman said:
It's not an actual SDCARD but the internal emulated sdcard which is being difficult.
Click to expand...
Click to collapse
I am in the same boat. I want to restore some apps I backed up in 4.4.4 and lollipop won't read the backup folders in the root directory. I can see and access them via pc, but not through Android. I tried using Titanium & MyBack Up Pro w/ SU access. No dice. Like you, I also tried moving the folders to my Desktop and back. Renaming, creating new folders, etc..., doesn't help.
I can't work around the issue. My current thinking is that we are dealing with a security feature. It seems like all my 4.4.4 folders with user info in them are walled off.
Grrrrr
My phone was taking too long to boot up yesterday after installing latest franco kernel so I have decided to format and clean flash rastapop. After everything's up and running, I tried to access my internal storage via USB on Windows 8 but when I click into the drive it was completely empty. I checked the storage space on my phone to make sure that I didn't accidentally wiped the internal storage and it showed 5.1GB out of 12.92GB. I've also used ES File Explorer to see if I can access storage directly from the phone but it showed the same thing - completely empty. Wifi sharing didn't help either. One weird thing was that I could see the files when I booted into the recovery mode. I have tried almost everything including clean flashing the rom again. I really don't want to format my internal storage. Please help. Thanks!
Found the solution: http://forum.xda-developers.com/showpost.php?p=56782014&postcount=7
Simply just type in these in adb:
adb shell
su
restorecon -FR /data/media/0
For a permanent solution flash stock boot.img again. Otherwise you face the same problem when flashing any other custom kernel again.
brownmonkey300 said:
For a permanent solution flash stock boot.img again. Otherwise you face the same problem when flashing any other custom kernel again.
Click to expand...
Click to collapse
What? Not true
Sent from my Nexus 9 using XDA Free mobile app