yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] tatnai:
I unlocked my bootloader, flashed 5.0 with the full image and flash-all.bat, rebooted, ran cf-auto-root, fasboot flashed recovery, and all seemed fine.

until I tried making a folder using a file explorer from within the OS. it refused to create it (no errors, folder just did not show up). thought that was fishy so booted into TWRP and made a backup. then, refused to reboot, just hung. tried wiping cache/dalvik, no success. wiped data, no dice. restored backup, and booted fine, but now file manager within the OS showed nothing. tried a different file manager, nothing.

saw your post, ran the first fix in the OP exactly as described from the terminal app, rebooted, and BOOM, it is all there, including the twrp folder that never showed up before. my alternative was going to be to factory reset from within the OS, thankful that I did not have to do that.

THANK YOU!
[Nexus 5 General] tomp100:
Any Ideas?

I am having difficulty getting the permissions fix in the OP install I tried fixing the permissions of the /data/media/0/download as per the instructions, but cannot get a successfull download. I also tried adb pushing the zip to /data/media/0/download; I see a file transfer in adb, but the file is not visible in TWRP. Any ideas on how to fix this? I'm pulling my hair out at this point. Any help is appreciated!
[Nexus 5 General] rotz055:
So I still have access to part of my SD, but if I go into the system it thinks I only have 12gb of space? Any idea what this could be? I had all 32 gb on the dev preview, but after updating it only reads 12.

ANY help would be appreciated. Neither of these fixes helped me.

UPDATE: Ok, I actually had to flash back to 4.4.4 stock and then do a factory reset immediately after that. Now I'm trying to update again to Lollipop. Fingers crossed.
[Nexus 5 General] tatnai:
Really you needed to factory reset from inside lollipop
[Nexus 5 General] danarama:
Just wipe it.
[Nexus 5 General] MikeLibbey:
Noob question..I know i cant see sdcard either and i know im connected to adb(im new with adb) because i typed adb devices and see it listed but when i type "su" or "restorecon ...etc" it says " 'su' is not recognized as an internal or external command, operable program or batch file" what am i doing wrong? Thanks in advance!!
[Nexus 5 General] tatnai:
Do it from terminal app on phone rather than adb

https://play.google.com/store/apps/details?id=jackpal.androidterm
[Nexus 5 General] MikeLibbey:
WOW i'm an idiot. Next question, it says nothing after i say su and after i type "restorecon etc" it says "/system/bin/sh: <stdin>[2]: restore: not found" whats next?

EDIT- I lied it says "restorecon: invalid option -- /usage: restorecon[DFnrRv] pathname..."

---------- Post added at 06:39 PM ---------- Previous post was at 05:54 PM ----------

Did you find a fix? I fixed permissions then flashed the zip and it actually made my issue worse somehow. I had at least SOME folders in /sdcard but none now, only in data/media/0. If you fixed yours without completely wiping everything and starting over, let me know plz!

---------- Post added at 07:21 PM ---------- Previous post was at 06:39 PM ----------

Did you ever find a fix for this? I have the exact same issue
[Nexus 5 General] Aund5:
The phone plugged into my computer normally.

Appeared the MTP device, but didn't show the storage.

Realized the exclusion of drivers in Device Manager and updated for those who were in the ADB Installer [MENTION=4638083]Snoop05[/MENTION].

Works normally now.

But now use again the Spirit Rom (only installed over the Lollipop) and not the Android 5.0.

(Bing translator)
[Nexus 5 General] winamp26:
i do that but now titanium backup serching files and not found it.

and i cant copy any ile into internal storage.

how to solve it?
[Nexus 5 General] danarama:
If you get a permissions error, it may be that you copied files using recovery. Fix is in the OP
[Nexus 5 General] vaindil:
Yeah, just reboot your phone, run the "restorecon" command again, then reboot again and your problem should be fixed.
[Nexus 5 General] MikeLibbey:
Tried everything, didn't work. I just reflashed the image and then it worked.
[Nexus 5 General] danarama:
Added couple of other scenarios
[Nexus 5 General] vizin:
Same with me, I had a problem with missing TWRP folder on my Nexus 4 and after restorecon -FR /data/media/0 the folder appear :)

