[ Tutotrial ] Install either Ubuntu or Debian in any Android Phone without any app

Search This thread

riddz17

Member
Jun 25, 2011
23
59
kolkata
This is a Tutorial to install either Ubuntu or Debian in any Android mobile without using any app :)


* Installing Ubuntu or Debian Linux does not format your Android OS or change anything to your phone.
The Operating Systems run over the underlying Android OS which continues to function as normal :)



Choosing your Linux OS:

There are few things you must be aware of before installing Ubuntu/Debian on youe Android Phone

Ubuntu does not support earlier ARM CPUs like the ones used in the Motorola Cliq. Samsung Galaxy Fit (ARMv6), Samsung Galaxy Y, etc.


( Reason behind this is , Your Android OS Kernel must support loop devices. Most newer Android smartphones/tablets come with this support so we can mount our Ubuntu image as a loop device. If not, you will either have to build your own kernel with support for loop devices or you can try an aftermarket ROM for your phone as most aftermarket ROMs come with support for it. )

You need at least an ARMv7 CPU like the kind found in the Motorola Droid, Samsung Galaxy S,HTC EVO 3D, Sony Experia Play, etc. most newer phones (Hummingbird, Snapdragon, Tegra2, etc.).So you can Install Ubuntu if you have ARMv7 or newer Processor.

If you have ARMV6 or any other moderate Processor don't be sad, because Debian supports the CPU on practically all Android devices, so if you prefer Debian, or you can't run Ubuntu, choose the Debian download link.

* If you're not sure what CPU your device has, look up your device on http://pdadb.net/, click the link under CPU, and read the line for "Supported Instruction Set(s)".

e.g. : My Phone which is a " Samsung Galaxy Fit" uses ARMV6 Instruction Sets.

Galaxy%252520Fit.PNG


7941766090


Pre-Requirements:

Hardware Required:

an Android Phone

SD Card with more than 2GB of free Space

Android root environment:

Most important! Your Android device should be “rooted” because you need root access to run Ubuntu/Debian off your Android. If your device is not rooted you have to root your device.


Linux Operating System:

Download suitable OS from the following Link:



Ubuntu 11.04 (Natty Narwhal)

linux.ubuntu-natty.tar.bz2 Ubuntu 11.04 (Natty)



Ubuntu 11.10 Oneiric Ocelot

linux.ubuntu-oneiric.tar.bz2 Ubuntu 11.10 (Oneiric)





Debian 6.0 Squeeze

linux.debian-squeeze.tar.bz2 Debian 6.0 (Squeeze)

Applications Required:

BusyBox Installer



A terminal emulator like Better Terminal Emulator ( Recommended ) or Terminal Emulator.



Optional Apllications:

androidVNC

Or

ConnectBot


Procedure ----------------------------------------------->

Step 1:

(Mount the SD card on your computer.)

Extract the .tar.bz2 file you downloaded to your SD card. You should now have a folder named "linux" on the root of your card.

(Unmount the SD card.)

Open Busybox Installer, and install Busybox.

Open Better Terminal Emulator, and install Better Terminal Emulator.




Step 2:

Open your terminal emulator. (If using ConnectBot, connect to 'local', not 'ssh'.)

Run the following commands:

Code:
[B]su[/B]


screenshot-1338111602932.png
screenshot-1338111615305.png



( If Prompt for Superuser Request then allow )

Code:
cd /sdcard/linux

sh install.sh

dlnVEF2MqWGNUApqp64EHdMTjNZETYmyPJy0liipFm0


If you don't see any errors, Linux is now installed.




Step 3:

Open your terminal emulator.

To start a chroot session


Code:
su

linux

FeFeFcjFRcl9UrM4l3udd9MTjNZETYmyPJy0liipFm0
screenshot-1338111869548.png


To start the SSH server

Code:
su

linux ssh

screenshot-1338111803398.png



You can then use ConnectBot (SSH: user@localhost) on your device, or any SSH client to connect to your device. See Login Information, below.




To start a VNC session

( Firest you need androidVNC to be installed , then type the following in terminal )
Code:
su

linux vnc

screenshot-1340365986598.png


The first time you run VNC, it will prompt you to create a VNC password.

screenshot-1340365995100.png


You can then use androidVNC (host: localhost port: 5901), or any VNC client to connect to your device.

Configure The VNC App as follows:


screenshot-1340366868089.png
screenshot-1340366928103.png




Note: The default desktop environment is icewm. If you wish to replace it, for example, with LXDE:

Run the following as root in Linux:


Code:
apt-get autoremove icewm- lxde+

Secure your Log in Password:

Please remember to change these passwords if you are planning on using the SSH server. Malicious people can do Very Bad things to your device if you don't.

There are two accounts included in the images:

root

Password:cheesecake

user

Password:dessert
After a successful connection to host you will be able to use Ubuntu / Debian in graphical interface just like in your PC ! It will keep your Android OS as it is and just run in the upper layer over it :)

These are some of the screen shots taken from my Samsung Galaxy Fit!


screenshot-1340367400114.png
screenshot-1340367425624.png
screenshot-1340367492875.png



screenshot-1340367717276.png
screenshot-1340367801011.png
screenshot-1340367816175.png
Linux vs Linux Terminal Emulator :

Terminal Emulator only Emulates Linux terminal, but after Linux Installation you can get full features; more than just the limited commands which runs on Android shell rather than Linux Shell.

Please Leave your Feedback and Queries below. Thank You :)



coollogo_com-83173362.png

 

wisewood

Member
Nov 8, 2012
17
2
I'm getting about a dozen errors in the install process, all of which seem to relate to file permissions.
 

swordfish

Senior Member
Jul 23, 2012
181
24
OnePlus 7
when I type su
sh install.sh
there are many error like dir.. not found help me...

Sent from my HTC Explorer A310e using xda app-developers app
 

dantegl36

Senior Member
Dec 11, 2007
312
42
Pittsburgh
when I type su
sh install.sh
there are many error like dir.. not found help me...

Sent from my HTC Explorer A310e using xda app-developers app

worked for me. I tried to install from the microsd card (sdcard-ext) but i got errors. Once i moved the files to the phones memory (sdcard) it worked like a charm.

note: I am using Debian 6.0 Squeeze
 
Last edited:
  • Like
Reactions: patilsb

mundui007

New member
Jun 19, 2012
2
5
hey guys

Thanx to the author of this forum on debian on android. I had the same problem you see in the error logs above. the problem is between regular "mount" command and busybox "mount". you need to use the busybox mount. so I added the word busybox infront of every mount word in the script. eg. busybox mount -o , rw /system remount. the alternative is to delete the mount found on /system/bin so that the terminal will use the busybox one automatically on /system/xbin.
 

scientist343

Senior Member
Feb 11, 2011
112
13
Thanks, I found that the version of busybox I had didn't install the mount comand. I had to use the smart installer and manually check the box to overwrite the mount command then it worked.

Sent from my SPH-L710 using xda app-developers app
 
  • Like
Reactions: patilsb

scientist343

Senior Member
Feb 11, 2011
112
13
Does anyone know if You can connect to the the ubuntu instance on your phone from a computer through vnc? I would like to be able to use a bigger keyboard and mouse to control it.

Edit: If I make changes to the Linux.img on my phone and just copy the whole folder to my tablet will it still keep all of the changes? (I will try it tonight if know one knows).

---------- Post added at 10:52 AM ---------- Previous post was at 10:36 AM ----------

Ok you can connect to the phone from a computer. I used wifi tether and then just put the phones ip and the port into tightvnc and it connected. It took a minute to recognized the phone the first time though.

Sent from my SPH-L710 using xda app-developers app
 

patilsb

Senior Member
Feb 8, 2012
94
20
mumbai
This is a Tutorial to install either Ubuntu or Debian in any Android mobile without using any app :)
HI , THANKS
for your work..i have galaxy ace plus [armv7] ,i tired installing linux on my phone, when i type "sh install.sh "then ,,,such dir not found like error
appears, i am new for linux command [ my dir . /sdcard/external_sd/linux ].what can i do for this? plz help me .
 

id4novan

Member
Sep 12, 2009
13
5
Jakarta
HI , THANKS
for your work..i have galaxy ace plus [armv7] ,i tired installing linux on my phone, when i type "sh install.sh "then ,,,such dir not found like error
appears, i am new for linux command [ my dir . /sdcard/external_sd/linux ].what can i do for this? plz help me .


- try to install "busybox installer" first..
- when you open the app, it will ask to install busybox..
pay attention to "Advanced install" checkbox.. be sure to have it checked..

- you will found so many applets.. try to find named "MOUNT"..

- when you found them, see the triangle sign on the right-side.. click it..
- there are 3 options: symlink applet / remove symlink / skip symlink
pick symlink applet..

- press install
- after it's done, get ou of busy box
- back to terminal, repeat the step "sh install.sh"
 
Last edited:

itzwood

