Thursday, July 25, 2013

Installed Debian on Samsung Galaxy 5 (GT-I5503)

People generally look for installing other ROMs on their phones after getting root access but being Linux user I was looking for installing Linux Distribution without disturbing the original ROM. After googling I got this thread on xdadevelopers site. The idea of installing Debian using the original ROM appealed to me. Accordingly I downloaded the Debian Kit application by Sven-Ola Tuecke from Android Market. You can read about this application here.

Following are the Prerequisites which are easily met by even old Android phones (mine was bought in 2010):
  • Root access to your Android device is required. No root, no Debian.
  • Kernel supports mounting loop disks or you have at least an external SD card with a spare partition.
  • Kernel supports the ext2, ext3, or ext4 file systems.
  • CPU architecture is ARM (little endian) or i386 (ia-32 bit).
  • 128 Mb of RAM or more, otherwise the launcher app may be killed during installation.
  • 512 Mb of free space on SD card (either internal or external).
  • Internet connection to download 100-500 Mb of software packages.
  • Terminal app installed, alternatively ADB access.
  • If you are a noob: command line input and text file editing is a must.
To make it easy the Debian Kit applications checks the above requirements and reports the suitability of the phone.

There are procedures to run Linux in chroot environment on Android Phones but the Debian Kit method works as follows:
The kit does not use the chroot command to make up a separate Debian environment (refer to schroot(1) for a similar technique). Instead, Debian subdirectories and files (such as /lib or /etc/resolv.conf) are added to the Android RAM-disk based file system with symlinks or bind-mounts. With this, e.g. you have access to newly mounted devices such as USB drives and the SD card. Also, can use Debian commands to compile packages that in turn can use a working chroot. This works, because a typical Android device has a file system (e.g. Libraries below /system/lib) that does not overlap the Debian file system (e.g. Libraries below /lib and /usr/lib). However, some files may overlap - which triggers a warning displayed if you start the deb script. For example, the Android /etc/hosts file is replaced by the Debian version while Debian is mounted. Which in turn may influence the inner working of your Android software stack. This is especially true with custom ROMs, because these typically add some Linux stuff that the ROM developer may miss. All changes are reverted if you issue the deb u command or simply by restarting your device.

After rooting my phone as described in previous post I have installed Andromized version of Debian on my phone and presently downloading andromized-lxde.

Following is the screenshot of my phone:
and on right side is the screen-shot running Bash shell on Debian and downloading required files for andromized-lxde desktop.

The internet speed is slow on the mobile using GPRS 2G and I will upload the image of andromized-lxde desktop later on when it gets installed on the phone.

Update on 26th July 2013
I am posting the screen shots of LXDE Desktop and the Leafpad running on it. When I tried Iceweasel the mobile crashed but it used to crash otherwise also before installing Debian.


No comments:

Air India direct flight to San Fransisco has flown through China today.

 My sister in law left for San Fransisco by AI 173 flight which flows over North Pole. I tracked that flight on flightstats.com till it land...