Thanks
[Nexus 5 General] danarama:
Although do take another backup and check if THAT new backup shows up because some users report not.
[Nexus 5 General] vizin:
First thanks for the quick reply )

But strange things happen. I can see/browse the TWRP folder from the phone with File Expert, Root Explorer and any file explorer app, but when I connect the phone to PC and browse the phone the TWRP folder is missing again (

Then I check if the backup is visible in recovery mode and yes it is available and I can restore it. Any suggestions will be appreciated!
[Nexus 5 General] danarama:
Not really. Sometimes it's just best to do a full wipe of storage and start again.
[Nexus 5 General] Meaple:
Thanks for the command, worked like a charm on my N4. Done a backup since and it is showing up correctly no matter where I view the folder.
[Nexus 5 General] vizin:
I'm sorry, I just had to restart the phone and the TWRP folder is already visible from both PC and phone

Thanks again ;)
[Nexus 5 General] upndwn4par:
I had no issues on my original N5, but now I do on the refurb I just received. Probably just a coincidence.

Backed up my EFS today and I could see the EFS backup folder with Root Explorer, but not on my PC (could not pull with adb either). I copied and pasted the EFS backup folder in to a temp folder, then I could see both the pasted folder and the original.

This is weird. :confused:
[Nexus 5 General] IWRH:
Long story :D

Same here but for game files located at obb. I just wanna play Shadowgun Deadzone and it said you have to download files again... Then other games too which i didnt touched for years (:P) Theeeen all the way i go to the storage and see 2 gb missing from my free storage.... Then understand my sdcard is kinda duplicated. Redownloaded Chaos and played one time. Connected to pc for possible fixes with root (i wasnt rooted) then decided to give it a shot again... Boom it was missing again.... Went thru the Es File explorer and there we go my sdcard is duplicated under legacy. Went to stock recovery and wiped alll the way.... (Which take more than 20 minutes which seems ok because the duplicated file system....) Now restoring apps :D
[Nexus 5 General] cge_95:
Hi,

Is there a way to run "restorecon -FR /data/media/0" from an openrecoveryscript in order to execute it automatically after backup ?

I tried the following code but it won't work :(

Backup BRCSD
cmd restorecon -FR /data/media/0

Christophe
[Nexus 5 General] g1b50n:
I just post in another thread but maybe here i can found sollution to my problem. I flashed few days ago Lolipop, but i can't restore my backups (i use titanium backup and go sms backup). I copy files to the phone path specially for both apps. Titanium backup see unrestored apps but i can't restore it (grey colored name of apps in backup list). Same problem for go backup sms pro i put backup files in path which apps using but app don't see old backup.

Any sollution?

~sent via n5
[Nexus 5 General] jpbl1976:
Something's terribly wrong...

I just noticed earlier today that I couldn't get into the TWRP backups folder in Solid Explorer/Root Explorer even though I could see it in TWRP.

So I searched around and found this thread. I tried the restorecon command but like another user, I was getting access denied errors so I tried flashing the permissions fix in the OP but it actually got worse after that: I could no longer see my Internal SD afterwards -- whereas I could access everything except my TWRP backups previously.

Having had no success, I decided to restore an older backup: still no dice. I could no longer see the contents of my Internal SD.

So I decided to just erase my internal SD via TWRP and start fresh: Erased date, etc and then I flashed Bigxie's flashable LRX21O stock ROM via OTG (since I couldn't save to my SD card).

My problem now is:

1. My device doesn't seem to recognize my SIM card (it's working: tried it on another device/iPhone);

2. My Navbar and Soft Keys are missing