Member
Sep 19, 2012
6
0
i got stuck @ step 2 " please wait while booting ubuntu.img.. this may take some time ,,. "
i installed busy box , i got my device root

sent from my Arc S
 

scientist343

Senior Member
Feb 11, 2011
112
13
i left it before i go to sleep .. waked up nothing "ABOUT 8hours :eek: "

Try redownloading it to make sure it isn't corrupt.

You can also try a reboot, then try starting at the top again. I had it do that on my old phone and after a reboot it worked.

Also which version of ubuntu did you download 11.04 or 11.10?
 
Jan 8, 2013
23
11
no such file or directory errors

Hi I'm getting "no such file or directory" errors when I try the step "sh install.sh"

can't post pictures yet so I'll type up the short version
# sh install.sh
remounting /system rw ...
mount: no such file or directory
installing scripts in /system/bin ...
mounting the linux image ...
mounting prepwork...
mounting: loopback mount ...
mknod /dev/block/loop254: file exists
mount: invalid argument
mounting: setting up chroot environment ...
mount: no such file or directory
mkdir failed for /data/local/mnt/media/sdcard, no such file....
[done]
then the rest is no such file or directory

I'm on an Epic 4g touch rooted obviously
I tried putting busybox in front of mount in the script as suggested before
I moved all the files from /mnt/sdcard/external_sd to /sdcard
made sure mount is installed in busybox

Not sure what to try next. Guess I could make the folders manually and see what happens.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    This is a Tutorial to install either Ubuntu or Debian in any Android mobile without using any app :)


    * Installing Ubuntu or Debian Linux does not format your Android OS or change anything to your phone.
    The Operating Systems run over the underlying Android OS which continues to function as normal :)



    Choosing your Linux OS:

    There are few things you must be aware of before installing Ubuntu/Debian on youe Android Phone

    Ubuntu does not support earlier ARM CPUs like the ones used in the Motorola Cliq. Samsung Galaxy Fit (ARMv6), Samsung Galaxy Y, etc.


    ( Reason behind this is , Your Android OS Kernel must support loop devices. Most newer Android smartphones/tablets come with this support so we can mount our Ubuntu image as a loop device. If not, you will either have to build your own kernel with support for loop devices or you can try an aftermarket ROM for your phone as most aftermarket ROMs come with support for it. )

    You need at least an ARMv7 CPU like the kind found in the Motorola Droid, Samsung Galaxy S,HTC EVO 3D, Sony Experia Play, etc. most newer phones (Hummingbird, Snapdragon, Tegra2, etc.).So you can Install Ubuntu if you have ARMv7 or newer Processor.

    If you have ARMV6 or any other moderate Processor don't be sad, because Debian supports the CPU on practically all Android devices, so if you prefer Debian, or you can't run Ubuntu, choose the Debian download link.

    * If you're not sure what CPU your device has, look up your device on http://pdadb.net/, click the link under CPU, and read the line for "Supported Instruction Set(s)".

    e.g. : My Phone which is a " Samsung Galaxy Fit" uses ARMV6 Instruction Sets.

    Galaxy%252520Fit.PNG


    7941766090


    Pre-Requirements:

    Hardware Required:

    an Android Phone

    SD Card with more than 2GB of free Space

    Android root environment:

    Most important! Your Android device should be “rooted” because you need root access to run Ubuntu/Debian off your Android. If your device is not rooted you have to root your device.


    Linux Operating System:

    Download suitable OS from the following Link:



    Ubuntu 11.04 (Natty Narwhal)

    linux.ubuntu-natty.tar.bz2 Ubuntu 11.04 (Natty)



    Ubuntu 11.10 Oneiric Ocelot

    linux.ubuntu-oneiric.tar.bz2 Ubuntu 11.10 (Oneiric)





    Debian 6.0 Squeeze

    linux.debian-squeeze.tar.bz2 Debian 6.0 (Squeeze)

    Applications Required:

    BusyBox Installer



    A terminal emulator like Better Terminal Emulator ( Recommended ) or Terminal Emulator.



    Optional Apllications:

    androidVNC

    Or

    ConnectBot


    Procedure ----------------------------------------------->

    Step 1:

    (Mount the SD card on your computer.)

    Extract the .tar.bz2 file you downloaded to your SD card. You should now have a folder named "linux" on the root of your card.

    (Unmount the SD card.)

    Open Busybox Installer, and install Busybox.

    Open Better Terminal Emulator, and install Better Terminal Emulator.




    Step 2:

    Open your terminal emulator. (If using ConnectBot, connect to 'local', not 'ssh'.)

    Run the following commands:

    Code:
    [B]su[/B]


    screenshot-1338111602932.png
    screenshot-1338111615305.png



    ( If Prompt for Superuser Request then allow )

    Code:
    cd /sdcard/linux
    
    sh install.sh

    dlnVEF2MqWGNUApqp64EHdMTjNZETYmyPJy0liipFm0


    If you don't see any errors, Linux is now installed.




    Step 3:

    Open your terminal emulator.

    To start a chroot session


    Code:
    su
    
    linux

    FeFeFcjFRcl9UrM4l3udd9MTjNZETYmyPJy0liipFm0
    screenshot-1338111869548.png


    To start the SSH server

    Code:
    su
    
    linux ssh

    screenshot-1338111803398.png



    You can then use ConnectBot (SSH: user@localhost) on your device, or any SSH client to connect to your device. See Login Information, below.




    To start a VNC session

    ( Firest you need androidVNC to be installed , then type the following in terminal )
    Code:
    su
    
    linux vnc

    screenshot-1340365986598.png


    The first time you run VNC, it will prompt you to create a VNC password.

    screenshot-1340365995100.png


    You can then use androidVNC (host: localhost port: 5901), or any VNC client to connect to your device.

    Configure The VNC App as follows:


    screenshot-1340366868089.png
    screenshot-1340366928103.png




    Note: The default desktop environment is icewm. If you wish to replace it, for example, with LXDE:

    Run the following as root in Linux:


    Code:
    apt-get autoremove icewm- lxde+

    Secure your Log in Password:

    Please remember to change these passwords if you are planning on using the SSH server. Malicious people can do Very Bad things to your device if you don't.

    There are two accounts included in the images:

    root

    Password:cheesecake

    user

    Password:dessert
    After a successful connection to host you will be able to use Ubuntu / Debian in graphical interface just like in your PC ! It will keep your Android OS as it is and just run in the upper layer over it :)

    These are some of the screen shots taken from my Samsung Galaxy Fit!


    screenshot-1340367400114.png
    screenshot-1340367425624.png
    screenshot-1340367492875.png



    screenshot-1340367717276.png
    screenshot-1340367801011.png
    screenshot-1340367816175.png
    Linux vs Linux Terminal Emulator :

    Terminal Emulator only Emulates Linux terminal, but after Linux Installation you can get full features; more than just the limited commands which runs on Android shell rather than Linux Shell.

    Please Leave your Feedback and Queries below. Thank You :)



    coollogo_com-83173362.png

    5
    hey guys

    Thanx to the author of this forum on debian on android. I had the same problem you see in the error logs above. the problem is between regular "mount" command and busybox "mount". you need to use the busybox mount. so I added the word busybox infront of every mount word in the script. eg. busybox mount -o , rw /system remount. the alternative is to delete the mount found on /system/bin so that the terminal will use the busybox one automatically on /system/xbin.
    4
    HI , THANKS
    for your work..i have galaxy ace plus [armv7] ,i tired installing linux on my phone, when i type "sh install.sh "then ,,,such dir not found like error
    appears, i am new for linux command [ my dir . /sdcard/external_sd/linux ].what can i do for this? plz help me .


    - try to install "busybox installer" first..
    - when you open the app, it will ask to install busybox..
    pay attention to "Advanced install" checkbox.. be sure to have it checked..

    - you will found so many applets.. try to find named "MOUNT"..

    - when you found them, see the triangle sign on the right-side.. click it..
    - there are 3 options: symlink applet / remove symlink / skip symlink
    pick symlink applet..

    - press install
    - after it's done, get ou of busy box
    - back to terminal, repeat the step "sh install.sh"
    2
    This is a Tutorial to install either Ubuntu or Debian in any Android mobile without using any app :)
    Nice, i have tried for my Galaxy Ace so with ARM V6 too, but the terminal emulator gave me error in the step 3 and 4 :(
    2
    Use Black Ubuntu in my sig.
    Comes with:

    Gedit
    mtpfs
    libusb
    yum
    tcpdump
    Added backtrack repo
    curl
    git
    metasploit (NOT TESTED and not fully working)
    QBittorrent
    Aircrack-ng
    Wicd (When booted ignore errors. Just needed to get airmon-ng to find the wireless card)
    build-essential
    libssl-dev
    Reaver 1.4 (wps cracker)
    libpcap-dev
    sqlite3
    libsqlite3-dev
    libpcap0.8-dev
    Subversion

    Screenshot_2013-03-07-21-42-31[1].png



    Enjoy :)

    easy install too.