A step-by-step tutorial with easy-to-follow instructions

Aug 29, 2015 07:10 GMT  ·  By

The following tutorial will teach new and existing owners of an Ubuntu phone how to install applications that are distributed in the .click file format, as well as to transfer them to the device prior to installation.

The present article represents my frustration at the lack of explicit details on the steps one needs to take to copy/transfer a .click file to a smartphone powered by Canonical's mobile operating system and install the respective .click app.

You can also use the following instructions to transfer all sorts of files to your Ubuntu phones, such as wallpapers, music, and videos. The second part of the tutorial is very useful if you want to install .click apps manually, not from the Ubuntu Store, of course.

So, let's start with the file transfer part of the guide. Everywhere on the Internet, when someone asks how to install a .click app on their Ubuntu phone, you will find answers like "copy the file to the device and run the next command."

The problem with these type of instructions is the main reason I wrote this guide. How is one supposed to copy that file to the device? How do you run the respective command to install the .click app?

Transferring files to an Ubuntu phone

Transferring files to an Ubuntu phone is, in fact, simpler than you might think. All you have to do is connect the smartphone to your Ubuntu/Linux computer using the USB cable that came with it. Wait for the device to be recognized.

You should see a new icon on your desktop, named after the respective device, so double-click it and you should see the root partition. Alternatively, if you don't see the mounted device on your desktop, open the default file manager and look for the phone.

Double-click the root partition, and you should see several folders, such as Downloads, Music, Videos, Pictures, etc. All you have to do now is drag and drop the files you want to transfer from your computer to the Ubuntu phone. You can copy the files anywhere you want.

Installing .click apps in Ubuntu phone

First of all, to access your Ubuntu phone device from a command-line and run all sorts of commands, you will have to install some Android related packages that contain the "adb" command, such as "android-tools-adb." So run the following command in a Terminal.

code
sudo apt-get install android-tools-adb
If you have an Android smartphone, you might already have these packages installed. Also, Ubuntu will warn you about the "android-tools-adb" package if you try to run the "adb" command in the Terminal.

Using the above instructions, when installing a .click app in an Ubuntu phone device, we recommend copying the respective .click file into the "Downloads" folder. Once the file has been copied, you must run the "adb shell" command to connect to the device, but first run the "adb devices" command to start the adb server, which will recognize your phone.

code
adb devices
adb shell
Now you are connected to your Ubuntu phone and you can install the .click app that you've just copied into the "Downloads" folder using the following command, replacing "package_name" with the full name of the .click package, of course.
code
pkcon --allow-untrusted install-local package_name.click
That's it! You should see the installation of the .click app on the screen. When it's done, type "exit" (without quotes) to close the adb shell session, then eject the Ubuntu phone device, remove the USB cable, and check for the installed app(s) on the Apps Scope.