Problems
"The contents of the /sdcard partition is not properly displayed by Windows Explorer. I'm missing files/folders and/or I'm seeing files/folders that shouldn't be on my /sdcard. When I browse my /sdcard with a file manager app the contents are displayed OK."
"Whey copying files, the process hangs during transfer. Happens mostly when copying a large number of files."
"The /sdcard contents are listed, but it's not possible to copy anything from or to the /sdcard."
Cause
The Galaxy Nexus does not support the USB mass storage protocol, but relies on MTP (Media Transfer Protocol) when connected to a computer using a USB cable. The implementation of MTP is buggy at best. Transferring files is slower and less reliable when compared to USB mass storage. Windows Explorer is often unresponsive for shorter or longer periods when browsing the /sdcard with it and may not list the contents of the /sdcard properly. These problems are Windows version independent, despite the fact MTP is natively supported since Windows Vista. Problems are reported with XP, Vista and 7 on x86 and x64 architectures. Using alternative file managers instead of Windows Explorer also doesn't resolve the issue.
Solution
I've find it best to work around this issue by avoiding to use MTP by using the following methods:
Direct methods
1) Using ADB
Prerequisites
- ADB binaries
- USB debugging option enabled in developer options
- Galaxy Nexus connected to the computer with USB cable (rooted phones can also use ADB via a Wifi connection)
Steps
The Android Debug Bridge allows to copy files/folders from and to the /sdcard by using the adb pull and adb push commands on a Windows command line interface (DOS prompt). You'll need the ADB binaries on your computer to use this method. You can get them by either installing the Android SDK or by downloading this small package with all the binaries you need (recommended): http://forum.xda-developers.com/attachment.php?attachmentid=1031911&d=1335747189
Extract the files to a folder of your liking. To use adb commands, you must open a command line and either navigate to the folder that contains the adb files (cd D:\MyAdbFilesAreHere) OR you can add the absolute folder location of that folder to the Windows PATH system variable so you can use adb commands regardless of the current directory you're in.
Syntax
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
Examples
If you want to copy your entire /sdcard to D:\MyGalaxyNexus: adb pull /sdcard D:\MyGalaxyNexus
If you want to copy just the DCIM folder (camera images): adb pull /sdcard/DCIM D:\MyGalaxyNexus\CameraImages
If you want to copy a file from your computer to the /sdcard: adb push D:\MyGalaxyNexus\musictrack.mp3 /sdcard/music
Advantages of this method
- Good transfer speeds.
- Possible to automate backups by creating simple Windows batch files.
Disadvantages of this method
- Using a CLI is less intuitive than a GUI.
- File attributes are not preserved (created, modified, accessed attributes).
2) Accessing a shared folder on your computer with a file manager app on your device via Wifi
Prerequisites
- Wifi connection
- Computer and Galaxy Nexus connected to the same LAN
- A shared folder on your computer
- A file manager app that supports accessing LAN shares (for instance: ES File Explorer)
Steps
Create a folder anywhere on your computer and share it by giving the user "Everyone" read/write permissions on it (note: if you are on a network, this means every user on that network can access your folder AND write/delete files in it. For most home situations that's not an issue though): right click on the folder > Share With > Specific People > use the combox to select "Everyone" > click Add. Now change the permission level to Read/Write. You also need to turn off 'password protected sharing' for this to work via Control Panel > Network and Sharing Center > Advanced Sharing Settings > expand Home or Work > section Password protected sharing > turn off password protected sharing.
Finally, install ES File Explorer via the Play Store and launch it. Change the view to LAN. Tap New > tap Scan. Your computer's IP should be listed. Tap it. It will show an overview of shared folders. Ignore the admin shares Windows creates by default (all shares with a dollar sign suffix) and tap the folder you created earlier. Now you can copy any file from/to this folder using ES File Explorer.
Advantages of this method
- Decent transfer speeds.
- Copying files/folders with a GUI.
Disadvantages of this method
- All copy operations must be done on the phone.
- File attributes are not preserved (created, modified, accessed attributes).
3) Using an FTP server on your device
Prerequisites
- Wifi connection
- App that allows FTP access to your device (for instance: ES File Explorer)
- FTP client (for example: FileZilla)
Steps
This is pretty straightforward: open ES File Explorer, go to 'settings' > 'remote settings' and enable 'remote manage'. The app will provide you with an IP address & port which you have to enter in your FTP client. After you have connected, you can transfer files from/to the device.
Advantages of this method
- Decent transfer speeds.
- Copying files/folders using a Windows program.
Disadvantages of this method
- File attributes are not preserved (created, modified, accessed attributes).
Indirect methods
1) Using the cloud
Prerequisites
- An account with a cloud storage service such as Google Drive, Dropbox, Box.com, etc.
- A Wifi connection (not an actual prerequisite, but using mobile data is a lot slower and will have a large impact on your data plan)
Steps
This is pretty straightforward to explain: upload the files you wish to backup to the cloud service of choice, and in turn download them to your computer.
Advantages of this method
- Decent transfer speeds.
- Copying files/folders with a GUI.
- Preserves file attributes.
Disadvantages of this method
- Not a direct method.
- Dependent of third-party services (service or internet connection might be down).
2) USB on the go
Prerequisites
- USB on the go cable
- USB thumb drive
- Root access
- App "Stick Mount" by ChainFire
Steps
With stick mount, a USB OTG cable and a USB thumb drive you can mount a USB thumb drive on your phone. This allows you to copy files and folders from the /sdcard to the mounted USB thumb drive using a file manager app. In turn, the files on the USB thumb drive can be copied to your computer.
Advantages of this method
- Good transfer speeds.
- Copying files/folders with a GUI.
- Preserves file attributes.
Disadvantages of this method
- Not a direct method.
- Needs a rooted device.
- Dependent of a third-party app (might be pulled from the play store or will not be updated).
GPsoft Directory Opus
Directory Opus is a file manager for windows, offering complete system integration thus a full replacement for Windows Explorer. Since version 10.5, Directory Opus has full MTP support built-in. Although certain operations cause long delays (copy-paste for example), the MTP support is robust enough for me to abandon ADB for file transfers.
This is great. Well done. I will certainly link to it in the 101 thread. If you want, I can also add the text to the actual thread (with credit of course) - your call.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks efrant. I hope it proves helpful. Imho, it's probably best to copy the text to your 101 & FAQ post, so people can access all useful info in one place. But if you think the 101 & FAQ post will become too large, linking is also fine.
thanks for putting this together man.
Sent from my i9250
C:\Windows\System32>C:\Users\Angelo\Desktop\platform-tools-v19\adb.exe pull /sdcard D:\MyGalaxyNexus
remote object '/sdcard' not a file or directory
What's wrong?
DDeleted said:
C:\Windows\System32>C:\Users\Angelo\Desktop\platform-tools-v19\adb.exe pull /sdcard D:\MyGalaxyNexus
remote object '/sdcard' not a file or directory
What's wrong?
Click to expand...
Click to collapse
Use /sdcard/
Sent from my Galaxy Nexus using Tapatalk 2
Petrovski80 said:
Solution
I've find it best to work around this issue by avoiding to use MTP by using the following methods:
Click to expand...
Click to collapse
AirDroid
For people who really want to use Windows Explorer effectively, there is a very good app called Samba Filesharing. It runs a samba server on your Android device, which you can then set up as a network drive in Windows. Unlike MTP, all Windows Explorer functions work, eg right-click context menu and filetype associations. It works via WiFi hotspot or normal WiFi connection.
The disadvantage is that transfer rate is limited to about 1.8 MB/s. But for simply browsing files, doing housecleaning, and less-than-huge file transfers, it provides all the familiarity of Explorer. I don't know if it works with wired USB tethering, but if it does, that would also give much faster transfer rate.
thanks for the comparisons in a simple list :good:
FYI, for linux users:
When using adb, no need to download any drivers, just use adb [to get adb, just download platform-tools-v19.zip or if there's a newer one when you read this...].
If you're using adb and try to move files remember to also put the / at the end of the filepath for your android device.
i.e.
./adb push nameofile.zip /sdcard/
Also, before attempting to manually mount your gnex, it already may be automatically connected.
After connecting the usb cable - verify by ./adb devices
Awesoomee guide! Should be stickied!
Sent from my Galaxy Nexus
Hi.
Thank you for this guide.
I'm getting crazy for a problem: I would like to restore the photos without change the creation date.
I tried everything to copy file, ftp server, shared folder, ADB but the date changes: I have to give up or is there a method to preserve it?
Thank you again.
Bye!
! !
lupoalberto12 said:
Hi.
Thank you for this guide.
I'm getting crazy for a problem: I would like to restore the photos without change the creation date.
I tried everything to copy file, ftp server, shared folder, ADB but the date changes: I have to give up or is there a method to preserve it?
Thank you again.
Bye!
! !
Click to expand...
Click to collapse
I use quickpic gallery to restore date/time file attributes. Quickpic reads exif metadata and updates the file date accordingly.
Sent from my Galaxy Nexus using Tapatalk 2
I know but I would like to use the default gallery .
Thank you.
Bye!
! !
lupoalberto12 said:
I know but I would like to use the default gallery .
Thank you.
Bye!
! !
Click to expand...
Click to collapse
You can. Fixing the date attributes is a one time action, afterwards you can remove quickpic if you like.
Note that I'm not talking albout sort views.
Sent from my Galaxy Nexus using Tapatalk 2
Petrovski80 said:
Note that I'm not talking albout sort views.
Click to expand...
Click to collapse
This is the problem .
Better than nothing .
Thank you.
Bye!
! !
WinSCP
Petrovski80 said:
3) Using an FTP server on your device
Click to expand...
Click to collapse
Thanks, some extra things to note. The ES Explorer FTP server (or perhaps any FTP server) on the Galaxy Nexus is prone to disconnection and may hang if you try to copy the whole folder with a client app like WinSCP.
For WinSCP I found that when doing transfers to enable "Transfer files individually" helps with the reliability.
Related
I noticed that when I use my phone in usb storage mode on a mac, then drag a file from the desktop to the sdcard, a second 4k file is created on the sdcard, which is the same file name but with a period in front like:
._cm_supersonic-07192010-045042.zip
I don't see this when transferring from a pc, anyone know why it does this and if I can delete these files, they make browsing the sdcard in astro messy.
dehelflix said:
I noticed that when I use my phone in usb storage mode on a mac, then drag a file from the desktop to the sdcard, a second 4k file is created on the sdcard, which is the same file name but with a period in front like:
._cm_supersonic-07192010-045042.zip
I don't see this when transferring from a pc, anyone know why it does this and if I can delete these files, they make browsing the sdcard in astro messy.
Click to expand...
Click to collapse
The reason for the ._ (which is actually called AppleDot or DotUnderscore) is because of the File system Mac uses (HFS, HFS+)... and when transferring files from Mac to Windows or Windows file systems (Fat32, Fat, NTFS), the files tend to show up like this, it's a Unix thing which Apple has been using for quite some time.
If you want to get rid of this, you can export the following command. To make it permanent, enter this into your .bash_profile file using a text editor.
At the bottom of the file, enter:
Code:
export COPY_EXTENDED_ATTRIBUTES_DISABLE =true
More information about this:
Disable .DS_store files
AppleSingle & AppleDouble formats
Disable ._ files
Hope that helps.
Info is incorrect/outdated. Check out post #2 in my thread.
I have tried with file manager and found the files i was looking for in android/data/something but when i connect my GN to my PC (win7 32bit) i only get a few folders and files,
I have tested with both USB modes and I only get the basic folders such as
Alarms, Android, DCIM, Downloads, Movies, Music, Notifications, Pictures, Podcasts, Ringtones.
and the file manager reports more folders present :/
also the files i'm trying to access are within the android folder (which is visible on PC) but in filemanager there are 10-20 folders found in android/data that are missing on PC. PC only shows 3 folders in android/data
It also appears to be possible for other users to access the exact same file at the exact same filepath, why can't I?
is there a feature on GN or ICS that makes it impossible to access some files from the PC or is this a bug/flaw?
in case you guys need to know what files i'm trying to access, it's the game files to GTAIII
I kind of have a similar problem.
When i connect my phone to a windows 7 computer it mounts okey and shows me the files. If I create a folder on the phone from windows explorer, unmounts the device, I can not see this folder on the phone via a file manager unless i reboot my phone. This also applies the other way around. If I create a folder on the phone from a file manager, then mount the phone to the computer, I can not see the folder until I reboot my phone.
Is there a fix for this? Is it a bug? How can i resolve this? It's very frustrating.
MTP/PTP doesn't offer all the features the full USB transfer mode has. Search will help you find the pros and cons of this.
Workaround: Use an app like WiFi File Explorer or Airdroid.
I must be doing something wrong. My previous Android phones, I plug into computer via USB and mount it and just drag and drop files. This one you plug it in and gives you the option of MTP and PTP and won't let me move over a lot of types of files. I need to be able to move zips like a ROM over to the phone and it says file type not supported or some such and give me the option to skip or cancel the transfer. So it gives me no option to transfer. What do I need to be doing? Thanks.
There's no USB Mass Storage, the Galaxy Nexus has 1 unpartitioned storage space and requires MTP to transfer. It cannot be mounted or changed to be mountable.
Most issues with transferring via MTP arise with people using improper drivers.
I use an FTP server app on my phone (SwiFTP, but I don't see it in the Play Store atm) and filezilla on my PC. It caan also be done via adb or various apps such as AirDroid.
I forgot I do have Wifi file explorer so I'm uploading that way now.
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.
I have a USB flash drive attached to my Fire Stick TV (2nd Gen). I use it to store movie & music files, which I can play from the Fire Stick using VLC for Android. Works great.
Question: Is there any way that I can access that flash drive via my home network? I would like to be able to copy files to it from my computer. Currently, I have to do it via "sneakernet".
Any advice is much appreciated.
johnnyzero2 said:
I have a USB flash drive attached to my Fire Stick TV (2nd Gen). I use it to store movie & music files, which I can play from the Fire Stick using VLC for Android. Works great.
Question: Is there any way that I can access that flash drive via my home network? I would like to be able to copy files to it from my computer. Currently, I have to do it via "sneakernet".
Any advice is much appreciated.
Click to expand...
Click to collapse
Do "adb connect firestickIP".
adb ls /storage
The USB stick is mounted in /storage (something like /storage/3E91-AF2A). Use "adb push file target-path" to copy files to the USB stick.
Thank you.
I was hoping there might be some way to make the attached flash drive visible/accessible as a standard network share. My goal is to use Windows' File Explorer for file management on that drive, just like the other shared storage devices on my network.
I will try your suggestion of using ADB, although using a command-line interface for file management is not ideal. I found a few different Windows programs that will supposedly provide a File Explorer-like GUI for doing Android file management via ADB (ADB Browser, ADB Explorer, Device File Explorer, etc. ) . Maybe one of those will do the job.
Alternatively, I may try installing a SAMBA server ("LAN Drive") or FTP server ("FTP Server") on the Fire Stick; although neither app has very good reviews.
After trying all this stuff, I will definitely post the results here.
johnnyzero2 said:
Thank you.
I was hoping there might be some way to make the attached flash drive visible/accessible as a standard network share. My goal is to use Windows' File Explorer for file management on that drive, just like the other shared storage devices on my network.
I will try your suggestion of using ADB, although using a command-line interface for file management is not ideal. I found a few different Windows programs that will supposedly provide a File Explorer-like GUI for doing Android file management via ADB (ADB Browser, ADB Explorer, Device File Explorer, etc. ) . Maybe one of those will do the job.
Alternatively, I may try installing a SAMBA server ("LAN Drive") or FTP server ("FTP Server") on the Fire Stick; although neither app has very good reviews.
After trying all this stuff, I will definitely post the results here.
Click to expand...
Click to collapse
Some file managers (Solid Explorer, ES File Explorer) include FTP servers. I don't know if their FTP server provides access to the USB drive, though. There are likely other file managers that also include FTP servers.
dcarvil said:
Some file managers (Solid Explorer, ES File Explorer) include FTP servers. I don't know if their FTP server provides access to the USB drive, though. There are likely other file managers that also include FTP servers.
Click to expand...
Click to collapse
Excellent advice - that will definitely do it for me. Thank you so much.
I wasn't aware that there were Android file managers with a built-in FTP server. I've always used FX File Manager, and it doesn't have that feature.
I tried both ES & Solid, and both worked fine for my purposes. I decided to go with Solid because the UI is slightly better, it allows you to add an FTP Server shortcut to your Android home screen, and it just seemed a little more... solid.. Definitely don't mind paying $1.99 for the full, ad-free version.
Problem solved - thanks again!