The following guide is tested for Archlinux, and is not guaranteed to work on other distributions.

Steps

  1. Install android-file-transfer
  2. Prepare an empty directory, e.g. /mnt/android/
  3. Attach the Android phone to the linux machine
  4. Switch to USB file transfer mode when prompted on Android
  5. Mount:
    aft-mtp-mount /mnt/android

Unmount using umount /mnt/android or fusermount -u /mnt/android