[Hampshire] How to connect Android phone to Debian system
I have a computer running Debian 11 and a new phone with Android 13. How do I access the Android file system from the computer via USB? A web search suggests MTP, but I have not been able to get that to work. I can use tethering via USB, so there is nothing wrong the connection. I have go-mtpfs, lib-mtp-common, lib-mtp-runtime and libmtp9 installed. If I plug in the phone it is recognised as a Portable Media Player, moto g23, but selecting "Browse Files with File Manager" just gives a small window with the title "Er..ec ?" containing a red dialog box with a large X, the text /moto 23, and an OK button. Selecting "View Photos with File Manager" produces a similar small window except the title is "Erro...Exec ?" and the text is "Unknown error Bad Parameters" Any ideas? Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
[Hampshire] How to connect Android phone to Debian system
Adam John Trickett said: > I gather it depends on the generation of the phone and what the > vendor felt like. The phone is is new - first appeared in January this year, I understand. I have not yet tried copying files via a library computer - wasn't taking the phone anywhere until I had a screen protector, which I have now got. It does seem a bit odd to have to use a Windows machine to copy files between two linux-based systems. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
Hi Peter I found this a while ago https://tomsalmon.eu/2020/01/mounting-android-phone-over-usb-on-debian/ Not sure how relevant it is now a days Tim H On 27/04/2023 12:38, Peter Alefounder via Hampshire wrote: I have a computer running Debian 11 and a new phone with Android 13. How do I access the Android file system from the computer via USB? A web search suggests MTP, but I have not been able to get that to work. I can use tethering via USB, so there is nothing wrong the connection. I have go-mtpfs, lib-mtp-common, lib-mtp-runtime and libmtp9 installed. If I plug in the phone it is recognised as a Portable Media Player, moto g23, but selecting "Browse Files with File Manager" just gives a small window with the title "Er..ec ?" containing a red dialog box with a large X, the text /moto 23, and an OK button. Selecting "View Photos with File Manager" produces a similar small window except the title is "Erro...Exec ?" and the text is "Unknown error Bad Parameters" Any ideas? Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
Tim said: > I found this a while ago > > https://tomsalmon.eu/2020/01/mounting-android-phone-over-usb-on-debian/ > > Not sure how relevant it is now a days Thanks Tim. That didn't work, but the CLI did provide a possibly more informative error message: error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device terminate called after throwing an instance of 'MtpErrorCantOpenDevice' what(): Can't open device The phone itself has instructions for file transfer with Windows and Mac computers, but not Linux. As Android is based on Linux, that seems a little odd to me. I have found a way to contact the manufacturer, Motorola. Maybe they can solve the problem. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
Hi Peter, Don't want to keep throwing links at you but I had two saved when I was playing with Debian on my other laptop. The other link I had was this one https://www.reddit.com/r/debian/comments/n2skx6/connecting_android_phone/ I never completed getting mine to work as I ended up replacing the hard drive and re-installed a different (debian based) distro Hope it helps Tim H On 29/04/2023 17:02, Peter Alefounder via Hampshire wrote: Tim said: I found this a while ago https://tomsalmon.eu/2020/01/mounting-android-phone-over-usb-on-debian/ Not sure how relevant it is now a days Thanks Tim. That didn't work, but the CLI did provide a possibly more informative error message: error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device terminate called after throwing an instance of 'MtpErrorCantOpenDevice' what(): Can't open device The phone itself has instructions for file transfer with Windows and Mac computers, but not Linux. As Android is based on Linux, that seems a little odd to me. I have found a way to contact the manufacturer, Motorola. Maybe they can solve the problem. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
On Sat, 29 Apr 2023 at 17:03, Peter Alefounder via Hampshire < hampshire@mailman.lug.org.uk> wrote: > Tim said: > > I found this a while ago > > > > https://tomsalmon.eu/2020/01/mounting-android-phone-over-usb-on-debian/ > > > > Not sure how relevant it is now a days > > Thanks Tim. That didn't work, but the CLI did provide a possibly more > informative error message: > > error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to > initialize device > terminate called after throwing an instance of 'MtpErrorCantOpenDevice' > what(): Can't open device > > The phone itself has instructions for file transfer with Windows and Mac > computers, but not Linux. As Android is based on Linux, that seems a > little odd to me. > > I have found a way to contact the manufacturer, Motorola. Maybe they can > solve the problem. > > Peter Alefounder. > > Hi, I have a Samsung S7 Android phone and ubuntu. When I plug the phone into the usb port, the phone asks "Allow access to phone data". Deny / Allow If you tap "Allow", the phone will appear as an MTP device in the GUI manager. It looks like a USB disk has been plugged in. You can then use the filemanager to copy files about. The MTP does not appear as a mount if you type "mount". If I click on the "properties" in the file manager, I find that I can copy stuff about by using something like: rsync -avpP "/run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_3300f4501b3f7353/" mtp-mum With the hex chars at the end being taken from the properties in file manager. For me the hex chars happened to be the serial number of the phone. (note I randomly typed some hex chars here.So its not my actual phone.) Kind Regards James -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
Tim said: > https://www.reddit.com/r/debian/comments/n2skx6/connecting_android_phone/ No help there, I'm afraid. James Dutton said: > When I plug the phone into the usb port, the phone asks "Allow access to > phone data". > Deny / Allow Something like that is mentioned on the web. My phone doesn't do that. I have a reply from Motorola. They say: > There is no particular process for transferring files via linux, as for > compatibility purposes the phone reports itself as a standard USB drive to > all > operating systems. The fact that your OS is giving you MTP related panics > shows > that the phone's USB mode selection is working, and that the issue lays with > your operating system. > > I would advise troubleshooting your Debian installation. However, > unfortunately > we cannot offer any assistance with this. I wish you the best of luck! It may be that I will have to take the phone and the files on a memory stick to a public library and use a Windows computer there. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
On Mon, 1 May 2023, at 13:02, Peter Alefounder via Hampshire wrote: > It may be that I will have to take the phone and the files on a memory > stick to a public library and use a Windows computer there. If the goal is to get some files on or off the phone, there are also options to transfer files over the air rather than through a USB connection. I've tried Warpinator: https://flathub.org/en-GB/apps/org.x.Warpinator https://play.google.com/store/apps/details?id=slowscript.warpinator And Warp + Wormhole: GUI: https://flathub.org/en-GB/apps/app.drey.Warp CLI: https://magic-wormhole.readthedocs.io/en/latest/welcome.html Android: https://play.google.com/store/apps/details?id=eu.heili.wormhole Warpinator needs to be running on both ends and discover itself before you can send files. Wormhole lets you share and then launch the receiver, but the Android app only seems to be able to send one file at a time. If the files are small enough and you already have an account, the low effort way is probably to put them in Google Drive, Dropbox or OneDrive, and download them at the other end. XKCD hit the nail on the head, as always: https://xkcd.com/949/ Best wishes, Thomas -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
Thomas Kluyver said: > Warpinator needs to be running on both ends and discover itself > before you can send files. Wormhole lets you share and then launch > the receiver, but the Android app only seems to be able to send one > file at a time. This might be possible with a laptop, but my main computer does not have WiFi. > If the files are small enough and you already have an account, the > low effort way is probably to put them in Google Drive, Dropbox or > OneDrive, and download them at the other end. I considered Dropbox, but have around 30GB in over 800 files. The quickest and easiest method appears to be the library computer. I would like an ordinary GUI as I get for a memory stick. Maybe this will be possible sometime. It appears that there is an 'Android File Transfer for Linux' app, but the computer counterpart is for Ubuntu. There is no guarantee that would work anyway. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
On Thursday 27 April 2023 13:38:19 CEST Peter Alefounder via Hampshire wrote: > I have a computer running Debian 11 and a new phone with Android > 13. How do I access the Android file system from the computer via > USB? A web search suggests MTP, but I have not been able to get > that to work. I can use tethering via USB, so there is nothing > wrong the connection. I gather it depends on the generation of the phone and what the vendor felt like. It's very hit and miss. The KDE Connect never worked with a work Samsung phone I had, nor did a USB cable. My more basic Moto G5 and my current Moto G82 both connect with the KDE Connect app, but it's not 100% reliable. The USB connection also worked on both of them out of the box... (sorry for being a bit late to reply) > I have go-mtpfs, lib-mtp-common, lib-mtp-runtime and libmtp9 > installed. > > If I plug in the phone it is recognised as a Portable Media Player, > moto g23, but selecting "Browse Files with File Manager" just gives > a small window with the title "Er..ec ?" containing a red dialog > box with a large X, the text /moto 23, and an OK button. > > Selecting "View Photos with File Manager" produces a similar small > window except the title is "Erro...Exec ?" and the text is "Unknown > error Bad Parameters" -- Adam Trickett Saint-Malo, Bretagne, France Like dreams, statistics are a form of wish fulfilment. -- Jean Baudrillard -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
According to Debian article (https://wiki.debian.org/mtp) 1.1.18 libmtp is required to access Moto G phones, while current package in all Debian releases is 1.1.17-3 - this might be source of your problems. I have used many Android phones on Ubuntu/Debian + GNOME in mtp mode, and almost for sure Moto Gx was one of them, however recently I have always been using GVFS for that purpose. As per copying data, most Android phones supports OTG memory, so you should be able to plug in Flash Memory or USB Hard Drive and copy data directly (some USB sticks provides dual USB-C/USB-A connectivity, like this example https://www.amazon.co.uk/SanDisk-Ultra-Type-C-Flash-Drive/dp/B01EZ0X55C/ , if not USB-OTG adapter can be used) Regards, Artur On 20/05/2023 17:11, Peter Alefounder via Hampshire wrote: Adam John Trickett said: I gather it depends on the generation of the phone and what the vendor felt like. The phone is is new - first appeared in January this year, I understand. I have not yet tried copying files via a library computer - wasn't taking the phone anywhere until I had a screen protector, which I have now got. It does seem a bit odd to have to use a Windows machine to copy files between two linux-based systems. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
On Tue, 23 May 2023 at 12:50, Artur Łądka via Hampshire < hampshire@mailman.lug.org.uk> wrote: > According to Debian article (https://wiki.debian.org/mtp) 1.1.18 libmtp > is required to access Moto G phones, while current package in all Debian > releases is 1.1.17-3 - this might be source of your problems. > > I have used many Android phones on Ubuntu/Debian + GNOME in mtp mode, > and almost for sure Moto Gx was one of them, however recently I have > always been using GVFS for that purpose. > > > I have Ubuntu-jammy, libmtp 1.1.19 Ubuntu-lunar, libmtp 1.1.20 So, this might explain why Ubuntu MTP works for me, but Debian does not work for you, due to older libmtp versions. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] How to connect Android phone to Debian system
James Dutton said: > On Tue, 23 May 2023 at 12:50, Artur ??dka via Hampshire < > hampshire@mailman.lug.org.uk> wrote: > > > According to Debian article (https://wiki.debian.org/mtp) 1.1.18 libmtp > > is required to access Moto G phones, while current package in all Debian > > releases is 1.1.17-3 - this might be source of your problems. > > > > I have used many Android phones on Ubuntu/Debian + GNOME in mtp mode, > > and almost for sure Moto Gx was one of them, however recently I have > > always been using GVFS for that purpose. > > > > > > > I have > Ubuntu-jammy, libmtp 1.1.19 > Ubuntu-lunar, libmtp 1.1.20 > > So, this might explain why Ubuntu MTP works for me, but Debian does not > work for you, due to older libmtp versions. I can confirm that I have libmtp 1.1.17-3. I agree, this looks like why it doesn't work. Thank you, James and Artur. Peter Alefounder. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --