Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Installing Debian Squeeze on Android Optimus - Walkthrough

OP uamadman

18th June 2011, 10:03 PM   |  #1  
OP Junior Member
Flag Think Rockets
Thanks Meter: 6
 
19 posts
Join Date:Joined: Apr 2011
More
Installing Debian Squeeze on Android Optimus S - Walk-throughs

This is slowly becoming a larger topic. So for now i will post various ways proven to work on the Optimus S and V as links below:

Installing Debian Squeeze on Android Optimus - Walk-through Compiled by uamadman
Install Debian Squeeze - non-loop sd-ext chroot method (prebuilt!) By bigsupersquid
ALL-Thumbs GUI to replace LXDE By bigsupersquid
4 Steps to Linux on your Optimus S - written by uamadman hosted by uamadman
Last edited by uamadman; 22nd June 2011 at 10:13 AM.
The Following 3 Users Say Thank You to uamadman For This Useful Post: [ View ]
18th June 2011, 10:09 PM   |  #2  
OP Junior Member
Flag Think Rockets
Thanks Meter: 6
 
19 posts
Join Date:Joined: Apr 2011
More
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 by uamadman; 22nd June 2011 at 10:26 AM.
The Following User Says Thank You to uamadman For This Useful Post: [ View ]
18th June 2011, 11:29 PM   |  #3  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 432
 
693 posts
Join Date:Joined: Sep 2010
Donate to Me
More
I have been running a Debian chroot on my optimus V for a few months now, squeeze and sid both work fine. I did it manually without the stuff from the market, and I use the sd-ext partition instead of a loop file
per your GUI issues:
I like xfce4 better than lxde on my optimus V.
Code:
apt-get install xfce4 xfce4-goodies
instead of lxde.
oh, also, the OP pointed out to me that
Code:
apt-get install xfce4-goodies
alone will also pull down xfce4 as a dependency (and that I left out the word install which is now corrected.)

modify the /root/.vnc/xstartup accordingly.
replace
Code:
icewm&
lxsession
with
Code:
xfce4-session&
or, you can cut-and paste my complete file here:
Code:
echo "#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
xfce4-session&" > /root/.vnc/xstartup
I have modified a theme for xfce to be more finger-friendly.

see attachment
decompress that file, it contains a folder, Xfce_large.
place the folder in /usr/share/themes
tap on the rat in the lower-left of the desktop (opens menu)
select Settings by tapping its arrow (xfce is twitchy about the menu through the VNC, it may take a few tries to select items on the main menu.)
select Appearance. Then Style.
Scroll down to Xfce_large and tap it, then tap Close at the bottom.
Voila, oversized scrollbars and menu bar buttons!

If you don't like the size, the settings I modified are in the gtk-2.0 subfolder of Xfce_large in the file gtkrc
the modified settings are not tabbed over like the rest of the settings in the file.

I also changed the default font size, icon size, icon font size, and DPI settings, but that has to be done in the settings menus.

The optimus display is about 120 DPI, the default is 75. 120 looks much nicer I think.
Attached Files
File Type: tar Xfce_large.tar - [Click for QR Code] (150.0 KB, 92 views)
Last edited by bigsupersquid; 22nd June 2011 at 01:23 PM. Reason: added attachment & instruction; add complete xstartup file; improve xstartup file for cut-and-paste into shell; clarification
The Following User Says Thank You to bigsupersquid For This Useful Post: [ View ]
19th June 2011, 12:19 AM   |  #4  
OP Junior Member
Flag Think Rockets
Thanks Meter: 6
 
19 posts
Join Date:Joined: Apr 2011
More
You are awesome
The Following User Says Thank You to uamadman For This Useful Post: [ View ]
19th June 2011, 12:48 AM   |  #5  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 432
 
693 posts
Join Date:Joined: Sep 2010
Donate to Me
More
good luck with flash. gnash only plays ads on my V, not whole videos.

get-flash-videos from google code works nicely, but it's a capture utility.

it does try to play with mplayer, but only shows a couple of frames per few seconds because the VNC display method of manually copying the framebuffer is very slow.

using a bandwidth meter (debian package cbm to be exact) the vnc uses from 14 to 80Kb per second of system bandwith on device l0.

I don't know what's pegging your CPU use, mine only tops out when the debian system is doing something. I built my chroot with debootstrap instead of using the market installer, no telling what is preinstalled on the image it downloads.
19th June 2011, 05:54 AM   |  #6  
OP Junior Member
Flag Think Rockets
Thanks Meter: 6
 
19 posts
Join Date:Joined: Apr 2011
More
I am going to try this out once i'm finished trying to get the ubuntu side of the house working.

Can I append this to my post here and androidcentral with proper credits due to you so all may share?
19th June 2011, 06:22 AM   |  #7  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 432
 
693 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Quote:
Originally Posted by uamadman

...Can I append this to my post here and androidcentral with proper credits due to you so all may share?

certainly. just test the instructions for functionality before adding them in.
I considered starting a thread on this myself but never got around to it.

I'll continue to contribute info as this develops.

as an extra, here's a link I've posted, a few places on both forums, with a clean debootstrapped debian filesystem, tarred up to shrink it for download.
I goofed a bit when compressing it though, when decompressed it's a single folder containing the filesystem.
http://www.4shared.com/file/iWuUtZgS...5_2011tar.html
uncompressed, 9645 items, totalling 264.3 MB
compressed, 116.3 MB (121929580 Bytes)
this will either need the contents of the freshsqueeze folder it contains copied to an ext2 (or ext3/ext4 if you want to brave the damage from journalling on a SD card, which seemed to cause corruption when I tried ext4) partition on your SD card, or, copied into a blank loop ext filesystem if you prefer.
with an empty debian img file mounted as a loop filesystem on a linux box, you can copy everything from the freshsqueeze folder to the loop filesystem by:
Code:
cp -av /path/to/freshsqueeze/* /path/to/loopmountedimg
the loop filesystem method should allow you to continue using your startup scripts as-is, they'll need slight modifications to work with an ext partition like I'm using.
its resolv.conf and sources.list are already configured for 3g access and the main Debian repository, so it's pretty much plug-n-play. no extra packages are installed, you'll need to apt-get tightvncserver and a window manager of your choice, unless you just want the bash shell.
the first time you chroot in, you should use passwd to set a root password, and adduser to get a non-root account on there.
this is not a loop filesystem like what you are using. it is a full directory tree of a base squeeze install.
Last edited by bigsupersquid; 19th June 2011 at 06:59 AM. Reason: clarifications
19th June 2011, 10:45 PM   |  #8  
ummkiper's Avatar
Senior Member
Flag Lake Dallas,TX
Thanks Meter: 41
 
583 posts
Join Date:Joined: Jun 2009
More
I would like to see this on the V.its my only phone right now.if I had 2 I would try it.

Sent from my BumbleV using XDA Premium App.
20th June 2011, 12:34 AM   |  #9  
bigsupersquid's Avatar
Senior Member
Flag BFE, MO
Thanks Meter: 432
 
693 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Quote:
Originally Posted by ummkiper

I would like to see this on the V.its my only phone right now.if I had 2 I would try it.

Sent from my BumbleV using XDA Premium App.

I don't think a chroot can hurt your phone. I even run mine bind-mounted into the root filesystem, with system r/w, and haven't ever had any problems a reboot didn't solve. and it's been since April since I had a forced reboot from running stuff in debian.

now, I don't know about the installer from the market, if it asks for root access multiple times, I'm not sure just what it's doing. I'll post my sd-ext startup script and instructions for using it here after dinner if you want to try it that way instead of with the installer app.
honestly, it's a much simpler process than the OP, but, hey, if it works, I'm not one to dismiss the method out-of-hand.
The Following User Says Thank You to bigsupersquid For This Useful Post: [ View ]
20th June 2011, 12:37 AM   |  #10  
ummkiper's Avatar
Senior Member
Flag Lake Dallas,TX
Thanks Meter: 41
 
583 posts
Join Date:Joined: Jun 2009
More
Quote:
Originally Posted by bigsupersquid

I don't think a chroot can hurt your phone. I even run mine bind-mounted into the root filesystem, with system r/w, and haven't ever had any problems a reboot didn't solve. and it's been since April since I had a forced reboot from running stuff in debian.

now, I don't know about the installer from the market, if it asks for root access multiple times, I'm not sure just what it's doing. I'll post my sd-ext startup script and instructions for using it here after dinner if you want to try it that way instead of with the installer app.
honestly, it's a much simpler process than the OP, but, hey, if it works, I'm not one to dismiss the method out-of-hand.

Sounds good to me.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes