advanced question - internal and external file transfers - Nexus 5X Q&A, Help & Troubleshooting

I have a rooted 5x nougat with twrp recovery and stock rom. When I attempt to copy my TWRP backup to my computer via MTP file transfer, I cannot. Same with my titanium backup folder. I also tried to move my TWRP backup to my DCIM folder such that I could try PTP file transfer but that didn't work either.
Indeed, i cannot even transfer files within my own phone's file directory. I'm using root Explorer. I've toggled and made the file system read-write. I tried to change file folder permissions, and that failed.
Any advice Xda family? I have the proper drives installed.
Apologies in advance if my verbiage isn't accurate technically. I'm pretty good with android but by no means an expert.
Mario

File Transfers
I'm not really sure as to why you'd have problems moving files within your phones internal storage, however I do have a solution (work around, really) to your MTP problem, as long as you have ADB working.
I also never got MTP working so I just use a file manager to check the path to the folder I want from my phone to my computer, and then use the command:
Code:
adb pull /path/to/folder/on/phone /path/to/destination/on/computer
And if I want to put something from my computer on my phone, I do the opposite command:
Code:
adb push /path/to/file/on/computer /path/to/destination/on/phone
Additionally, if you really need to move files around on your phone, you can use:
Code:
adb shell
su
mv /path/to/file /path/to/destination
Hope that helps!

Thanks. It does help and I have adb. I'll try that method. I'm not sure why I'm having that issue either.

Related

Can't delete folder?

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 *

[Q] Copy large backup directory to PC

Hi guys,
I am trying to figure out a way to copy clockworkmod directory to my PC, as the backups are taking up too much unncessary space on the phone. The problem is that via MTP Windows Explorer simply hangs and doesn't copy a thing. My guess is that the underlying issue is the huge number of very small files in the /blob sub-directory.
Could anyone guide me how to accomplish this task, please? Or, alternatively, what other methods of backing straight to the PC are there?
Much obliged!
zkvvoob said:
Hi guys,
I am trying to figure out a way to copy clockworkmod directory to my PC, as the backups are taking up too much unncessary space on the phone. The problem is that via MTP Windows Explorer simply hangs and doesn't copy a thing. My guess is that the underlying issue is the huge number of very small files in the /blob sub-directory.
Could anyone guide me how to accomplish this task, please?
Much obliged!
Click to expand...
Click to collapse
MTP sucks. I prefer to use adb for this: adb pull /sdcard/clockworkmod D:\your\path\here
If you don't want to use the commandline, you can alternatively use an app like ES File Explorer to access a LAN share (shared folder/drive on your computer) and copy files this way.
adb pull?
Any time I transfer anything large it's what I use.
Code:
adb pull /sdcard/clockworkmod/ /Backup/
I believe that's the directory.
Just rename the "clockworkmod" folder to whatever it truly is if not.
This will put a "Backup" folder on your C:\ drive.
Edit:
Ninja'd.
Thank you very much, guys! I hadn't realised that adb pull could be used for copying a whole directory.
Reverse of this
Can anyone tell me how to reverse this using adb (i.e. move the directory back onto the phone)? Thanks.
grouseuk said:
Can anyone tell me how to reverse this using adb (i.e. move the directory back onto the phone)? Thanks.
Click to expand...
Click to collapse
[GUIDE] How-to copy files from/to your device
from Petrovski's sig
Thanks for the help with ADB pull. I knew about the push command, but being the noob I am I would never have thought that the opposite was that simple.
Now I have a GNex and I'm almost out of internal memory. I've copied my entire clockworkmod folder to my PC. I was wondering if I could delete the contents of the clockworkmod folder off of my phone (since it's all on the PC) to regain some storage space, and then only return the deleted contents to the phone when I need to do a nandroid restore without any problems occurring. I wouldn't want to go do all that only to arrive upon a large problem when I try to go back to stock JB JRO03C or anything like that.
kbolt said:
Thanks for the help with ADB pull. I knew about the push command, but being the noob I am I would never have thought that the opposite was that simple.
Now I have a GNex and I'm almost out of internal memory. I've copied my entire clockworkmod folder to my PC. I was wondering if I could delete the contents of the clockworkmod folder off of my phone (since it's all on the PC) to regain some storage space, and then only return the deleted contents to the phone when I need to do a nandroid restore without any problems occurring. I wouldn't want to go do all that only to arrive upon a large problem when I try to go back to stock JB JRO03C or anything like that.
Click to expand...
Click to collapse
I want to know this exact answer as well.
if you dont rename the folders, you wont have a problem.
I've found that the GNex toolkit makes it pretty easy to make backups, move them to your PC and restore plus a whole lot more. It's pretty good.
http://forum.xda-developers.com/showthread.php?t=1392310
+1 for adb
Large File Tip
THANK YOU!!
Jubakuba said:
adb pull?
Any time I transfer anything large it's what I use.
Code:
adb pull /sdcard/clockworkmod/ /Backup/
I believe that's the directory.
Just rename the "clockworkmod" folder to whatever it truly is if not.
This will put a "Backup" folder on your C:\ drive.
Edit:
Ninja'd.
Click to expand...
Click to collapse
Unable to see clockworkmod folder through file explorer
HI All,
Am not able to see the clockworkmod folder through File Explorer. Whereas after i take a backup through recovery, i can see the backup exists in /sdcard/clockworkmod/backup.
Please help.
Hi All,
Can anyone help with the above issue?
Use adb pull or an ftp server running on your device.
Sent from my Galaxy Nexus using Tapatalk 2

[Q] How to copy nandroid backup?

Hi,
Is there any way to copy the nandroid backup (and blobs) to the PC without first copying everything over to the sdcard?
Apparently the /data/media is only visible in adb shell as super user and thus am not able to pull those files as normal user.
Thanks
Gaurav
Why don't you pull the whole "clockworkmod" folder located on your /sdcard/ via adb?
I have pulled it before and I think it would work just fine when pushing it back to the sdcard then restore it but honestly I did not try to push it back later and restore so try it on your own risk then report here for others to know
ahmadallica said:
Why don't you pull the whole "clockworkmod" folder located on your /sdcard/ via adb?
I have pulled it before and I think it would work just fine when pushing it back to the sdcard then restore it but honestly I did not try to push it back later and restore so try it on your own risk then report here for others to know
Click to expand...
Click to collapse
/data directory is not in sdcard and hence I'm failing to pull it via adb. Can adb pull directories with root only permission? What is the command for that?
What I did some time ago and even tried it now again to confirm is the following:
1- Connect my GNex to Laptop. I am running Ubuntu Linux by the way.
2- Open the Terminal and change directory to Desktop for example by typing: cd Desktop
3- Start the adb server by typing adb devices which should start the adb server and show the list of devices attached which in this case should be your GNex
4- Pull the data from GNex by typing the command: adb pull /sdcard/clockworkmod
5- The files will start being pulled to the directory you specified. In this example it is Desktop
The whole "clockworkmod" directory which is located on the sdcard of your GNex and you can access "without root" wil be pulled to your laptop.
I hope this makes it clear and it is useful to you
ahmadallica said:
What I did some time ago and even tried it now again to confirm is the following:
1- Connect my GNex to Laptop. I am running Ubuntu Linux by the way.
2- Open the Terminal and change directory to Desktop for example by typing: cd Desktop
3- Start the adb server by typing adb devices which should start the adb server and show the list of devices attached which in this case should be your GNex
4- Pull the data from GNex by typing the command: adb pull /sdcard/clockworkmod
5- The files will start being pulled to the directory you specified. In this example it is Desktop
The whole "clockworkmod" directory which is located on the sdcard of your GNex and you can access "without root" wil be pulled to your laptop.
I hope this makes it clear and it is useful to you
Click to expand...
Click to collapse
Let me explain that /sdcard/clockworkmod is not used for nandroid backup on my nexus 4. nandroid backups are stored in /data/media/clockworkmod which are only visible as a superuser and not a normal user.
So, my question is whether we can pull that directory (/data/media/clockworkmod) directly via adb instead of first copying it to /sdcard.
gauravsri said:
Let me explain that /sdcard/clockworkmod is not used for nandroid backup on my nexus 4. nandroid backups are stored in /data/media/clockworkmod which are only visible as a superuser and not a normal user.
So, my question is whether we can pull that directory (/data/media/clockworkmod) directly via adb instead of first copying it to /sdcard.
Click to expand...
Click to collapse
That directory should not require root access.
adb pull /data/media/clockworkmod/ /clockworkmod/
A clockworkmod folder will be on your c:\ drive.
And the easiest way to push it back and keep folder integrity is to put the clockworkmod folder in an empty folder...and put it in platform tools.
adb push foldername /data/media/
It does require root access. Anyway, I figured out that if I reboot in recovery mode then adb connects as root user and I'm able to pull the files from that location.
Thanks
Jubakuba said:
That directory should not require root access.
adb pull /data/media/clockworkmod/ /clockworkmod/
A clockworkmod folder will be on your c:\ drive.
And the easiest way to push it back and keep folder integrity is to put the clockworkmod folder in an empty folder...and put it in platform tools.
adb push foldername /data/media/
Click to expand...
Click to collapse
Thanks a lot, i was looking the way to do this.

[Q] LG G3 Lollipop - No Internal SD Card?

I have a strange problem and I haven't been able to find a resolution online. I'm hoping someone smarter than me can offer a solution.
I have an AT&T LG G3 (LG-D850). When I got it, it had stock KK. I rooted it with Bump and everything was cool. I stayed with stock.
Last night I upgraded it to Lollipop using the stock, bump'd LG-D850 20F Lollipop 5.0.1 ROM from autoprime. I didn't run into any problems with the install. The phone appeared to be working fine.
However, today I'm having trouble with the internal storage. When I try to download a file from the internet, it's failing. In the stock browser, it just fails. Downloads says "<Unknown> Failed." In Firefox, it tells me "Cannot download file because SD card is in use." In Chrome, it tells me "No SD card."
I'm also not able to move files to or from internal storage. I can cut, copy, and paste files from one folder on my external card to another on my external. However, I can't cut, copy, or paste files from one folder in my internal storage to another folder in my internal or external storage. I've tried both the stock file explorer as well as FX.
I tried the SDFix app from NewApp on the off chance that it would help (I read somewhere it would also work on L), but it had no effect.
I can still download apps from the Play store and install them. However, if I create a new file in QuickOffice, I can't save it ("Failed to save document.") I can navigate to root and copy/cut/paste files from the data/app folder to my external card and other folders. I think the issue is the system/sdcard folder. The owner/group on the folder is root and read, write, and exec are all checked.
Does anyone know what the permissions on that folder should be? Or if that's really my problem at all?
Thanks.
kragar00 said:
I have a strange problem and I haven't been able to find a resolution online. I'm hoping someone smarter than me can offer a solution.
I have an AT&T LG G3 (LG-D850). When I got it, it had stock KK. I rooted it with Bump and everything was cool. I stayed with stock.
Last night I upgraded it to Lollipop using the stock, bump'd LG-D850 20F Lollipop 5.0.1 ROM from autoprime. I didn't run into any problems with the install. The phone appeared to be working fine.
However, today I'm having trouble with the internal storage. When I try to download a file from the internet, it's failing. In the stock browser, it just fails. Downloads says "<Unknown> Failed." In Firefox, it tells me "Cannot download file because SD card is in use." In Chrome, it tells me "No SD card."
I'm also not able to move files to or from internal storage. I can cut, copy, and paste files from one folder on my external card to another on my external. However, I can't cut, copy, or paste files from one folder in my internal storage to another folder in my internal or external storage. I've tried both the stock file explorer as well as FX.
I tried the SDFix app from NewApp on the off chance that it would help (I read somewhere it would also work on L), but it had no effect.
I can still download apps from the Play store and install them. However, if I create a new file in QuickOffice, I can't save it ("Failed to save document.") I can navigate to root and copy/cut/paste files from the data/app folder to my external card and other folders. I think the issue is the system/sdcard folder. The owner/group on the folder is root and read, write, and exec are all checked.
Does anyone know what the permissions on that folder should be? Or if that's really my problem at all?
Thanks.
Click to expand...
Click to collapse
set up adb then typ this commands
Code:
adb shell
su
restorecon -v -R /data/media
@suljo94 Awesome! That fixed it! :good:
Googleing restorecon brought up a whole bunch of hits about this problem along with this solution. Too bad I couldn't find the answer unless I already knew the answer
this should be added to the autoprime thread or on the q&a for all variants.
Is there anyway to fix internal sdcard? i get bricket on a F460K and cant install .zip files in recovery philz, when i choose zip from/sdcard resolves "Couldn't open directory" and "ni files found" but i can put files in "sdcard" via adb =/, anyone know a way to fix it?. thanks!.
@bolillo It's in the main thread now, first post. It looks like it was added on 3/19.
kragar00 said:
@bolillo It's in the main thread now, first post. It looks like it was added on 3/19.
Click to expand...
Click to collapse
Ooooo well sorry jajaja first thing that popped up in google was this lol
Sent from my LG-D850 using XDA Free mobile app
@mafury did you try the solution @Sulijo94 posted? That fixed my problem.
Can you install via adb?
kragar00 said:
@mafury did you try the solution @Sulijo94 posted? That fixed my problem.
Can you install via adb?
Click to expand...
Click to collapse
Can't run this command on adb shell =(.
mafury said:
Can't run this command on adb shell =(.
Click to expand...
Click to collapse
Did you try from a terminal emulator on phone?
Sent from my LG-D850 using XDA Free mobile app
No, the phone bricked, i recover delete all user data and use kdz with LG Flash tools2014.
I'm failing at this error
suljo94 said:
set up adb then typ this commands
Code:
adb shell
su
restorecon -v -R /data/media
Click to expand...
Click to collapse
I get this error. Please can somebody help?
tauseefalik said:
I get this error. Please can somebody help?
Click to expand...
Click to collapse
format your internal sd (you will lose everything not on externl sd card,apps data)
suljo94 said:
format your internal sd (you will lose everything not on externl sd card,apps data)
Click to expand...
Click to collapse
I tried using this command instead an it worked for me.
"adb shell
su
restorecon -FR /data/media/0"
P.S i'm using no SD Card
Would this work for media (ie. mp3)?
I can't seem to find a fix.. All my music doesn't show in any music app and can't find a solution.. Already checked for .nomedia files, cleared media storage and forced a rescan for media and and formatted internal and external SD cards... No luck.
Thanks
Sent from my LG-D852 using XDA Free mobile app
Very good!!!
suljo94 said:
set up adb then typ this commands
Code:
adb shell
su
restorecon -v -R /data/media
Click to expand...
Click to collapse
Fantastic!! I had the same problem with my LG G3 D850. I installed the stock rom from the TWRP recovery and was with this same problem. After performing this process my problem was solved !! But the pictures of the Camera application are not saved in the internal memory. What should I do to fix this??
kragar00 said:
I have a strange problem and I haven't been able to find a resolution online. I'm hoping someone smarter than me can offer a solution.
I have an AT&T LG G3 (LG-D850). When I got it, it had stock KK. I rooted it with Bump and everything was cool. I stayed with stock.
Last night I upgraded it to Lollipop using the stock, bump'd LG-D850 20F Lollipop 5.0.1 ROM from autoprime. I didn't run into any problems with the install. The phone appeared to be working fine.
However, today I'm having trouble with the internal storage. When I try to download a file from the internet, it's failing. In the stock browser, it just fails. Downloads says "<Unknown> Failed." In Firefox, it tells me "Cannot download file because SD card is in use." In Chrome, it tells me "No SD card."
I'm also not able to move files to or from internal storage. I can cut, copy, and paste files from one folder on my external card to another on my external. However, I can't cut, copy, or paste files from one folder in my internal storage to another folder in my internal or external storage. I've tried both the stock file explorer as well as FX.
I tried the SDFix app from NewApp on the off chance that it would help (I read somewhere it would also work on L), but it had no effect.
I can still download apps from the Play store and install them. However, if I create a new file in QuickOffice, I can't save it ("Failed to save document.") I can navigate to root and copy/cut/paste files from the data/app folder to my external card and other folders. I think the issue is the system/sdcard folder. The owner/group on the folder is root and read, write, and exec are all checked.
Does anyone know what the permissions on that folder should be? Or if that's really my problem at all?
Thanks.
Click to expand...
Click to collapse
Not working. I connected my phone,they can't find it in when i type adb devices. + can't download anything from internet,only from google play.
P760x said:
Not working. I connected my phone,they can't find it in when i type adb devices. + can't download anything from internet,only from google play.
Click to expand...
Click to collapse
@P760x when you type adb devices, what do you get? If it doesn't list any devices you probably need to reinstall the phone drivers on your computer. If it does list your phone, then there's something else wrong.
kragar00 said:
@P760x when you type adb devices, what do you get? If it doesn't list any devices you probably need to reinstall the phone drivers on your computer. If it does list your phone, then there's something else wrong.
Click to expand...
Click to collapse
(i'm getting nothing)That's the whole point. My pc searches and founds my device. It perfectly worked on 4.1x JB, it founds instantly.
For some reason,when i connect my phone into mtp (Files transfer to pc) mode my pc can't find any items in phone,so does extraction applications in my phone,it's just all empty, even though i have gApps,custom kdz.
I tried with terminal emulator (android version) - it says permission denied,so i think that requires root? I would get instantly but i can't transfer or download anything to my phone...?
P760x said:
(i'm getting nothing)That's the whole point. My pc searches and founds my device. It perfectly worked on 4.1x JB, it founds instantly.
For some reason,when i connect my phone into mtp (Files transfer to pc) mode my pc can't find any items in phone,so does extraction applications in my phone,it's just all empty, even though i have gApps,custom kdz.
I tried with terminal emulator (android version) - it says permission denied,so i think that requires root? I would get instantly but i can't transfer or download anything to my phone...?
Click to expand...
Click to collapse
@P760x I noticed that I can't connect my phone in MTP mode unless developer options are on and USB debugging is on. I didn't have that problem on KK, only Lollipop.
If adb devices still doesn't list your phone after that, manually download and reinstall the phone drivers from LG. I've had multiple occasions when Windows eats those drivers, so that's the first place to start.
Hopefully that helps.

Question regarding internal storage... a big mystery!

I recently had a problem where I had to do a factory restore on a non-bootable phone... and my only option was to use adb shell to copy the extracted stock lollipop nandroid files to the TWRP folder in internal storage [there may have been other ways, but I was not aware of one.]. Thanks to 3484jacks, thebobmannh, ckpv5, and redpoint73. I hope I didn't forget anyone.
OK.. so that worked... but it was very messy. Why? Because my first (and obvious) choice was to create the subfolder under TWRP and then adb push the files to that folder.
The folder I am referring to is the "root" folder of internal storage, also called the /sdcard/. It usually has other directories/folders such as .data, Android, Ringtones and/or Media.... I am sure you know what I am referring to. And on this "root" of the internal storage (sdcard) is the TWRP folder which contains backups. The path to the backups is sdcard/TWRP/BACKUPS/{device serial number}/name-date of backup.
However, when I did an adb push to the above folder, by using the following command:
adb push c:/nandroid/ /sdcard/ TWRP/BACKUPS/FXXXXX/nandroid (<<==I had already created the nandroid folder as you cannot push an entire folder to your phone; only the files contained therein will be pushed over)
....my files did not end up in /sdcard/TWRP/BACKUPS/FXXXXX/nandroid. Instead they were copied to /sdcard/storage/TWRP/BACKUPS/FXXXXX/nandroid. For some reason when pushing to the sdcard, adb pushes it to a subfolder called storage. I am not sure why this is... perhaps it is because we really are not talking about a physical sdcard, but rather internal storage. In any event, to fix my phone I had to use adb shell and I copied all of the nandroid files from /sdcard/storage/TWRP/{. . .} to /sdcard/TWRP/{ . . .}.
If you are in the true root (system) directory, there are several paths which lead to "internal storage"... and I want to know if anyone has any clue why there are multiple paths and what they mean. Below are the multiple paths from the system directory to internal storage:
(root)/storage/emulated/0/
(root)/storage/emulated/legacy/
(root)/storage/sdcard/
(root)/sdcard/
All of above paths lead to the exact same place (or so it seems)...a place which very much appears like internal storage.
However, I have run into this weird creation of a storage folder on the sdcard (internal storage) before. Several months ago, I copied via USB my entire sdcard to my Windows desktop. Oddly, several folders that I would have expected to be on the sdcard (as they are when viewing with Root Explorer) were not there. When inspecting what I had copied to my desktop, I found that the Download folder and 4 or 5 other folders, ended up in a "/(sdcard)/storage" sub-folder. EXACTLY like what happened to me yesterday (but kind of in reverse as I was copying TO the sdcard)
So that is my first question... Why does this happen? What is emulated? what is the difference between (root)/storage/emulated/0/ and (root)/storage/emulated/legacy/????
My next question, very intimately related to the above, is more of a problem.
The nandroid files I referred to above which I had initially pushed to the sdcard whereupon they ended up in the storage subfolder are still there. And whether I use Root explorer or adb shell, I get a "DELETE FAILED" or "PERMISSION DENIED" error respectively. And in case you are wondering, I did a 'su -' in adb shell before I attempted this. I had to grant access to SuperSU as a toast came up asking for the root rights.
Strange....I never thought internal storage had permissions, but I guess they do.
So the big question...and a solution to getting rid of the mess of files which are taking up several GBs of space on my sdcard (internal storage)... how do I delete the /storage/ folder on my sdcard? The folder was not there before.
Even if I drill down to the individual files (either in adb shell or root explorer) I still get a PERMISSION DENIED.
Please help. NOTE: I thought about reformatting the partition... but what guarantee will I have if I try to push my backed up sdcard data BACK to internal storage?? I probably can make sure that I delete the problematic nandroid files above by deleting them first in Windows, but that doesn't mean my sdcard won't still have another storage subfolder create.... and who knows what will be in it? [and this is the genesis behind my asking the first questions above about internal storage, the "emulated" name in the path, and the multiple paths from the system folder. I figured if I understood what was going on, I would be more likely to fix it.]
Thank you in advance for any assistance!!!

Categories

Resources