Installing Debian Squeeze on Android Optimus S - Walkthrough

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
Last edited:

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
All of this work was done by other people. I am simply compiling information and specializing it to the Optimus S.
This method does not require a pc, and everything is done through your android interface.




Current Abilities I've tested with success.
Play Sound
Surf the web
Access entire SD Card

Currently Working on:
Flash Support through IceWeasel

Completed:
Making this a simple download and phone restore - Done


Needs:
A GUI with bigger buttons and scaled for 480x320 - Done thanks bigsupersquid
Transparent Keyboard

Sources:
Howto Install Ubuntu by NexusOneHacks.net

secret hidden note to self psychocats.net/ubuntu/nonfree


Lets begin.

You need the following requirements:
Recommended: 2+ gigabytes of free SD card Space (Minimum 1.25gb)
A Rooted Optimus S
Kernel/Recovery: Xionia CWMA v1.2518.6
ROM:The Scott Pilgrim ROM (CM7 Gingerbread, Zefie Edition)
BusyBox Installer - You can get this from google apps store by JRummy16
Linux Installer – You can get this from google apps store by Galoula

Items worth having to things that make this easier:
A Wifi Internet Connection
A fully Charged Battery and a Wall Charger ^.^
2 Bottles of Mountian Dew
Your favorite Movie
and
The Patience to NOT Touch/use your phone for the 2 hours needed to complete the initial install process.

I started this endeavor with a clean install of the ROM listed above.

!!Make backups if you MUST save your data before you proceed any further!!

Warning: In The Simplest Terms(More detail will be in the final walkthrough)
Sometimes the Linux Installer doesn't work or if it is working and the process is interrupted while creating the .LOOP or extracting the build. The Linux Installer will stop working. I've found two (2) ways to fix the issues. The first is to go into setting and clear the cache for Linux Installer, Then open the superuser app and forget the permissions assigned to Linux Installer (Note: Try this a few times before resorting to a clean wipe, this method sometimes takes a few tries). The second is a clean wipe/recovery of the phone. Additionally if for some reason there is a interruption and the process stops. reboot the phone delete linux.loop off your sdcard and start from scratch. BEWARNED


*Walk-through - Under Construction*
To clarify any confusion the button names I use from left to right:
Home : Menu : Back : Search

Pre-Install Check List for Formatting/Reloading Rom
install sdcard with ROM/Recovery's
Reboot > Recovery
wipe data/factory reset
mounts and storage> format system
install zip from sdcard >choose zip from sdcard > update-cm-7-04282011-NIGHTLY
install zip from sdcard >choose zip from sdcard > gapps-gb-20110120
Remove sdcard with ROMS
Install sdcard marked for Linux
mounts and storage > format sdcard
reboot system now

Pre-install Checklist phone prep. (If you choose to overclock your phone this would be a great time to do it)
Wait 2 minutes for phone to fully load
tap droid
tap skip
tap next/done
Settings > Display > Screen timeout > 30 minutes
Settings > Applications > Check Unknown sources (not sure if nessesary)
Settings > Applications > Development > Check Stay awake (Required!!!!)
Settings > Accounts & Sync > Add Account (Go Through Menu's should take you though Market Install)
Market > Search Busy Box > tap BusyBox Installer by JRummy16 > free > ok
Market > Search Linux Installer > tap Linux Installer by Galoula > free > ok
Market > Search vnc > tap android-vnc-viewer Installer by androidVNC team + antlersoft > free > ok
Press Home Key
Apps> Busybox Installer >Allow Permissions> OK > Install

Install Check List

Warning
DO NOT ROTATE YOUR PHONE
ALLOW THE SCREEN TO SHUT OFF
LOCK THE PHONE
WHILE THIS APP IS OPEN UNLESS STATED

(you will see bad things if you do)

For Debian
Apps > Linux Installer > Allow SU Permissions > Allow SU Permissions > Allow SU Permissions > Click OK (First time start up, Yes 3 Approvals. If you don't recieve 3 notifications from super user it means Linux Installer is bugged. Go Settings>Applications>Manage Applications> under the Downloaded tab find Linux Installer > Select > Clear Data > Try step again. May take a few tries.)
Press Menu Key > Tap Setup > Tap File Size > Set to 1250 or more but must be less than the size of your SD Card.> ok > Press The Back Key (Linux installer will exit to your apps menu)

For Ubuntu - Currently bugged. I would avoid this. The source.list seems to have issues and won't download packages.


REQUIRED: Set you phone some where flat plugged into power Do Not Let The Screen Rotate!!!!!Apps>Linux Installer > Tap 1) Create target loop
Be Patient Wait until the Creating LOOP menu disappears. The length of time is dependent on the size of Megabytes set in the File Size option. About 10 minutes for 1500 Mb
Tap Liberate Loop -- Really Fast
Tap Format target loop (ext2) - This is the Buggy Part. If you get an Error message everything is most likely ok. Pickup your phone and Physically Rotate it so the screen rotates. Two additional menu's should appear. [3) Copy and Extract into loop and Install Linux Boot Script]
Lay your phone back down flat it doesn't matter if the screen rotates back to its original.

From here on DO NOT let the Screen Rotate Again! The process will be interrupted and you will get to start from step 1
Tap 3) Copy and Extract into Loop (it will start downloading and extracting the packages necessary to install Linux) This can take up to an hour. On a good 3g connection less than 45minutes.

