[HELP] cannot read or write to internal storage (/sdcard) - OnePlus 3 Questions & Answers

The title pretty much explains it. I cannot see any of my personal internal files or create an, e.g when it try take a screenshot it won't work as it does not have access to the internal folders.
Even when I boot into TWRP I cannot see all my files. I know all my files are there still as my storage still only has 10gb free even though the file Explorer shows no files visible.
It seems like no app at all has access.
What can I do to get access to my files again, I have some really important stuff I have got in the last few days that I have not backed up yet. As long as I can get some sort of backup of the files I will be happy to reset the phone.
Ok so what I have done since it working fine was.
Copy 2 files from my computer to my phone
Reboot into TWRP and then force shut the phone down after about 1 minute as I was not patient enough (turns out with f2fs you need to wait a bit longer)
After that, booting into the systems had no read or write access in the sdcard folder which is where all the personal data is stored.
Hopefully what I have said has made sense, if you need any other information just ask
P.S I tired to connect a flash drive so I could flash 4.1.1 (as I cannot copy anything to the internal storage) and see if that would fix it but TWRP won't recognize any flash drives and I'm on the latest official version of TWRP

DarkN3ss61 said:
The title pretty much explains it. I cannot see any of my personal internal files or create an, e.g when it try take a screenshot it won't work as it does not have access to the internal folders.
Even when I boot into TWRP I cannot see all my files. I know all my files are there still as my storage still only has 10gb free even though the file Explorer shows no files visible.
It seems like no app at all has access.
What can I do to get access to my files again, I have some really important stuff I have got in the last few days that I have not backed up yet. As long as I can get some sort of backup of the files I will be happy to reset the phone.
Ok so what I have done since it working fine was.
Copy 2 files from my computer to my phone
Reboot into TWRP and then force shut the phone down after about 1 minute as I was not patient enough (turns out with f2fs you need to wait a bit longer)
After that, booting into the systems had no read or write access in the sdcard folder which is where all the personal data is stored.
Hopefully what I have said has made sense, if you need any other information just ask
Click to expand...
Click to collapse
If your phone is visible in adb try this command
adb pull /sdcard
This should transfer all the contents from internal storage to your computer into the same folder where your adb tools program is saved.

pvramk said:
If your phone is visible in adb try this command
adb pull /sdcard
This should transfer all the contents from internal storage to your computer into the same folder where your adb tools program is saved.
Click to expand...
Click to collapse
Thanks for the suggestion, I'm not home for another 10 hours so I will try that when I get home. So if anyone has any other suggestions let me know

pvramk said:
If your phone is visible in adb try this command
adb pull /sdcard
This should transfer all the contents from internal storage to your computer into the same folder where your adb tools program is saved.
Click to expand...
Click to collapse
This doesnt work.
B:\Backups\OnePlus 3\>adb pull -p /sdcard
remote object '/sdcard' not a file or directory
Any other ideas?

DarkN3ss61 said:
This doesnt work.
B:\Backups\OnePlus 3\>adb pull -p /sdcard
remote object '/sdcard' not a file or directory
Any other ideas?
Click to expand...
Click to collapse
I'm not sure about the -p
Did you try without this flag?
you can try adb pull /sdcard/ .
is the phone visible in adb devices ?

pvramk said:
I'm not sure about the -p
Did you try without this flag?
you can try adb pull /sdcard/ .
is the phone visible in adb devices ?
Click to expand...
Click to collapse
I tried with and without the flag, also yes the phone is visible in ADB.
I have given up and wiped phone completely, flashed latest version of TWRP, then 4.1.1 and magisk 12. No problems so far, apart from not having my files that were not backed up.
So you can consider this problem abandoned

Related

Moving Files From SD Card To Internal Memory Possible?