3. My SD can't be accessed: when I try the Camera app, it tells me to insert an SD card before using it.

I'm stumped. Have I borked my internal SD? Is there anything I can do to fix it? Please help :(
[Nexus 5 General] danarama:
Try flashing the factory images after a full wipe of storage
[Nexus 5 General] danarama:
Scripting the work around isn't good. Update to TWRP 2.8.2.0. If you still have the issue, wipe storage.
[Nexus 5 General] cge_95:
Thanks for your answer. Unfortunately as lots of users, I'm unable to get TWRP 2.8.2.0 running on my device.

Christophe
[Nexus 5 General] danarama:
To be fair, I had no issues with 2.8.1.0 either, but I had wiped my entire storage when I flashed. Try it that way.
[Nexus 5 General] Real_Justus:
Hey there,

I ran into error #2 after I flashen SlimLP Alpha 0.3... But not by pushing files to the SD but by deleting.

Details:

Hammerhead, TWRP 2.8.2, SlimLP Alpha 0.3

I flashed a completely clean phone. After the system was up and running I tryed to delete some files (about 30) with xPlore. I ticked them and chose "delete". xPlore was able to delete 3 files and stopped... Followed by the message that some files not could be deleted. After that I could either delete nor write to the Sdcard. Apps had read only-access. This habbit could be reproduced after another clean flash.

How ever: flashing the ZIP solved the problem. Thanks a lot to rootSU!
[Nexus 5 General] Boonyard:
I have root explorer, but can't find the option to do this:

In fact, the option to change permissions only appears at the root folder (which is set to RW), but not in any others below that.

I can't get the .zip file to my sd card in order to flash it. I tried ADB, but it says 'Can't find device', I guess due to permissions.

---------- Post added at 12:17 PM ---------- Previous post was at 11:17 AM ----------

Solved using Wug's toolkit!:laugh:
[Nexus 5 General] danarama:
Browse to /data/media/0/Download. Long press the folder > Permissions
[Nexus 5 General] Rolo42:
Doing this in TWRP didn't fix this for me; I had to flash stock recovery and perform a FDR within it, reboot, and then flash TWRP again.
[Nexus 5 General] Boonyard:
OK, I spoke too soon! It fixed it, but the problem appeared again as soon as I flashed a custom kernel.

Will try again...
[Nexus 5 General] danarama:
Just do a full wipe of storage and flash userdata.img
[Nexus 5 General] Boonyard:
Went right back and flashed the factory image before moving to terminus. All seems fine now.
[Nexus 5 General] jpbl1976:
Thanks. I got my N5 up and running again (didn't have time to do it until today because of Thanksgiving) and it all works now. I still have the same issue with not being able to see back-ups in TWRP but since I'm basically back to stock, I don't foresee needing a backup (this is just one of my 4 Android devices anyway) anytime soon -- that is, I'm getting a Nexus 6 anyway and this phone'll just be a spare.

It's funny -- I've run without root the past couple of days and frankly, I only really missed ad blocking.
[Nexus 5 General] happiness4u:
Glad I bumped your thread man. Thanks!

Thank you rootSU! I almost went crazy looking up for my twrp backups. Thanks to your guide, I able to realign my /data/media folder with the /sdcard. Now my backups are showing. But everytime I back up using twrp even tried also with cwm, the /data/media folder seems to get misaligned again. So I need to type in the fix in TermEmulator everytime I do back ups. :/ Hope google fix this glitch on their update. Anyway, thanks again rootSU! :)o
[Nexus 5 General] adrman:
[MENTION=2872010]rootSU[/MENTION] Just an FYI. Initially when I upgraded to Lollipop, I was using twrp 2.8.1.0 and I had to use terminal to make my backups visible again. All was well until I updated to TWRP 2.8.2.0. I then had to run the command again to make my backups visible outside of recovery. Since that time I've made several backups without having problems. It does seem to TWRP related. FWIW, I never encountered the issue of the extra 0 folder and I did not flash the factory images when updating. Hope this lends a clue as to what is actually going on.
[Nexus 5 General] danarama:
Cheers, yeah... Some people who had 2.8.1.0 say its fixed with 2.8.2.0 but for many that version doesnt work. That said, Ive never had teh problem on 2.8.1.0 either, Very strange
[Nexus 5 General] adrman:
I think the deal with 2.8.2.0 is mtp. If you disable it, TWRP boots fine. If enabled, not so much. Since I don't use it, I haven't experienced problems booting recovery. I still have 3 devices (2 grouper, 1 mako) on 2.8.1.0. I'll be curious to see if I need to go back to terminal when I update the recovery on those.
[Nexus 5 General] danarama:
Hmm. Interesting. I have used mtp but no idea what state its in now.
[Nexus 5 General] dom2684:
I'm not sure if my issue falls into this category but I had switched to lollipop last week and had the issue where I was unable to see my internal sd , I got that fixed.

My issue now is when I use clover for 4chan and I try to save an image it says that it fails. I tried to delete the folder that it saves to and it deletes but then once I reboot it comes back with all the images I deleted. Any suggestions?
[Nexus 5 General] g1b50n:
Well i am not so much advanced user, but try to run logcat and try to download again the file. Then check in logs what happen (maybe there will be an answer).

Btw i can't use google+ photo app to use effects. For me app is starting but downloading effects resources, without success, maybe it is also sdcard problem. Strange lolipop. I tried download resources over mobile data or wifi, it is so stupid problem without fix :(

~sent via n5
[Nexus 5 General] ironclad1911:
While i was experimenting with F2FS and lollipop i had to flash factory image several times

During this i came across the storage issue 32gb to 16gb

I tried wiping cache but that did not work

After some hit and trial this worked

Fastboot format userdata

This problem is somehow related to userdata.img that comes with factory image...
[Nexus 5 General] dom2684:
I've ran a logcat but I can't find what the issue is . maybe someone else can .

EDIT: Well weirdly enough I flashed the fix permissions zip in the first post and lost access to my sd card then I ran the terminal command and regained everything and now I'm able to save and delete
[Nexus 5 General] g1b50n:
I had the same problem with FIX .zip file, i run terminal with command, but still have problem with this:

My thread about google+ photo editor app not working properly. Maybe some permissions? or SD Card settings?

Lolipop and lots of problems. Waiting for 5.1 or some fix.
[Nexus 5 General] danarama:
There's not going to be a fix. Lollipop handles sdcard differently and just like the 4.2 upgrade, those who don't upgrade clean are going to continue to have problems.
[Nexus 5 General] Vosky:
I also had 16GB partition after upgrading to 5.0.

Thanks you for your fix.
[Nexus 5 General] g1b50n:
At the moment my sd card work good. I can save files, making photos or screenshots, but when i flash zip from the thread sd card stop working properly, i fix it via command from terminal. Now i have problems with google+ photo effects resources i can't download it.

I did full wipe and clean installation, and still no idea what is wrong, maybe it is a lolipop problem

~sent via n5
[Nexus 5 General] danarama:
You need to do a ful; wipe of storage not just /data and also possibly fastboot flash the userdata.img too
[Nexus 5 General] g1b50n:
Well i did full wipe with WugFresh tool, then i flash clean stock rom and all works good. Only have problem with google+ photo editor, can't download resources. Don't know where is the problem.

~sent via n5
[Nexus 5 General] danarama:
No idea, doesnt sound related.
[Nexus 5 General] g1b50n:
Maybe update of google+ app will fix this problem. It is most popular problem over net, some people have the same errors like me, anyway it is possible to get app which monitor similar like wireshark? Maybe when i want to download cache folder doesn't exist? Hmmm

Btw. Offtop end ;) sorry.