Tap 4) Install into loop (This takes less than 10 minutes)
Tap Install Linux boot script

30 Seconds Later you officially have a version of Linux installed on your phone
CONGRATS:)

Verify Install Works
Apps > Terminal Emulator > Type: su > Enter > Grant Permissions > Type: linuxboot > Enter
You should get a string of code then get something like:
root@Linux-ARMEL:/


Most of the next portion comes from the Nexusonehecks.net

Setting up VNC and LXDE (so you don't have to look at terminal lines all day)
Apps > Terminal Emulator > Type: linuxboot > Enter <---If your not already in already.
Type > apt-get update > enter --- 5 minutes

Tight VNC Server
Type > apt-get install tightvncserver > Type y > Press enter --10 minutes

LXDE
Type > apt-get install lxde > type y > Press enter - 30 Minutes+
After a while you should get this screen


Press Menu > Preferences > Control key > Choose Camera Key > Back key > Back Key
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar -- now two times more :)
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar
The process should continue installing LXDE

tightvncserver Setup
Type> export USER=root > enter
Type> vncserver -geometry 1024x800 > enter
enter password > enter (use something simple you can remember i used 123123123 like they did on the nexusonehacks.net writeup)
verify password > enter

Press Enter after typing each line of the following code. Be Very Slow and Deliberate. Double Check Each line for Capitalization and accuracy before pressing Enter! I do not know how to edit this again --hidden note-->Perhaps some one can show me/tell me how

cat > /root/.vnc/xtartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession


Now Press and Hold the Camera Key and Tap D twice on the soft keyboard > Press Enter (it may ask to press 1 do not and only press enter)
If your camera key wasn't set look here to set it again--->Press Menu > Preferences > Control key > Choose Camera Key > Back key > Back Key

Setting up VNC on android ... After all those command lines I'm sure this is a very very nice change xD
Press Home Screen
Apps > androidVNCviewer > For Password enter 123123123 (Or whatever you set it to in the previous server setup)
Scroll to Port and enter 5901
Change the Color Format if you wish. It runs rather nicely on 24bit color but consumes more cpu cycles.
Tap Connect -- A Very Pretty LXDE should appear with a working CPU Monitor and everything nice

I know you want to play but we have a little more work to do this next step uses Terminal Emulator as the auto start/config file to boot linux and start and configure tightvncserver
Press Home
Open Termial > Menu Key > Preferences > Initial Command > Tap to Edit
Make Edit look like this

export PATH=/data/local/bin:$PATH
linuxboot
vncserver -geometry 600x480


Tap OK > Back out of Teminal to home

vncserver -geometry 600x480<--- this is where you change your screen size. you need a minimum of 600x480 to use the synaptic package manager and a few other things. but when i'm surfing the net or other things I prefer 480x320 (The Exact Size of the Optimus S Screen)

Now whenever you want to run linux simply open the Terminal Emulator. Wait 60 seconds for the code to run.
open androidVNCviewer and click Connect

DONE

Extra things go here
apt-get install synaptic - installs synaptic manager a nice GUI interface for the apt-get command
 
Last edited:

captmeach7

Well-known member
Nov 28, 2010
218
23
0
Visit site
@uber-I would imagine so. This is the chroot to run an image of ubuntu(or debian) through VNC. Like a Virtual machine on Android.

This is a lot like the post in Roms and hacking about debroid only this one will probably have a GUI

The Flash port probably wouldnt work however, because it is debian linux, but it is still built off the Arm Eabi for Arm processors. I think flash on debian only supports x86 or x64 not arm. I know Gnash supports arm, but it doesn't cover new Flash.

Good luck and if you do get it to run let us know because that would be awesome.
 

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
The Flash port probably wouldnt work however, because it is debian linux, but it is still built off the Arm Eabi for Arm processors. I think flash on debian only supports x86 or x64 not arm. I know Gnash supports arm, but it doesn't cover new Flash.

Good luck and if you do get it to run let us know because that would be awesome.

Thanks for that information. And yes i will be including instruction for loading ldxe.
Also thanks for getting to that question from uber for me :)

Edit: i tried that debdroid a while back with no success. Its most likely my limited linux knowledge holding me back.
 

lgos

Well-known member
May 18, 2011
56
3
0
Visit site
Thanks for that information. And yes i will be including instruction for loading ldxe.
Also thanks for getting to that question from uber for me :)

Edit: i tried that debdroid a while back with no success. Its most likely my limited linux knowledge holding me back.
There are opensource flash alternatives for mozilla
 

trekkie1701c