Hey guys, I love this site and the outpour of support. This is really the first issue I've run into with my evo thus far.
I want to move some files I made into ringtones from my SD card into the internal memory in the location of the stock ringer sounds. I want to do this so if I ever take out or swap SD cards I never have to worry about losing my ringers. I have been using the astro file browser but it apparently does not let me move or copy and paste the file(s) where I want them.
Is there any way to do this?
thanks a lot!
Also follow up question. My SD Card always mounts when I plug my phone into my PC. Is there a way to stop this? even when I put the phone to charge only, the SD card shows up in Win7.
You need to have root and NAND unlock if you want to do anything like that, but it is possible.
If you have NAND unlocked, you can do it with your phone running normally, but I would use ADB in your particular situation. You can also use something like Root Explorer, but it costs money.
If you do not have NAND unlocked, but you have toast's root, you must go into recovery first.
If you know how to use ADB and you have full root (w/ NAND unlock), you should be able to use a command line in Windows to this effect.
For ringtones:
Code:
adb shell cat /sdcard/ringtone.mp3 > /system/media/audio/ringtones/
For notification sounds:
Code:
adb shell cat /sdcard/notification.mp3 > /system/media/audio/notifications/
For the files on your SD.
Otherwise you can push from the Windows itself. In command line, navigate to the area in Windows where you have the sounds and do something like this:
Code:
adb push ringtone.mp3 /system/media/audio/ringtones/
or
Code:
adb push notification.mp3 /system/media/audio/notifications/
If you do not have NAND unlocked, but you have root and a custom recovery, go into the custom recovery, then apply this command.
Code:
adb shell mount /dev/block/mtblock4 /system
After that, the commands above should work normally.
Is it possible to copy the 8GB SD files to your computer, insert a 16GB into the phone, and them paste the files from the computer to the new SD card? Will I have to re-root?
I'm currently running Damage Control (full root) along with other root tweaks.
@Jykinturah- Won't he need to mount the file system first?
dang, I was hoping to do it without rooting. I was seriously contemplating rooting my phone before 2.2 was announced to be coming out "soon" but I am a little hesitant to take the plunge knowing that we should all have froyo soon. I may still consider this or may try and do some more research. Thanks for the help though! It is greatly appreciated.
GumboChief said:
@Jykinturah- Won't he need to mount the file system first?
Click to expand...
Click to collapse
If you are booted into the OS, no. If you are in recovery, yes.
Code:
adb shell mount /dev/block/mtblock4 /system
Not usually a great idea to write to system when booted up, but if its just a ringtone or something, meh.
rockdrummersrock said:
dang, I was hoping to do it without rooting. I was seriously contemplating rooting my phone before 2.2 was announced to be coming out "soon" but I am a little hesitant to take the plunge knowing that we should all have froyo soon. I may still consider this or may try and do some more research. Thanks for the help though! It is greatly appreciated.
Click to expand...
Click to collapse
I am not the best person to ask about whether you MUST be rooted to do this, but I think you need to.
Not sure if you can write to /system in recovery without being rooted.

[GUIDE] Persistent Temp Root for G2 to SD Card

