Connect Android Phone to Arch Linux

28/12/2020
Chưa phân loại

How to Connect Android Phone to Arch Linux

By default, Android Phone support is not enabled on Arch Linux.

In this article, I will show you how to enable Android Phone support on Arch Linux and connect your Android Phone for File Transfer on Arch Linux. Let’s get started.

First you have to do a full system upgrade. I once didn’t do it and some packages refused to install due to dependency issues. If you’re an Arch user, I think it’s a best idea to do a full system upgrade before you try this process.

You can run the following command to do a full system upgrade of your Arch machine:

$ sudo pacman -Syu

As you can see, my Arch machine is fully upgraded.

Some packages we need are not available in the official package repository of Arch Linux, but are available in the AUR (Arch User Repository). This is why we need Git version control system to clone the files of AUR package repository.

You can run the following command to install Git:

$ sudo pacman -S git

Press ‘y’ and then press <Enter> to continue.

Git should be installed.

You can run the following command to check whether Git is working.

$ git –version

As you can see Git is installed and working perfectly.

You access Android File System using MTP protocol. It is not installed on Arch Linux by default.

You can enable MTP support by install mtpfs Arch package.

You can install mtpfs by running the following command:

$ sudo pacman -S mtpfs

Now press ‘y’ and then press <Enter> to continue.

mtpfs package should be installed.

Due to some changes in the Android 4+ devices, mtpfs sometimes is not enough to provide MTP support for Arch Linux. So you should also install another package called jmtpfs. jmtpfs is not available in the official package repository of Arch Linux. But is it available in the AUR. Now I am going to install it.

First, navigate to the ~/Downloads/ directory with the following command:

$ cd ~/Downloads

Now clone the jmtpfs git repository with the following command:

$ git clone https://aur.archlinux.org/jmtpfs.git

The jmtpfs repository should be cloned as you can see from the screenshot below.

A new directory jmtpfs/ should be created as you can see from the screenshot below.

Navigate to the jmtpfs/ directory with the following command:

$ cd jmtpfs/

Now you have to make a pacman package for Arch Linux using the jmtpfs repository files. On Arch Linux, makepkg command is available for that purpose.

Run the following command to make a pacman package of jmtpfs:

$ makepkg -s

jmtpfs pacman package is being created.

Upon completion, you should see something like this.

Now you should see a .tar.xz file as shown in the marked section of the screenshot below.

Just run the following command to install the .tar.xz package using pacman package manager:

$ sudo pacman -U jmtpfs*.tar.xz

Press ‘y’ and then press <Enter> to continue.

jmtpfs should be installed.

Now that MTP support is enabled, you must install some additional packages for integrating the MTP protocol with your File Manager such as Nautilus. Otherwise when you connect your Android phone to your Arch Linux machine, it won’t be displayed in the File Manager and you will have to mount it manually, which is not what you want.

Run the following command to install gvfs-mtp package:

$ sudo pacman -Sy gvfs-mtp

Now press ‘y’ and then press <Enter> to continue.

gvfs-mtp package should be installed.

You can also enable PTP support for your File Manager by running the following command:

$ sudo pacman -Sy gvfs-gphoto2

Press ‘y’ and then press <Enter> to continue.

gvfs-gphoto2 should be installed.

Now you must restart your Arch Linux machine for the changes to take effect.

Run the following command to restart your computer:

$ sudo reboot

Once your computer starts, open your File Manager such as Nautilus and you should see the following window.

Now if you connect your Android device to your computer, it should show up in the File Manager as shown in the marked section of the screenshot below.

You can just click on your Android device and it should open up.

As you can see I can see all the files of my Android phone.

That’s how you connect your Android Phone to your Arch Linux machine. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to install Lutris – An Open Gaming Platform for Linux

A new tutorial on how to install Lutris on Ubuntu. Lutris is an open source gaming platform for GNU/Linux. It allows you...
28/12/2020

Git Show Remote Branches

Git’s ability to create branches easily is a great feature. However, when dealing with local and remote branches, it...
28/12/2020

Giới thiệu tổng quan về nagios core

Giám sát thiết bị là một vấn đề cần thiết trong mỗi một hệ thống. Để có thể biết rằng...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024