You are not logged in.

#1 2018-05-29 21:27:11

dbickin
Member
Registered: 2015-09-30
Posts: 76

Android file transfer problem

I have been able to move files to and from my phone using jmtp.

However, I now have a file that I could move TO the phone, but I can't bring it BACK. It is a 900MB+ media file. The file plays correctly on the phone.

When I try to move the file I get an input/output error saying it can't stat the file. At that point, jmtp seems to crash, and I have to try to unmount and if I am lucky, I can call jmtpfs again to remount the phone.

I am guessing it may have to do with the size of the file. Whatever I try to do to the file from the bunsen side of the wire tries read the entire file, (at least the hard drive thrashes and thrashes until the command fails.)

Any ideas what I can do to copy the file?

Is there anything on the Android side that can split the file in to smaller parts? (Without a command line, I have no idea how to do anything really useful on the phone.)

Thanks,
David

Offline

#2 2018-05-30 03:20:25

tynman
Member
Registered: 2015-10-13
Posts: 93

Re: Android file transfer problem

2 questions.

  1. What actual command were you running to move the file?

  2. What was the exact error returned?

"stat" is program which is used by utilities to get basic information about a file. You can call it from a shell.

> stat ~/my-file

The most common reason it fails is if the file doesn't exist. So you may be supplying a mis-spelled file name or path. ??

Offline

#3 2018-05-30 03:24:26

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Android file transfer problem

dbickin wrote:

At that point, jmtp seems to crash

what makes you say that?

maybe you experience this: https://wiki.archlinux.org/index.php/MT … rst_access

PS: unmounting happens with

fusermount -u $mountpoint

Offline

#4 2018-05-30 19:55:34

dbickin
Member
Registered: 2015-09-30
Posts: 76

Re: Android file transfer problem

I have tried many different commands; they all fail.

if I cd to the directory containing the file, then issue:

mv 'name of file' dest-dir/

After my hard rive churns for a bit (evidenced by drive light flashing and sounds of the disk head moving), I get back:

mv: cannot open ‘name of file’ for reading: Input/output error

I used filename tab completion so the 'name of file' above should be correctly escaped and all of that.

All the other files I have tried I have been able to mv, cp, etc. without any errors.

Perhaps crash is not the correct word.
After getting that error message any command against the mtp link fails:

~/DATA/USB/mtp/Internal storage/Movies/TV$ ls
ls: reading directory .: Input/output error

I generally have to unmount then remount to get back in to the phone's files. Sometimes that doesn't work, and multiple unmounts before the remount works. Sometimes I have to unplug the cable, then plug it back in, then unmount then remount.

Thanks,
David

Offline

#5 2018-05-30 23:46:43

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,674
Website

Re: Android file transfer problem

Just a thought - can you read the file from the computer? If so, can you copy it back? Then, maybe you can open your phone and delete it via android's interface?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Online

#6 2018-05-31 00:39:36

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,901

Re: Android file transfer problem

Try unlocking your phone then mount it. Sometimes you have to keep the phone unlocked to connect.


Real Men Use Linux

Offline

#7 2018-05-31 02:31:51

dbickin
Member
Registered: 2015-09-30
Posts: 76

Re: Android file transfer problem

johnraff wrote:

Just a thought - can you read the file from the computer? If so, can you copy it back? Then, maybe you can open your phone and delete it via android's interface?

No, ANYTHING I have tried to do to this file from the computer eventually fails, with the subsequent inability to do anything to anything on the phone until I successfully can unmount and remount. (Mind you, I haven't tried deleting it yet, since I don't know of any way to undelete it, and I would like to keep a copy of the file.)

DeepDayze wrote:

Try unlocking your phone then mount it. Sometimes you have to keep the phone unlocked to connect.

Sorry for the stupid question, but what EXACTLY do you mean by "unlocking"? I generally have to enter my pin so the phone screen is visible. That is what I would call "unlocking." And yes, I have to do that to tell the phone that it is okay to make the connection.

That works and it stays connected even after the phone screen has gone black again.

My only problem is with this ONE file. I was able to copy the file to the phone, and the phone can play the file with no problem, but something goes wrong trying to read/copy/move/whatever just this one file from the computer.

Thanks,
David

Offline

#8 2018-05-31 03:24:09

dbickin
Member
Registered: 2015-09-30
Posts: 76

Re: Android file transfer problem

Well, two things (1) I solved my "problem". The "solution" was to plug the phone in to an old laptop running Vista. It mounted and let me copy the file to a thumb drive, which I could then mount and move the file on to my computer.

But then (2) I found that my boot partition is critically low on space. Certainly less than the 900MB of the file. Maybe the real error was the lack of enough temp space?

And why do I suddenly have no free disk space?
I recall when I installed, Bunsen only used about 4GB of the 8GB drive. It is now using just over 7GB. (Of which, only 700MB is in my home directory.)

David

Offline

#9 2018-05-31 06:09:48

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Android file transfer problem

dbickin wrote:

And why do I suddenly have no free disk space?

8GiB is not a lot of space for an operating system, we actually recommend 10GiB for BunsenLabs.

You could try ncdu, I find that useful when clearing out space.

Offline

#10 2018-05-31 08:01:04

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,674
Website

Re: Android file transfer problem

Head_on_a_Stick wrote:

You could try ncdu...

Yes! That's the one I was racking my brains to remember. Cheers!


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Online

Board footer

Powered by FluxBB