Well-known member
Nov 29, 2010
273
34
0
Visit site
You know, I've always wanted to run a full version of Linux on my phone, but I didn't want to give up Android itself (desktop OS's don't translate well in to mobile OS's D: )

Going to have to start watching for deals on 32gb microSD cards now as well so I can actually run stuff, since this would put me low on space on there (I only have 4gb and I tend to go crazy on apps/programs).
 

uberjam545

Well-known member
Jan 20, 2011
323
13
0
Visit site
@uber-I would imagine so. This is the chroot to run an image of ubuntu(or debian) through VNC. Like a Virtual machine on Android.

This is a lot like the post in Roms and hacking about debroid only this one will probably have a GUI

The Flash port probably wouldnt work however, because it is debian linux, but it is still built off the Arm Eabi for Arm processors. I think flash on debian only supports x86 or x64 not arm. I know Gnash supports arm, but it doesn't cover new Flash.

Good luck and if you do get it to run let us know because that would be awesome.

cool i didn't relieze it was like virtual box but on android
 

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
I've been working with the install process all night... lets just say the linux installer is very picky along with installing lxde. I'm pretty sure i've figured out a standard way so people can negotiate the process with a high rate of success. Additionally in attempting to figure out all the kinks in the installer i lost my original build and i'm starting from scratch. No hulu tonight i bet, but the walkthrough is still on schedule.
 

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
updated part of it. there is alot of stuff to come. let me know if something is confusing. I would rather not to pictures as there is simply so much more i have to add.
 

captmeach7

Well-known member
Nov 28, 2010
218
23
0
Visit site
after you use linux installer to format to ext2 and copy the linux boot script to it you write that it will download and copy the packages needed for a linux install. If you were to mount this ext2 sdcard on linux perhaps you could make it into an img file so others wouldnt have to wait for it to work through that step and take hours. They could mount their card on linux and copy the img filesystem to it.
 
Last edited:

trekkie1701c

Well-known member
Nov 29, 2010
273
34
0
Visit site
Doesn't the Optimus tend to kill SD card with ext filesystems?

Also I did a bit of tinkering last night, managed to get it running without using Linux Installer at all... but only on a completely clean CM7 installation. Will do a bit more tinkering and see what happens :p

EDIT: Hmm... using the original instructions linked (to get it working on the Nexus One), it does work on a clean install (so you won't need two SD cards), but as soon as I do a titanium backup restore I start getting errors saying /bin/bash is not found and then it doesn't work at all :(

Have not tried your way yet, as I don't have a sufficiently large SD card as a spare at the moment :(
 
Last edited:

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
... but only on a completely clean CM7 installation.
That is the Key to make the installer work perfectly.
If its connected to wifi it goes much faster.

Last night I installed through Linux installer in less than 1 hour. It goes a lot faster once you figure out all the kinks :)
I'm not sure about the Optimus killing SD Cards.
Also you don't really need a second SD Card but you would probably need a pc near by with the files listed on the first card on standby if it messes up.

f you were to mount this ext2 sdcard on linux perhaps you could make it into an img file so others wouldnt have to wait for it to work through that step and take hours. .

I might be able to one up that :)
 
Last edited:

trekkie1701c

Well-known member
Nov 29, 2010
273
34
0
Visit site
Seems though if both methods require clean installations, the original method in the article you linked seems a lot faster and less complicated (you essentially just have to run two commands) - though I've spent more time (about an hour) trying to figure out why it doesn't work with apps installed than I have actually playing around with it.

And as I said, don't have any spare SD cards, can't figure out where I stashed the darn things ><
 

uamadman

Well-known member
Apr 14, 2011
48
7
0
Visit site
Seems though if both methods require clean installations, the original method in the article you linked seems a lot faster and less complicated (you essentially just have to run two commands) - though I've spent more time (about an hour) trying to figure out why it doesn't work with apps installed than I have actually playing around with it.

And as I said, don't have any spare SD cards, can't figure out where I stashed the darn things ><

Mine is just how to do it from scratch, with more custom ability and a verbose walk-through so ANYONE can do it :) And i think i'm just going to leave it that way. If some one wants to help and make a shorter way i'll be happy to append it to the post.
 

trekkie1701c

Well-known member
Nov 29, 2010
273
34
0
Visit site
Alright, did some more tinkering and just could not get the script to accept my new bash location (apparently it's in /system/xbin rather than /system/bin, but even changing the forward on the script, it still seems to expect it in /system/bin)

Just for the lols I typed /system/xbin in to the terminal... and got "localhost@ubuntu" as the response :D

Going to test out getting a GUI momentarily, and hopefully this will work with any other modifications to get flash working with it :D

(Edit: Hmm, seems that starts a command line saying it's in Ubuntu (so that's something), but it's not actually in the OS. Going to poke around a bit more :D Oh, and not trying to knock your work on this - I just want to get it working this way, for no other reason than "because.")
 
Last edited:

Forum statistics

Threads
943,134
Messages
6,917,446
Members
3,158,834
Latest member
Nikoczzzz