January 18, 2019

How to install Ubuntu in Smartphones and tablets?

Ubuntu is the world’s favourite free operating system – and Ubuntu for Android is the first complete solution for office productivity on a phone. Today I try to give a tutorial on how to install ubuntu on Smartphones and Tablet.

Unbenannt

READ THIS BEFORE INSTALLING!!!
Ubuntu for phones is intended to be used for development and evaluation purposes only. It is an early release that can potentially brick your device. It does not provide all of the features and services of a retail phone and cannot replace your current handset. This process will delete all data from the device. Restoring Android will not restore this data. I am no responsible whatever happens to your phone. Please see the supported device at the end of this tutorial.

There are some steps to be taken in your computer and some on your Smartphone. Let’s see what shall be done on Computers inorder to communicate with phones.

Setup the Ubuntu for phones tools PPA

The PPA has the tools and dependencies to support 12.04 LTS, 12.10, 13.04 and 13.10. Add the Ubuntu for phones PPA by adding the following custom source list entry to your /etc/apt/sources.list file.

On your computer, press Ctrl+Alt+T to start a terminal.

sudo add-apt-repository ppa:phablet-team/tools

Then do the following:

sudo apt-get update 
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot

Now you have to work on your smartphones. First of all enable your USB Debugging. It is recommended to backup your apps and data. So let’s make a back up.

adb backup -apk -shared -all

This should hopefully create backup.ab with all of your apps, OS, and data. Later, after reflashing with Android (or rooting / unlocking) you will be able to use

adb restore backup.ab

to restore all of your data.

Device unlock

If the device is already unlocked, skip to Step 4. These steps will wipe all personal data from the device.

  • With the device powered off, power on the device by holding the power button + volume up + volume down.
  • The device will boot into the bootloader.
  • Plug the device into the computer via the USB cable.
  • On your computer, in a terminal, run sudo fastboot oem unlock, on the device screen, accept the terms of unlocking.
  • Boot the device by pressing the power button (pointed by an arrow with Start on the screen).

If you get stuck in a bootloop rebooting the device after unlocking the bootloader, see at the end of this tutorial.

Initial device setup

Follow these initial steps on your device:

  1. If not booted, boot the device into Android
  2. Make sure USB debugging is Enabled on the device.
    • You will also need to accept a host key on the device.
      • On the workstation: adb kill-server; adb start-server
  3. Plug the device into the computer via the USB cable.
    • Depending on the installed Android version, a popup will show up on the device with the host key that needs to be accepted for the device to communicate with the workstation.
    • Note, ‘adb devices’ should not show the device as ‘offline’. If it does, unplug the device, run adb under sudo on the workstation (eg. sudo adb kill-server; sudo adb start-server), then plug the device back in.
  4. Save the version of the current image on the device, if on Android, to use as a reference to revert back to. The version can be found by going to Settings > About Phone > Build Number.

Downloading and deploying image to device

To install Ubuntu for phones on your device, you will need to run the command:

phablet-flash ubuntu-system --no-backup

Please note, this will wipe the contents of the device so ensure you have made a backup.

This will deploy the latest build onto your device, after which your device will boot into the Ubuntu Unity shell. This step can take a very long time.

General notes

  • Be patient — some steps, like pushing the files over USB to the device, take time. Just wait through any screens looking like input is required. Carefully read messages on the host and the device.
  • The files are saved in Downloads/phablet-flash.
  • If the deploy fails (for example boots to black screen), try wiping the /data partition on your device and redeploy.
  • phablet-flash will not work unless you have booted your device (it must not be displaying the bootloader screen and "adb devices" should list your device).
  • If you get stuck at ‘ < waiting for device > ‘ and your device reboots into Android, you may have to run phablet-flash under sudo.

Device factory reset

If you get stuck in a bootloop rebooting the device after unlocking the bootloader, here is what you do:

  • During the bootloop hold the power button + volume up + volume down button simultaneously to get yourself back into fastboot mode as you were previously.
  • In fastboot mode, use the volume keys to scroll to Recovery and the power button to select it.
  • In Recovery (Android robot on his back with a red triangle), tap the volume up button and the power button simultaneously which will bring you into stock recovery. Don’t hold the buttons, just tap them simultaneously.
  • Also make sure you’re holding the correct volume button. Up will be the volume key on the right.
  • Once you’re in Recovery, perform a factory reset/data wipe and then reboot your device, you should now be back to the Welcome Screen.

SUPPORTED DEVICE:

Device Codename Factory firmware from Google
Galaxy Nexus maguro takju or yakju
Nexus 4 mako occam

Source [Ubuntu]

About Bhattarai Diwas (thenepaltech) 213 Articles
I'm an Engineer and have Bachelor's Degree in Electrical and information technology. Right now I am working as a software developer in Germany. All in all I love programming and I am a tech geek.