Android 9 connection failure

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
chrispop99
Global Moderator
Posts: 3419
Joined: Tue Jan 27, 2009 2:07 pm

Android 9 connection failure

#1 Post by chrispop99 »

It has always been easy to connect Android-based phones to MX Linux by changing the connection mode of the phone to MTP (Media Transfer Protocol) mode. The phone then appears as a drive in Thunar. The method is detailed in the manual.

This has changed with the introduction of Android 9 'Pie', as there is no MTP mode available. It has been replaced by 'File Transfer', but that does not work out of the box in Linux. Connecting the phone via USB, swiping down, then selecting File Transfer creates an icon together with the spinning 'mounting' wheel in Thunar, but nothing else happens. Eventually, Thunar locks up, needing to be killed to regain control.

This is an Android problem, possibly related to permissions, and can be overcome in the following way. (Note that various phone makers customise Android in different ways, and the method described is the most generic I could devise from information online.)

It is necessary to put the phone in Developer mode. To do this, open Settings and search for 'Build Number'. Once found, tap Build Number several times, and a countdown will begin. Once the correct number of taps is made, you will be asked for credentials - PIN, or pattern lock. The phone will now be in Developer mode, giving access to additional settings. Note that changing some of these settings may give undesired results, so don't change anything you don't understand. It is not necessary to make any Settings changes to connect to Thunar; just changing to Developer mode will enable this.

Connecting the phone, swiping down to change the USB mode, then selecting File Transfer should now work correctly, enabling files on the phone to be browsed from Thunar.

The phone can be left in Developer mode if desired. Otherwise, go to Settings and search for 'developer'. At the top is a toggle to turn Developer Mode back off.

Even with Developer Mode off, the phone will now connect correctly to Thunar, both on the original Linux machine used, or on others.

This was tested using MX Linux 18, and a Motorola Moto(g6) with Android build number PPS29.55-24.

phone.jpg

Chris
You do not have the required permissions to view the files attached to this post.
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
Artim
Posts: 349
Joined: Sun Apr 01, 2018 9:04 am

Re: Android 9 connection failure

#2 Post by Artim »

Wonderful! Thanks so much!

User avatar
duane
Posts: 275
Joined: Sun May 20, 2007 3:08 pm

Re: Android 9 connection failure

#3 Post by duane »

One of the nicest things about this forum is when someone finds a solution like this and shares it.
Bravo!
Lenovo M92p Quad Core i5 3470 3.2Ghz

LinnitXa
Posts: 80
Joined: Tue Mar 24, 2020 1:07 pm

Re: Android 9 connection failure

#4 Post by LinnitXa »

Thanks from me too! Reading the work-arounds in the previous posts were freaking me out big time, then I found this - so simple!

User avatar
dreamer
Posts: 958
Joined: Sun Oct 15, 2017 11:34 am

Re: Android 9 connection failure

#5 Post by dreamer »

chrispop99 wrote: Wed Jul 03, 2019 3:15 am This is an Android problem, possibly related to permissions, and can be overcome in the following way. (Note that various phone makers customise Android in different ways, and the method described is the most generic I could devise from information online.)

It is necessary to put the phone in Developer mode. To do this, open Settings and search for 'Build Number'. Once found, tap Build Number several times, and a countdown will begin. Once the correct number of taps is made, you will be asked for credentials - PIN, or pattern lock. The phone will now be in Developer mode, giving access to additional settings. Note that changing some of these settings may give undesired results, so don't change anything you don't understand. It is not necessary to make any Settings changes to connect to Thunar; just changing to Developer mode will enable this.

Connecting the phone, swiping down to change the USB mode, then selecting File Transfer should now work correctly, enabling files on the phone to be browsed from Thunar.
Thanks @chrispop99 ! I tested this with MX 17/18 and it works! It works both with File Transfer mode and with USB Internet Tethering mode (but not at the same time). The thing I might add is that it seems necessary to reboot the phone because first time I tried it didn't work. The phone uses vanilla Android 11.

This was a very nice find. It gives access to both internal storage and SD card. Maybe Warpinator is an option if you have access to WiFi.
Note to self and others: SysVinit is a good option. However if you run into problems try with systemd first. This applies to AppImages, Flatpaks, GitHub packages and even some Debian packages.

Post Reply

Return to “Tips & Tricks by users (not for help)”