The SD card on my old Galaxy SIII smoked… one more sign that it might not last until my Evergreen arrives. I installed an old SD card I had laying around and it mounted, so I plugged the phone into a USB port on my Linux Mint workstation to copy over some music. It just mounted and I dragged some folders across from the PC. Then I realized that I take this behavior for granted. What happens when you plug the Librem 5 into a PC with a USB cable? Does it work this way on Chestnut?
I don’t know wether that works so far but as an easy alternative you could just use SCP to copy data through a wireless SSH session.
Good questions. It has been discussed before.
MTP is what I am used to - but I am not wedded to that particular protocol. You will note that the second link above suggests simply syncing via WiFi.
For my L5, I plan to put music on the µSD card, which means that I could load the card by putting the µSD card in the host computer, loading it up and then moving the µSD card to the L5.
The outstanding question is whether, via the USB interface (as yet unspecified?), the eMMC drive will be exposed in some way.
I suspect that the answer right now is: lower priority but it’s on the radar.
Thanks for finding that. I looked, but I didn’t see it when I started this thread.
I agree about pulling the µSD and SSH, but plugging in the USB is just so damned convenient. I keep forgetting that I I won’t have to plug it in at all if I don’t want to, as it will integrate into my home LAN just like my other Linux boxes.
Still, I can’t wait to see if the local file system is exposed when plugged in via USB.
After some googling I found out that some raspberry Pis (the Zero/A/A+ specifically as those support USB-OTG, which I’ll assume Librem 5 also supports?) has made this possible.
There seems to be some kernel module which makes the device work as a standard USB mass storage device called g_mass_storage, in the example it points directly at a image file though rather than a local filesystem, not sure how to point it to the running filesystem. I found it in this guide, see the bottom about “g_mass_storage”
Once I receive my Librem 5 I could attempt making a simple app for this.
That isn’t safe though, is it? … exposing a local disk as a USB mass storage class device while it is being used by the device itself.
It can be made safe if the device itself is capable of running without using the local disk for the entire period that it is being used by the connected computer e.g. can boot into some kind of RAM-only mode that does not touch the local disk (after booting).
However that isn’t very convenient, hence my suggestion for something like MTP or anything equivalent to that.
Hm, seems like you’re correct.
Was a long time since I used MTP but back then it was not very widely supported so I always avoided it.
But it seems like android has a good reason why it removed USB mass storage support after a while, so maybe it’s not a very good idea after all.
Interesting. When I plugged the Galaxy SIII into Mint the other day, both the phone internal storage and the SD card were exposed to Linux. Of course, the SIII is OLD.
Also interesting… I double-clicked and MP3 file and it opened xplayer, which promptly told me that it did not have an MTP plugin installed. That’s when I realized that I had double-clicked on the phone MP3’s, not the copy I had made on the Mint machine. Xplayer worked fine from the file on Mint, as it wasn’t trying to stream the MP3 across a USB cable.
It ought to be transparent to xplayer (and anything else) if you have the GVFS MTP backend installed and working. However there are a lot of moving parts e.g. whether the phone identifies itself as having, among other things, an MTP USB device class e.g. whether Mint recognized that correctly e.g. how Mint chose to handle that.
By default, you get a network device and a emulated serial port when connecting the Librem 5 to a PC via USB - so you can use tools like scp, rsync etc.
That’s however just the default; you can reconfigure the usb gadget to export the SD card directly as a mass storage device just fine. Of course it then needs to be unmounted locally for the time of being exported.
Technically there’s also nothing to stop you from implementing MTP mode, but I have no idea how easy would that be and if there’s some existing prior art already.
Which, in the case of the eMMC drive, is why we were ruminating about MTP (or other equivalent protocols).