~sent via n5
[Nexus 5 General] fire6water:
I had an SD muont error when I went to flash 2.8.2.0 from 2.8.1.0 via twrp manager app. I was on terminus 5.0 and tried flashing calaclysm 5.0. Once booted I could screen shot and see my internal SD. I then went to latest cwm via ROM manager and all good again. Maybe it well help some one.
[Nexus 5 General] techinv:
I had the "could not see stuff in /sdcard problem", and thought that I had the problem of only seeing half of my 32gb.

The second issue turned out to be related to Facebook. Somehow in upgrading to Lollipop and restoring app/user data via TB, my Facebook install was taking up over 9gb. Ran the terminal emulator commands and then removed/reinstalled Facebook. All is well. :)
[Nexus 5 General] tom1807:
Awesome, had the issue on my Nexus 4, downloaded the terminal application, run the command like you wrote and all is ok.

Thanks
[Nexus 5 General] hauhauhau7:
hi

i'm running Cataclysm,elementalx 2.04

after i made a nandroid i entered the command but it didn't work,the backup had 0 bytes size (attached screenshot)

i've set permissions to the downloads folder,i flashed the zip then the folders appeared to be empty,i entered the command again and the result was the same like in the screenshot taken,

i've installed SElinux changer from Playstore and toggled between permissive and enforced,it looks like only with permissive i can view all contents, i may have done something wrong :silly:

right now i've left it set on permissive, thx
[Nexus 5 General] danarama:
You didn't write the command correctly. Compare your screenshot to the command in post 1.
[Nexus 5 General] Kaptawesome:
Hey guys,

I have done everything in the steps, I can now see my files properly, but when trying to download anything whether it be through Chrome, ES etc. The download automatically fails or is unsuccessful.

Any ideas?
[Nexus 5 General] danarama:
Its permissions probably. Use file explorer and try and create a file in the download directory. If it doesnt work, you need to flash the permissions fix zip.
[Nexus 5 General] lords8n:
Hello All-

