Yes Android is Linux based. However due to it’s design it is limited compared to your average Linux Distro. This is why you may want to consider running Linux on your Android device. The limitations may vary depending on the ROM on your phone. For example on my Samsung Prevail the Stock ROM was extremely limited. I couldn’t even do simple Ping command without installing an additional app, even with a Rooted Samsung Prevail I wasn’t able to achieve this simple goal. However I now have better ROM installed on my phone that does support quite few more features. But still not all of them.
Yeah you could go threw the trouble of installing a whole bunch of apps as you need them. Spending time and money researching which apps are available and what not. And prey that your every day Linux needs can get met. This is time consuming. Of course so is installing Linux on your phone. The difference with installing Linux on your phone is that once you’ve installed it you don’t have to worry about other things. So taking the time to install it can benefit you. Plus it may be time consuming but still much less time consuming then doing the research on all those extra apps.
- A Rooted Android Device
- A large SD Card for your Android Device (I used a 32GB card)
- Android Terminal Emulator
- A Linux based computer (Only if you plan on trying what I have researched below)
- A working knowledge of the Linux Terminal
- Confidence, Courage and the will to take risk at fudging everything up
I love using Android Terminal emulatator. Mainly because it really lets me get the nitty gritting commands that I need. It also is a great research tool to study the Android system. You can use it on an unrooted phone. However like usual you will still be limited to user level access on it. The same is true with a Rooted device however you can switch to root on Terminal Emulator by typing the su command.
I shortly discovered that SSH wasn’t part of my ROM. Knowing that Android was Linux based, I attempted to go to my Fedora System and obtain the SSH files from it. I then copied them over to my SD card and tried placing them with the correct user permissions and in the equivilant locations on my Android. I had no luck achieving this. Knowing that Android is built off Debian Linux, I may have had better luck, if I fetched the files from a Debian box, or even an Ubuntu Box. However I didn’t have either laying around on hand. I also didn’t feel like having to download a fresh ISO image and installing it on Virtual Box or VMWare just to find out that it didn’t work.
I would like to state that the reason that the above technique didn’t work could be because I didn’t copy all of the SSH dependencies over to the phone. So the above technique might still work. I’m not sure. If you know all of the dependencies of one of your preferred Linux programs and you want to try to get them to work on your Rooted Android phone feel free to do so with what I mentioned up above. And if it works please let me know. Because it will be by far the fastest and most space efficient way to achieve such goals.
What I ended up doing was litterly installing Linux on my phone. Their is a lot documentation online on how to do this. The fastest way to do it though is to simply use the Linux installer found on the Android market.
Also their are several Linux installers on the market. I’ve seen them for Ubuntu, Debian, BackTrack, and several others. I chose a free one. Which also appeared to be the best one for my needs. However this free Linux installer appears not to work on the Samsung Prevail stock ROM. Even if it is a rooted stock ROM. It did work on the custom ROM that I had installed on my phone.
I knew that since I would be installing pretty much an entire Linux system onto my phone I would need quite a bit of storage space. My phones internal storage was very limited as it was. So I knew the next best route would be to use nice sized SD card. I also knew that I would most likely want to partition this SD Card since I will need a Fat32 partition strictly to make Android happy. However the FAT32 File System can’t have files larger then 4GB in size. So I would need to partition this SD Card to have part of it be FAT32 and part of it to be EXT4.
Installing The Beast
- 8GB FAT32 (This is for Android stuff)
- 24GB EXT4
- Install in a block device = Leave it checked
- Use Loop File = Leave it Checked
- Server = None (Unless you know the IP address of the server wish to use)
- Preferred Distribution Type = Debian (The Ubuntu Option doesn’t work on my phone)
- Distrobution Version = Stable
- CPU Architecture = armel
- Hostname = whaever
- Domain name = whatever
- Chroot point = /data/ext2sd
- Name of chroot launcher script = whatever
- EXT Version = EXT2 (I tried EXT4 and EXT3 in the config but it didn’t work)
- Domain = WhatEver
- Linux Loop Location = /mnt/sdcard/MyLinux.loop
- Chroot Script = MyLinux
- Loop Size = 2000MB (The bigger the loop size the longer it will take)
Accessing The Beast
The above command works fine for me. However if you experience problems you may want to try one of the following commands as well.
The above is actually two commands the su command to gain root privilages followed by the MyLinux command to run the script. The followings will assume that you have also typed su to become root user as well.
You will know that your using Debian when your Terminal Line changes from $ or # to something like [email protected]:/#. You can also check to see if your running By typing the uname command allow with the a switch like so.
Now that your running Debian on your Android you can install Debian packages using the apt-get program or the dpkg program.