Fairphone 2 and Linux [resolved]

Hello,

I’ve got Debian 8 on my laptotp and I can’t see it with Nautilus when I connect my Fairphone 2. In fact, only lsusb returns something, when I’m root, blkid returns nothing but my hard disk partitions. I added a rule in /etc/udev/rules.d for the Fairphone, but still nothing happens.

Can anyone help me ?

Thanks a lot and kind regards,

Daniel

@anon59030904 I’d suggest plugging the phone in USB, then post here the output of dmesg, so we can see what happens.
Might sound basic, but I guess you did activate USB storage on the phone (don’t have the FP2 yet, but its usually asked by the phone while you plug it).

1 Like

Have you installed the libmtp package? Probably if it has worked with another phone earlier.
Don’t use nautilus myself. Maybe you could try the gMTP frontend for libmtp? Must be run as root (or sudoed) and it can take some time until the phone is recognised, but it works with my fp1.

1 Like

blkid will only work for devices that export themself as block device. The default operational mode for Fairphone is to use MTP. Personally I always enable debugging and use adb to copy files.

2 Likes

@keesj Default is to use MTP, but can’t you configure it for UMS ? (regular USB Mass Storage, like a usb drive). It should be easier to mount in this mode, like a regular USB stick.
Yes there are many ways to access the files, adb is one of them, on my side I like to use a samba server and mount it over wifi. Matter of taste !

Thanks for your answers !

For the USB debugging mode, I had it first. But as I wanted to deactivate Google Apps to be a little more unworried while waiting to be able to flash it to Fairphone OS, I had a lot of bugs and had to do three hard reset and let my phone off the whole night so it could work as fine as when I put it on for the first time.

Now this option doesn’t appear any more. So, do you think it is possible to configure it to UMS ?
By the way, this is what happens when i try dmesg:

Nowadays it is common that you can only use MTP to acces your smartphone.
I do not own an FF2, but i use Debian, so i searched for the mtp-related packages i have installed (MTP with my jolla works):
libmtp-common libmtp-runtime libmtp9 mtp-tools
Give it a try, hope this will work for you :slight_smile:

your dmesg show that it was correctly recognized as UMS (USB Mass Storage device detected)
does it appear somewhere in /dev ? did you try to manually mount it ?

Hello @spartid. About Mass storage:

The USB mass storage mode exports a device at block level (e.g. blocks of data). When exporting this way it is the host operating system who need to properly keep the meta-data in place.

In the good old days a separate partition was created that wat FAT formatted. It was FAT formatted to allow windows PC to access the device directly. Because access level is on such a low level (block level) it is only possible for one operating system to access the files at a given time (e.g. if you put your device is mass storage mode, the device itself is now longer allowed to write data to the partition). This partition (often called “SDCARD” because it sometimes indeed was an SD card) was separate from the other partition where the operating system resides or applications gets installed. This partition (because of the FAT formatting) also did not have proper permissions. All application where able to access all the data).

Forward a few year(s): People where not happy that they needed to choose beforehand how big their “sdcard” needed to be and how much space they wanted to keep for applications.

The current solution uses a single partition for data and “sdcard” by emulating the FAT “premissions system” on a certain directory. As a result of that (the “SDCARD”) is no longer a separate partition and can therefore not be exported as such. The good news is that we no longer need to specify the size of the SDCARD beforehand. The bad news is that we need to use MTP or ADB to access the files

it is not possible to export the internal SDCARD as mass storage. If you really want to access your device using the USB mass storage protocol you need to insert an additional real sdcard and use that.

3 Likes

Thanks for your reply.
I also use Linux (Debian) and if I understood your answer, if I format my SDCARD as Ext4, my system will still see it as FAT ?

I personally also like to use the Samba server app, which allows me to mount my phone filesystem wirelessly over wifi. Convenient for low volume transfers.

I sometimes use Share via HTTP from the f-droid repository when I want to quickly ad-hoc share some data

https://f-droid.org/repository/browse/?fdfilter=share+via+http&fdid=com.MarcosDiez.shareviahttp

2 Likes

Hey !

@jaymanu, my phone didn’t appear in /dev, so it was just impossible to mount if just like that. But @DLQ, MTP packages where already installed and that’s what made me crazy, because if everything was right, why could’nt it just work ?

But today I’ve found the solution ! Just in case, you plug your phone, and on it you search for the storage options. There, just on the right of the search option, you see the three little points for “More options”, whichs leads to a menu for connecting your phone to the computer. There you can choose MTP, PTP, UMS if you want to, and that’s it !

Thanks a lot,

Daniel

2 Likes

My phone was recognized as camera by PTP, but so I only had access to my pictures.
MTP did not work.
I had the same problem and tried:
mpt-detect
just realise, that it was not installed.
So I did:
sudo apt-get install mtp-tools
And still the device was not detected.
So I googled more and followed this advice:
http://askubuntu.com/questions/463015/ubuntu-14-04-and-android-cant-see-phone-on-my-computer
and tried:
sudo apt-get install mtpfs
But still it was not recognized.
Finally I just used a different USB port on my PC ! and working = recognised directly !
:smile:

2 Likes

Thanks for this hint - for me, this solved the issue :wink:

Edit: It is indeed a combination of the installed mtpfs and a specific USB port for me as well. I will have a look at it later but for now it works on a USB port of my laptop but not on the ones which are on my docking station…

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.