Page 1 of 1

Android 9 connection failure

Posted: Wed Jul 03, 2019 3:15 am
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

Re: Android 9 connection failure

Posted: Wed Jul 03, 2019 4:36 am
by Artim
Wonderful! Thanks so much!

Re: Android 9 connection failure

Posted: Thu Jul 04, 2019 1:23 pm
by duane
One of the nicest things about this forum is when someone finds a solution like this and shares it.
Bravo!

Re: Android 9 connection failure

Posted: Tue Jun 09, 2020 2:53 pm
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!

Re: Android 9 connection failure

Posted: Sun Jul 04, 2021 12:31 pm
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.