Debian for the Omnia device

Here are the instructions for installing the Debian 5.0 (Lenny) Linux distribution with the base-system and build-essential set of packages to the Samsung Omnia SGH-i900 device.

This tool is provided as a development tool for the http://andromnia.net project and you should use it at your own risk.

Part 1 -- prerequisites

Part 2 -- set up the micro SD card

  • Create a first Linux/ext3 primary partition in the same way when installing Andromnia.
  • Create a 100MB sized second primary swap partition.
    • Although not necessary, it is recommended that you to setup an extra partition for the swap if you are going to build (using gcc) on the phone or want to start Android of top of the Debian system. The swap is specially useful when you consider that the Kernel's OOM Killer might kill tasks even before the physical memory runs out -- please note that the current kernel from the Andromnia project has the swap functionality turned off. You may either activate it and recompile or use the kernel provided in the andromnia-debian-tool-0.9.tar.bz2 download.
  • Format the first partition using ext3 and extract the contents of the rootfs (from the downloaded archive) on the brand-new partition.
  • Format the second partition for the swap using mkswap /dev/<your micro sd card's partition>. Please note you can lose all your files if you commit any mistakes when issuing this command

Part 3 -- configure the Wi-Fi connection

  • On the newly created filesystem, edit the file "/Omnia/startup". There you will find a script that will setup the Wi-Fi connection with your router. The provided code establishes a WEP connection. If your router doesn't have wireless security enabled, you can comment the password line; if you use WPA or WPA2 I can't help since I don't know how to setup such connection via a script.
  • Test this script on your own PC if you have the necessary hardware. You may attempt to check the correct wireless interface on your PC by running ifconfig.

Part 4 -- boot the Omnia

  • Pick-up the provided "default.txt" and possibly "Image" (the kernel) from the "haret" directory provided by andromnia-debian-tool-0.9.tar.bz2. Use the same "haret.exe" as provided by the Andromnia project.
  • Boot exactly as you would if using the Andromnia OS and monitor the messages on the device's screen.
    • Ignore the noisy warning messages that were not cleaned up for this version. Pay attention to the last lines, where you will find the IP address of your Omnia device. If you could read that information, you may skip the next part.

Part 5 -- find the Omnia local ip address

You have some methods for that. Here they are:

  1. on your PC, run the command arp-scan -local. On Debian/Ubuntu/Sidux you need the package arp-scan.
  2. on your router, consult the DHCP Client's Table.
  3. run this script (you should modify the 192.168.0 local network prefix to match yours):

#! /bin/bash

#

# ip_finder -- searches for local machines

for i in {1..255}; do

IP=192.168.0.$i

(

ping -c 1 ${IP} >/dev/null 2>&1

if (($?==0)); then

echo $IP

fi

) &

done

wait

Part 6 -- log into your Omnia via SSH

Simply do a ssh root@<OMNIA IP>. For the password, you have the following options:

  1. use the password omnia
  2. add your PC's public key "~/.ssh/id_pub" to the Omnia's authorized key's file "/root/.ssh/authorized_keys" -- in this case you'll be able to login without the password prompt

Part 7 -- run Android

  • Copy the whole "rootfs.cupcake" directory from the Andromnia project to the root of your brand new Debian system.
  • Run chroot /rootfs.cupcake/ ./init &

That is it.

In case of doubts, please use the comments on this page or the forums at the Andromnia Project.

Thank you.