[ale] Android -> Linux file transfer

DJPfulio at jdpfu.com DJPfulio at jdpfu.com
Wed Mar 29 18:36:31 EDT 2023


On 3/29/23 14:50, Boris Borisov via Ale wrote:
> I have trouble with newer Android device. In the past when you
> connect your phone to PC Android was asking you do you want me to act
> as mass storage device or P2P serial transfer if I'm not mistaken.
> 
> Now newer Android says file transfer and pictures transfer which I
> assume is different naming for same things. But I couldn't get Linux
> to see phone as storage device.
> 
> Any suggestions.

I just looked at this yesterday because the microSD card in my phone had a corrupted partition table. Was unable to get it working, so started over. Previously, I'd connect, allow USB access, and the MTP device would show up in a file manager on Linux for drag-n-drop stuff.

Seems Google wants everyone to use g-cloudy for everything now.

PTP seems to be for photos only.
MTP is for general USB access.

Changing the USB cable seemed from a charging-only cable to a charging+data cable worked.
In the USB-Preferences everything was grayed out before.  Changing the cable didn't fix it immediately.  Don't know why not.  Took fiddling with it for 15 minutes to get transfers enabled (Android 11) at all. The device showed up in dmesg, but nowhere else. I tried on 2 different systems. Both saw the phone correctly, but never in any file manager or with mtp-detect.

After all the frustration, I gave up and switched to methods I know work.

I use **nextcloud** to transfer files over and that works.

To push files off Android, I use **Ghost Commander** with an sftp connection into a Linux system. That always works.

For really large transfers, I simply pull the microSD card and directly connect it to the computer as USB storage. Use an rsync script to update specific music files. That works.

Did learn some things about my phone, Moto Power 2020.  Seems it only accepts exFAT on MSDOS partitions. GPT isn't supported.  I tried with GPT and it refused to accept the microSD card with a GPT partition table.  In the end, I let the phone format the card for use as portable storage. There was a choice to format it as extended internal storage too. By that point, I just wanted everything done.

I was careful to always properly "eject" the external microSD each time, so that was never involved with the corruption.  The SD card might have used 20 write cycles.  I push music over ... perhaps once a year. Most access to the external SD is read.


More information about the Ale mailing list