Problem: Changes to the system partition are lost when Linux flushes the disk cache: http://pastebin.com/cm75Z9UA
These instructions are a workaround to provide temp root like normal plus persistence because /system /data and /cache are partitions on your SD card. This lets you reboot and even factory reset, while being able to easily restore your settings and such by re-rooting and mounting your SD card partitions back over the internal partitions.
Prerequisites:
SD card partitioned with four partitions:
6GB as fat (for your data, can be bigger or small depending on your card size)
400MB ext3 for /system
1.3GB ext3 for /data
200MB ext3 for /cache
On the phone, enable "USB debugging" in Menu -> Settings -> Applications -> Development
On a PC with the Android SDK tools (adb) installed and working:
adb push Superuser.apk /data/local
adb push busybox /data/local
adb push rage /data/local
adb push resume /data/local
adb push root /data/local
adb push rsync /data/local
adb push setup /data/local
adb push su /data/local
adb install Term.apk
adb shell chmod 755 /data/local/busybox /data/local/rage /data/local/setup /data/local/resume /data/local/rsync /data/local/root
On the phone, open "Terminal Emulator" and type:
/data/local/rage
Wait for it to say "[+] Forked NNNN childs." then press the back button.
Open "Terminal Emulator" again and it should force close.
Open it one more time and the prompt should display "#". Then type:
/data/local/root
/data/local/setup
You may need to re-root after it reloads the GUI, but then it will stick. setup is a script that mounts your SD card partitions and copies the existing. It should only be run once unless you want to erase what you have there previously. This step wont work if you SD card is not partitioned properly.
On future power-ons, run this after temp-root instead of setup:
/data/local/resume
and you should get your Android back how it was.
is it suppose to scan through all apps on phone then reboot
Thanks muchly, I'll try this when my G2 arrives.
I have a question about this method. It looks to me that what setup does is copy the entire system, data, and cache to the SD card. Then, when you run resume, it uses rsync to bring the main system (in the onboard flash) up to date from the SDcard version, and then any changes, even if not actually written to the main system partition due to the HTC copy protection, get written to the sdcard copy of the system. Very clever (if I'm reading this write, otherwise, still clever, but me not so clever as I mis-understood).
The question is this: Are there any glitches or instabilities generated by suddenly changing the system files after the OS is already booted? Do I have to make sure to do this before I begin using my phone after boot or risk making changes that I will then loose when I run resume?
Thanks again for the work putting this together!
Sheep
Sheep, you understand almost completely. Setup does copy the existing data from the internal phone memory to the SD card. However, it then (like resume) doesn't copy anything back, it just mounts the system, data, and cache partitions from the SD card on top of the internal ones.
I had issues with the internal memory reverting back after I make changes to it. It seemed to happen over a short time, or was triggered by things like mounting the SD card to a computer.
I've been using this for about 24 hours with no problems. I've done a couple fresh boots and ran resume. But I didn't test the instructions from scratch, so if anyone tests and finds a problem, let me know!
Any performance hit because of running from SD?
I haven't really noticed any.
How does this impact battery life?
Sent from my T-Mobile G2 using XDA App
Can't say, I've had my phone hooked up most of the time through adb looking for root. Just did this for fun and because I was sick of re-rooting all the time.
looks interesting I'll try it out tomorrow
Sent from my T-Mobile G2
so your sd card has to be partitioned pryor to trying this
pre-partitioned card?
thatruth132 said:
so your sd card has to be partitioned pryor to trying this
Click to expand...
Click to collapse
yes it does
texasaggie1 said:
yes it does
Click to expand...
Click to collapse
and how do i do this on a non-rooted device
thatruth132 said:
and how do i do this on a non-rooted device
Click to expand...
Click to collapse
Use your G1 to partition the card.
Brad
You can also connect your phone to a Linux computer (a LiveCD would be fine) and use gparted or fdisk. Don't forget to backup the contents of your card first!
Pretty cool. But I think I'm gonna wait for a more permanent solution....
sheek360 said:
Pretty cool. But I think I'm gonna wait for a more permanent solution....
Click to expand...
Click to collapse
There are no roms available yet any ways, so to a non dev, non cook like me, the Root is pretty much useless
I'd read that the currently available root was good until a reboot, then I saw this thread that made rerooting after a reboot much easier. Since then I've seen some posts that seem to indicate that a root may spontaneously disappear even without rebooting. Is this the case, some permissions may be lost even if you don't reboot?
I was ready to pull the trigger on this permanent-temporary root until I read that. I'd like to be able to import my old wpa_supplicant.conf file and get my corp ipsec vpn working. I'd also like to be able to get wifi-tether working (although I rarely use it), but if root won't stay 100% until a reboot, then I'm not going to bother.
Dalamak said:
There are no roms available yet any ways, so to a non dev, non cook like me, the Root is pretty much useless
Click to expand...
Click to collapse
Not true. I'm not a dev or a cook, but there are things that you can make the phone do with root besides adding a theme or ROM.
wifi tether
ipsec vpn
backups
etc...
smasraum said:
I'd read that the currently available root was good until a reboot, then I saw this thread that made rerooting after a reboot much easier. Since then I've seen some posts that seem to indicate that a root may spontaneously disappear even without rebooting. Is this the case, some permissions may be lost even if you don't reboot?
I was ready to pull the trigger on this permanent-temporary root until I read that. I'd like to be able to import my old wpa_supplicant.conf file and get my corp ipsec vpn working. I'd also like to be able to get wifi-tether working (although I rarely use it), but if root won't stay 100% until a reboot, then I'm not going to bother.
Click to expand...
Click to collapse
With temp root on the internal system partition, writes would revert back after certain things (after mounting the sd card to a computer through the phone and disconnecting it, I'd always loose root). When running /system from an sd card, no writes can be reverted because none are made, so I've never had to re-root.
how to partition an SD card?
thatruth132 said:
and how do i do this on a non-rooted device
Click to expand...
Click to collapse
I used gparted in ubuntu to do mine. Like SAINTH said, the install disk for ubuntu is also a livecd so you dont even have to install ubuntu if u dont want to

What's the best way to backup files from the phone's storage?

I am using Windows 7 and I need to backup my data so I can move to JB. However, when I connect my phone with a USB cable and drag all the files from my phone over to my laptop, it TAKES FOREVER!!!
Also, I think it "times out" or something because in the middle of the process, I'll always get "invalid copy handle" errors and have to start over.
Does anyone know a good, fast way to backup the data on our phones?
Neo3D said:
I am using Windows 7 and I need to backup my data so I can move to JB. However, when I connect my phone with a USB cable and drag all the files from my phone over to my laptop, it TAKES FOREVER!!!
Also, I think it "times out" or something because in the middle of the process, I'll always get "invalid copy handle" errors and have to start over.
Does anyone know a good, fast way to backup the data on our phones?
Click to expand...
Click to collapse
Well you can always do "adb pull /sdcard/ C:\directory you want"
Also to backup apps+data, do "adb backup -f C:\directory you want -all -apk -noshared -system" For more info about backing up apps and data, check this thread
Hope I you have drivers installed and know how to use adb
Thanks for the ideas!
I actually tried copying one folder at a time and it's much more reliable. Still slow but at least no time outs.
I'm just glad I could help!
Transferring speed can't be adjusted, since there's a limit from the USB cable...
If there is a corrupt file that directory will fail transfer that directory manually, and avoid the corrupt file.
Sent from my Galaxy Nexus using xda app-developers app
Use adb or access a shared folder on your computer via wifi using a file manager that supports lan shares. For instance: es file explorer.
Sent from my Galaxy Nexus using Tapatalk 2

[Q] Can't access my old files after switching ROM from AOKP to CM

Initially I thought this was a problem with Google Play / Apollo, but I realize now that when I plug in my phone via USB, I can't see any of the many, many folders and files present on /sdcard that I could see previously.
If I copy a "new" mp3 onto my Galaxy Nexus, it's recognized just fine by both Google Play and Apollo. However, none of my old mp3s (or files, for that matter) are recognized. They were placed in /sdcard/Music, a folder that I cannot see when I plug in my phone, only from the file manager running on the phone. The issue persists if I move an "old" mp3 from my music folder out into the sdcard root, it's still not recognized. This makes me think this might be permission related, but the file manager says that all files are readable and writable.
I've tried running "fix permissions" in both ROM manager and the CWM recovery, but it makes no difference. Any idea what has happened, and how to fix it so that I can use all my old files again?
edit If it's any help, I just ran ls -al in a terminal emulator and I can't see any difference at all between folders I can and cannot see. Example: I can see /sdcard/media just fine, because I created that folder from Explorer in Windows. Music in that directory works. I cannot see /sdcard/music. Here's the permissions:
Code:
drwxrwxr-x root sdcard_rw 2012-09-18 media
drwxrwxr-x root sdcard_rw 2012-09-16 music
This is a bit confusing.
When I try pulling and pushing a file with adb like so:
Code:
adb pull file.tar
adb push file.tar file2.tar
I get
Code:
failed to copy 'file.tar' to 'file2.tar': Read-only file system
I've tried remounting /sdcard in root terminals both on the phone and via adb, but I get mount: Operation not permitted. I'm thinking this might be because /sdcard isn't the actual path but I've tried /storage/sdcard0 and /mnt/sdcard as well and I get the same error.
Thanks in advance for any suggestions.
(This question was also posted on android.stackexchange)
adb push /sdcard/file2.tar
also, cm doesnt have root access enabled by default for adb.
/sdcard/ is already rw, otherwise apps couldnt place anything there. nor could we.
Sent from my i9250
Didn't realize I needed an absolute path, thanks! I now managed to push the file, but it does not show up under the "Galaxy Nexus" unit in My Computer. It does show up when I do an ls in adb shell though. Any ideas?
bajsmumsaren said:
Didn't realize I needed an absolute path, thanks! I now managed to push the file, but it does not show up under the "Galaxy Nexus" unit in My Computer. It does show up when I do an ls in adb shell though. Any ideas?
Click to expand...
Click to collapse
try disabling mtp on the device; or rebooting, if you want to stick with mtp. maybe it has to refresh file list?
bk201doesntexist said:
try disabling mtp on the device; or rebooting, if you want to stick with mtp. maybe it has to refresh file list?
Click to expand...
Click to collapse
Switching from MTP to PTP does nothing, the same files are shown ("new" files). I'd like to stress that if I take a picture for example, that pictures does show up both with MTP and PTP. New files work fine. It's the old files that I can see in the file explorer in the actual phone that just refuse to show up when I connect to my computer, and they are obviously also not recognized by apps in the phone (such as Apollo or Google Play).
I realize that I could work around this issue by just removing everything from my sd card and then putting it back, but I really want to figure out how this can even happen.
I'm no expert by far, but it sounds like when you changed ROM the"index"file for mtp isn't updates. Have you tried to run the media scanner?
Swype'ed on my CM10 Galaxy Nexus
Herman76 said:
I'm no expert by far, but it sounds like when you changed ROM the"index"file for mtp isn't updates. Have you tried to run the media scanner?
Click to expand...
Click to collapse
If I've understood correctly, power cycling the device should trigger the media scanner. I just tried restarting, and it made no difference. (I've restarted the device several times since this problem occurred).
Opening the Gallery app still only shows me two pictures (I've taken two photos since the ROM flash), interestingly the thumbs are for other pictures lying around and after a while Gallery crashes. I use QuickPic more often though and that app behaves well, and shows all photos.
edit As a final resort, I tried doing a full wipe and reinstalling CM10 M1 completely, without restoring any settings or apps from any old installations. The issue still persists! Any files created with my now "old" CM10 installation no longer appear, even when they are moved within a folder where other "new" files are shown and working. This is starting to annoy me, but since this obviously is a bug in CM10 M1 I see no point in trying to spend time solving it, I'm just going to switch back to AOKP. Thank you for any answers and attempts at solving this.
edit2 Formatting /sdcard in CWM recovery fixed this, even though it might not be the most elegant solution.
Have you seen this?http://forum.xda-developers.com/showthread.php?p=30288268
Basically what it suggests is that you go to apps via settings, find the "Media Storage" app (it's a system app) Clear data/cache, then reboot. This was my problem.
Sent from my Galaxy Nexus using xda premium

[Q] Backup external SD contents to PC using ADB or similar

So, the interwebs has NOTHING that I can find which addresses this. Is there an ADB command or perhaps an app that will backup one's external SD to their PC?
You would just have to go into adb, debugging enabled, etc, and you'd basically just do adb pull /system/sdcard and it should dump it into your tools folder; though idk why you'd wana do that by adb exactly, though i know WHY, just...yea, lol.
Though if on the gs3, it'd be /system/sdcard1
Why not just connect with USB cable and transfer that way.
XDA Moderator
Papa Smurf151 said:
Why not just connect with USB cable and transfer that way.
XDA Moderator
Click to expand...
Click to collapse
Because for some reason, whenever I try to bulk-load everything on the external card to my Windows PC, it just sits at "calculating" or whatever. It doesn't actually begin the transfer, nor does it "fail". I've found that if I do one folder at a time, I can get most of it, but not all of it.
I just got a 32gb card, I want to mirror the contents of my current 16gb card to it.
teh roxxorz said:
You would just have to go into adb, debugging enabled, etc, and you'd basically just do adb pull /system/sdcard and it should dump it into your tools folder; though idk why you'd wana do that by adb exactly, though i know WHY, just...yea, lol.
Though if on the gs3, it'd be /system/sdcard1
Click to expand...
Click to collapse
I've tried telling it to pull from the following (all valid locations for my particular setup):
- /mnt/external_sd
- /external_sd
- /mnt/sdcard1
Each returns the "remote object '' does not exist" error.
disturbd1 said:
I've tried telling it to pull from the following (all valid locations for my particular setup):
- /mnt/external_sd
- /external_sd
- /mnt/sdcard1
Each returns the "remote object '' does not exist" error.
Click to expand...
Click to collapse
Well, navigate to / on adb in the shell, do an ls command, list the directories, and paths, and use the path it shows up there; it could see it differently than what you see when you use the phone.

Categories

Resources