• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help [SOLVED]Samsung Galaxy Nexus 4G: FILE COPY to phone not working, help !

hallansing

Lurker
Mar 15, 2014
4
0
Samsung Galaxy Nexus 4G: FILE COPY to phone not working, help ! Setup:
- stock Samsung Galaxy Nexus 4G phone / Android 4.2.2 / not rooted or JB
- Linux 64 bit, MTP/USB connection to phone

I can mount my phone to Linux,
I can see all folders on my phone from linux,
I can create new folders,

but if I try to copy any files to any folders they don't copy, no errors show up,
no files show up in target folders

example:
- connect phone to computer using USB/MTP
- mount Android phone in linux
- on Android phone create new folder called /MyFolder
- phone is on home screen, screen unlocked
- try to copy any file from linux to /MyFolder
- no error show up during copy
- open /MyFolder, nothing, no file, empty folder

can somebody help here ?
thanks.

ps.
the only files I can copy is music mp3 files and only to /Music folder,
if I try to copy music files into any other folders, they automatically copy
to music folder instead, first time I see such strange behavior, as if android
automatically identifies file type on the fly while copying and redirects it
to music folder ...
 
Hi there and welcome to the site :hello:

Hmm, this is a strange problem, if you are creating the folders on your virtual sdcard (as with a windows box that is all you access with the MTP protocol) it should already be mounted read/write. However, I have only used windows to copy files to my sdcard on my Gnex. I wonder if you go ahead and use the adb shell and regular linux commands to perform your actions if it would work better.

I'll keep an eye out to see if you get some help, and if not by tomorrow I'll see if I can't send some of my colleagues this way.

good luck

p.s. I'm having your duplicate thread removed in the all things root section so that your discussion can remain in one thread, besides your phone isn't rooted.
 
Upvote 0
Hello hallansing!
I wish I could chime in and give some advice here, but I'm clueless when it comes to Linux.
But, let me ask this (and I could be way off base, but perhaps it may bring up more ideas), but when the sd card on the device is mounted to the computer, doesn't the computer "take over" the card? As in, you cannot use the phone to make changes to the sd card, you can only use the computer?
Does that make sense?

If not, Ima just gonna be-bop on outta here and watch from the sidelines :)
 
  • Like
Reactions: tube517
Upvote 0
Yes, that's what I'm saying, strange problems.

It does not matter if I copy from linux shell or from linux file manager ( Nautilus in my case ).

example ( mount point is /media/Android ):
cp -v whatever.mp3 /media/Android/MyFolder

instead the mp3 file goes into /Music folder and not MyFolder
what the heck ...?

next test
copy test.txt file to /Download folder on android
cp command returns no errors but the test.txt file does not show up in /Downloads
where the heck did the file go ???

I'm getting to think that Google Little Brother wants to block any file copy to my phone...

next I'm going to try to use AirDroid:
dropped test.txt from linux file manager to airdroid file webpage,
file shows up as there on webpage, but when I go look at it thru file manager,
nothing there, looked under Downloads app in android - nothing there...
so no success...
what the heck is going on here ?


need some help here...
 
Upvote 0
I am like Mikestony as I said, but I do see one little thing that stands out to me.

The sdcard mount point on the Gnex is /data/media/.

That points you to the root of the sdcard. And that is since you say you're not on JB, if you were it would be /data/media/0/.

So try doing your copying using that path as the sdcard root.

good luck
 
Upvote 0
Well, good news, I found the solution, but I'm seriously pissed off at Google for creating the problem.

Did some more digging on the web, found a procedure to enable USB DEBUGGING
which then turns on "allow file copy operations in usb mode", otherwise file copy is restricted by
default.

SOLUTION:
USB Debugging Mode - Galaxy Nexus by Samsung

From a home screen, select Apps ( Apps icon located at the bottom).
From the APPS tab, select Settings.
From the SYSTEM section, select Developer options.
Note If not available, select About phone then select Build number seven times to unhide the option.
Ensure the Developer options switch ( On / Off switch located in the upper-right) is enabled (On).
Note If presented 'Allow development settings?', select OK.
From the DEBUGGING section, select USB debugging.
Note Enabled when a check mark Check mark icon is present.
If presented 'Allow USB debugging?', select OK.

Basically I did it like this in my case:
phone -> Settings -> tap About phone -> tap Build number -> tap "BUILD NUMBER" 7 times ->
debugging enable message show up -> go back to Settings -> Developer Options show up just above About phone -> tap on Developer Options -> tap USB debugging -> message shows up:
USB debugging ... blah blah, USE IT TO COPY DATA BETWEEN COMPUTER AND YOUR DEVICE ... blah blah -> tap OK -> connect android to computer -> mount android -> create folder and verity the copy file is working

solved...
Again, thank you ( f... k you ) Google for making it harder to find this option burred deep into
some obscure f..king setting... wasted 3 f..king days on this little tweak ...

Thanks all for trying to help ! Good forum, fast replay, best regards to all.
 
Upvote 0
ps.
just wanted to add that MTP file operations are spotty at best,
expect some fail file operations, sometimes files/folders don't copy, delete...
The problem is basically that Google decided to restrict file operations
over USB between your PC and Android phone/tablet for reason that
user may inadvertently delete or copy systems files on Android.
So google basically limited which files could be copied and to which folders.
MTP ( media transfer protocol ) only allows media type files transfer over USB,
such as music files, movie files, playlists, pictures, pdfs, ringtones
and they devises a non block way to transfer them, which created reliability
problems...

+ If files operations don't work at all then I found what helped was this:
- unmount Android in linux
- android -> settings -> developer options -> toggle Developer options off and then back on ->
enable USB debugging and Stay awake -> get out of settings
( sometimes android gets stuck )
- mount Android in linux
- try file transfer


I red up on it here:

Media Transfer Protocol - Wikipedia, the free encyclopedia

Wubble : Native gvfs backend for MTP devices

there are several LINUX implementations:
https://wiki.archlinux.org/index.php/MTP

I implemented MTPFS, which is the first on in the list.
Like I said the problems are:
- need to constantly refresh file manager in linux to see if file copied
- sometimes folders and files don't delete
- sometimes files don't copy

To make sure files are copied, open any file manager in Android and verify that
files are actually there...

for instance mp3 files only copy to /Music folder
if you try to copy mp3 files into any other folder the android will automatically
transfer them into /Music folder, what the f...?

.nomedia file placed in custom folder - does not work...
looks like MTP method basically identifies type of file being copied on the fly and
does not allow it to be copied to custom folders...

AirDroid or SSHDroid file transfer methods did not work better for me...
that tells me it's all about mtp protocol

That's sort of micro management on behalf of Google, makes it harder on the user.
It's a mess...

Regards.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones