Please be aware, that this solution has been only tested with one Xperia X8 device running Floyo 0.30 (thanks to Racht for this great ROM !). I cannot guarantee that it will work on every other custom ROM as well as on the stock Xperia X8 ROM's.
Please also notice, that instructions in this tutorial in some cases can brick Your phone. I'm not responsible for any damage to the software or hardware caused by this tutorial. You can follow the instructions from this guide but only at Your own responsibility!
Please also notice, that I'm not an Android Developer. I'm just a user with some knowledge about Unix, so don't blame me if this tutorial won't work for You. You can post Your problems and we'll try to solve it together.
OK, I think that's all for the intro .
TABLE OF CONTENTS:
1) The purpose of this guide
3) Things to prepare
5) Some known bugs
6) Some little tips
1) The purpose of this guide.
This guide reffers to the newbie users who want to run Debian Linux on their Xperia X8. Step by step I'll try to explain how to run Debian simultaneously (at the same time) with Android. To gain that we'll use a program/command chroot (http://en.wikipedia.org/wiki/Chroot) which will allow us to Run Debian in Android as something similiar to "virtual machine" on PC.
You may ask why to run Debian on Android device ?
There are several answers to that question:
a. For testing...
b. ...developing applications in for e.g. C/C++ for ARM platform and try to run them on Android OS.
c. Installing Linux applications (like web servers, WiFi cracking software) and test what is working and what isn't.
d. For fun
For those who are asking what Debian actually is - please refer to the page http://en.wikipedia.org/wiki/Debian.
Before continuing check if You and Your device meet the following requirements:
a. ROOTED Xperia X8 device (I recomend to have Floyo 0.30 by Racht ROM installed, because it was tested on this ROM. I don't know if it'll work on different ROM's.)
b. At least 800MB space free on Your SD Card
c. Access to PC computer
d. Basic knowledge about Windows command line and Linux shell
e. About 1 hour of free time to set up everything
3) Things to prepare.
a. Download one of the following packages:
b. ADB Shell (can be found in Android SDK in folder platform-tools\ - http://developer.android.com/sdk/index.html)
c. SSHDroid from Market (only if You're planning to connect to Your Debian via SSH)
d. PuTTY for Windows (only if You're planning to connect to Your Debian via SSH - http://www.chiark.greenend.org.uk/~s.../download.html)
e. ConnectBot or Terminal Emulator from Market (it's a good terminal application)
The bold items are necessary.
PERFORM A FULL SYSTEM BACKUP USING XRECOVERY BEFORE PROCEEDING ANY FURTHER !
Now the best part !
There are several ways to install Debian:
1) Some are using Terminal Emulator application (preinstalled in Floyo 0.30)
2) Others are connecting with phone via SSH
3) But some are using adb shell command from Android SDK and that's the way we'll do this, because I know there are some differences between using adb shell and other ways. I tested it with adb and it is working so I think it is the right choice.
First, unpack the *.rar file of Your choice (debian750.rar or debian1.5.rar) to Your hard disk on a PC.
Replace file bootdeb which can be found in Debian folder after unpacking the archive with the one from bootdeb.zip file attached to this post. You need to do this, because the bootdeb file which is in the archive won't let You boot Debian correctly. It'll only cause Xperia X8 to restart after few seconds since execution. The file in bootdeb.zip has been corrected by me and it allows to boot Debian without any (known ) bugs.
Copy the Debian folder from the archive directly to the SD Card (also known as a root directory of Your SD Card). You should have the following directory tree on Your SD Card visible in Xperia X8:
Connect Your phone via USB and don't mount the SD Card (just like You want to charge the phone via USB).
On Your PC click Start->Run, type cmd and cd to the directory where You installed Android SDK, then cd to platform-tools and execute command adb shell. After execution You should see a # symbol in the command line window like on a below screenshot:
Now execute the following commands in ADB ahell on PC:
Custom Debian Bootloader is now installed! Quick huh?
Type in ADB Shell command
Now let's try to run Debian - on Xperia X8 run ConnectBot or Terminal Emulator and type:
After a while You should see a screen similar to the below screen shot:
I removed the lines (blured section) which You won't see after first boot. I have them, because I installed Apache Web Server and it is starting at the logon .
As You can see we are logged into Debian Linux !
Now, execute the following command:
And it's done... Now You are on Your own with Debian installed ! Go, play around, because it is a fully functional operating system for Your demand .
What about the performance ?
My Debian is still working since one day in the background (minimize the Terminal Emulator window after logging in) and I haven't suffer any problems with the low performance yet. I even set up an icewm window manager and VNC Server to be able to log in to my machine via VNC client and see the desktop and it isn't too laggy . But that's only a stupid future. The most power we get because of the access to Linux Shell (the command line which let us to use Linux applications on our Xperia X8).
4) Some known bugs.
For Your own safety read this short section.
1) Better don't try to unmount the SD Card from Xperia X8 (for e.g. when mounting the phone to the PC) when Debian is running. I didn't try this yet, but the bootdeb script is creating something called loop device in the Android system which should be properly unmounted. If this device will wanish due to some user activity the phone may not boot correctly any more.
2) When You finish playing with Debian always use the exit command to safely unmount the loop filesystem. After exit Your phone needs to be rebooted, better don't try to override this setting.
3) If somehow You will loose connection with Debian in Terminal Emulator You always can run:
5) Some little tips.
1) After first logon execute the following commands:
2) Running Apache Web Server:
apt-get install apache2
After installation run command:
3) Uploading files to Your Debian "virtual machine":
Install SSHDroid from Android Market.
Download program WinSCP and connect to Your device on port 22 using root as a user name and admin as a password.
After connection open location /data/local/mnt and You'll see Your Debian file system.
I think that's all for now.
I hope this guide will help "newbie" users to run Debian on their phones.
If You have any more questions or problems please let me know.