I'm currently experiencing this issue on my HTC One M7 after updating to 5.0 Lollipop. Unfortunately when I tried to apply fix #1, I get a "restorecon: not found" error. Somehow I didn't have restorecon in my system/bin folder. I tried downloading this one: http://xdaforums.com/showthread.php?t=2463116&page=2, but now I get a "restorecon: invalid option -- F" error. Any ideas/help would be greatly appreciated.
[Nexus 5 General] danarama:
Can't help. Its a different phone. This is for Nexus 5.
[Nexus 5 General] Moose8106:
You. I love you.
[Nexus 5 General] terraflops:
Woah, THANK YOU SO MUCH FOR THIS THREAD! (I'm so happy that pressing thanks simply wasnt enough)

In case anyone's wondering, I was converting my filesystem into F2FS and after I restored my sdcard content via MTP on TWRP, and flashed a rom, apps that use /sdcard started to FC.. I cant still view my images on my gallery but taking a picture wont save it into gallery. So after trying method 2, it made my /sdcard empty so I tried method 1 and voila it works!

So in conclusion I used method 2 and method 1 combo and it worked so thanks. :D
[Nexus 5 General] Ensifolk:
I have been trying to enter the command in Terminal Emulator without any result so far!

su

restorecon -FR /data/media/0

My sdcard right now looks like this /Storage/Emulated/0/0/0/0/0/0/0

I noticed a new /0 with every rom flash, how can I revert back to the normal case ? ( 16 GB Nexus 5)
[Nexus 5 General] whiskey_jd:
I have a weird issue.

I had 16GB nexus with Mahdi Rom. All my files were backedup with TB. Yerterday I bought 32GB Nexus. I rooted the device and installed Mahdi Rom again. But when i show the backup path to TB, it can only see 38 of my 192 backedup files. Any suggestions?
[Nexus 5 General] danarama:
The nested /0 issue is not a restorecon issue. Use fix 5.
[Nexus 5 General] danarama:
No experience of that one, sorry. MAybe you have some filters on?
[Nexus 5 General] Ensifolk:
Eventually, I had to do it manually and moved all the files myself. How can I avoid this in future flashes? Im using Philz latest CWM.
[Nexus 5 General] whiskey_jd:
there is no filter :(
[Nexus 5 General] danarama:
Yes, you would have to do it manually, as per fix 5.

Not sure why you had this issue in the first place. Probably something to do with the rom you're flashing.
[Nexus 5 General] NexusJerry:
Thank you rootSU!! Fix 1 did the trick. Couldn't see my file system, couldn't download links or podcasts since flashing Lollipop. A million thanks!!
[Nexus 5 General] cleancorekiller:
I've got about three gigabytes of music and about ten or twelve apps installed but my storage says I have less than 1gb free (16g version) anyone else have this issue? I had the restore con problem too and sorted that in five minutes but I can't even do a back up to update my ROM with this situation. Anyone know about it? I've looked through this thread and cant see any thing similar to my problem. Thanks guys
[Nexus 5 General] johansenmo:
You are my absolute hero! I was searching for this for hours... That fixed it for me and I can now use TB on my one-m8 :)

Thanks!
[Nexus 5 General] danarama:
Hahah. I think you set your standards for hero's pretty low :)
[Nexus 5 General] jojotsai1102:
help me

how do i deal with this, guys :(. when i do "restorecon -FR /data/media/0" (i noticed all the necessary space aswell) and terminal says "restorecon: invalid option --F". image below but i had not enough post counts to linking image, so pls paste the link.

a little note that weird SD problem only exists with my front USB slots. i gotta plug the phone via backPC slots and it's kinda annoying for me. any idea ?

currently i'm being with KK4.4
[Nexus 5 General] Primokorn:
This isn't a Nexus 5, right?
[Nexus 5 General] stilldmoney:
[MENTION=2872010]rootSU[/MENTION] Thank you for this solution. :good::highfive:

It restored my files on my Nexus 7 (Flo) after taking the new L update... Would you mind if I linked this thread to a ROM thread to help other users?

:D
[Nexus 5 General] danarama:
Feel free
[Nexus 5 General] hepi_hape:
Thankyou for tutorial.... a was on number 1 problemm...

i realize, using bootloadr L cant use KK because the media path is diffrent. if you force flash KK rom in L bootloader, when you back to L rom. it will result media path will missing and cant write and read media file...

Thx again for solution number 1
[Nexus 5 General] zerosum0:
I'm getting "can't store screenshhot due to lack of memory," etc. Got 4gigs spare. Using Octos rom, based on cm12.using code blue
[Nexus 5 General] ironia.:
upgraded to 5.1 i cannot use camera, error: cannot find Sd

what i have to do??

tn
[Nexus 5 General] workdowg:
delete
[Nexus 5 General] ironia.:
resolved with

su

restorecon -FR /data/media/0

many thanks:good:
[Nexus 5 General] ghylander:
im not sure what i have to do

some apps cannot access the sd card, like the browser (i cannot download from browser), bluetooth file transfer (can't receive anything), camera (can't tale pictures) or browse images from the gallery. However i can download and send files from whatsapp, browse images from the "photos" app, browse the sd from a file manager etc

is this a 1?

or a 2?

edit: it's a bit weird because gradually more apps have been getting access to the sd

when i first upgraded it i couldn't take screenshots, send/receive files via whatsapp, access the sd from "photos", but now i can
[Nexus 5 General] ironia.:
first try option 1
[Nexus 5 General] ghylander:
this is what i get

SELinux: Loaded file_contexts from /file_contexts
[Nexus 5 General] danarama:
It sounds like option 2 to me.
[Nexus 5 General] ghylander:
i just tried option 2 and i got an "E: cannot mount volume /misc" error and couldn't flash the zip

this might be the problem?

how can i fix it?