Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
teh5abiking
Old
(Last edited by teh5abiking; 9th June 2011 at 06:15 PM.)
#1  
Member - OP
Thanks Meter 36
Posts: 94
Join Date: Feb 2011
Location: New York, NY
Post [Guide] How to get Karmic Koala on your HTC Vision

So, for all of you guys down here that are Debian junkies, then you're gonna love this. I managed to get Ubuntu Karmic Koala on my G2 after a bit of messing around with adb. This is my first tutorial on xda-developers, so please tell me how I'm doing. Remember to hit the Thanks button at the bottom if you're satisfied

Code:
#Your warranty has been voided
#I am not the cause of any damage done to your device
#Should you accuse me, I will laugh at you
Reasons why you should follow this tutorial:

- It allows you to make use wide array of applications available in Debian/Ubuntu's repos.
- It doesn't overwrite the current Android operating system.
- It'll allow you to turn your G2, Desire Z, etc. into more than just a sub-par cellphone.
- If you're developing software/applications, this will give you the proper environment for you test them on, if you don't care for Virtualbox or don't have access to a computer at the current moment.
- This tutorial will make the best use of Android and Linux's open-source nature.

Please note that this DOES NOT replace Android nor is it a port of Ubuntu/Debian. Ubuntu/Debian support ARM EABI which is the underlying architecture of Android.

READ EVERYTHING BEFORE DOING ANYTHING. I KNOW IT'S LONG, I WROTE THIS TUTORIAL

For those of you that can't use, can't set it up, or don't care for adb, you can still get Ubuntu to work on your device using a Terminal Emulator app, but you're probably gonna be stuck at the command line. I haven't actually tried setting up the GUI using the Terminal, so I'm not 100% sure. Now, before I start the tutorial, you NEED to be rooted.

NOTE: Whenever you see a $ or a # sign, those are indicators for the next command. Please do not enter them as you're typing in the commands. The same goes for the "root@localhost:/#" sign.

Before we begin we will need the following:

On your phone, have the following installed and/or readily available
-androidVNC application
-Terminal Emulator app (use this to boot into Ubuntu shell)
-Busybox (preferably, the latest one. If you rooted your phone using the method on the xda wiki OR your custom ROM has it pre-installed, then continue)
- At least 2GB space free on your microSD card
- Loopdevice support for your ROM. I think Cyanogen and another kernel should do the trick.

On your computer have the following installed and/or on the desktop:
-Ubuntu Karmic Koala image. If you don't have it, download it from this link ->http://bit.ly/moghJ3
-adb installed and fully functioning on your computer

EDIT 4 June, 2011: For those of you having troubles getting the shell to boot up, I found an alternative bootubuntu file. Extract it and replace the one that comes with the image with this one http://bit.ly/j7zORF

Let's begin, shall we?

Step 1: Connect your phone to your computer. Make sure you have "USB Debugging" checked off in "Settings -> Applications -> Development", then mount your sd card.

Step 2: Transfer the extracted "ubuntu" folder to the root of your sd card [NOT IN ANY FOLDERS, JUST the sd card itself, for those of you who don't know]. It might take a few minutes, so you might wanna make yourself a little snack for the wait.

Step 3: When the file transfer is done, disable the USB connection, so we can make use of adb. This is where USB Debugging is CRUCIAL. Open up a command window/terminal, go to where adb is located and enter the following commands:
Code:
$ adb shell
$ cd /sdcard/ubuntu
# su
# sh ./ubuntu.sh
# bootubuntu
At this point, you've set up the Ubuntu shell, as indicated by the "root@localhost:/#" sign.

However, our shell is still incomplete. We're gonna need a GUI for actual usage. If you're fine with using the command line then stop here. If you want to give yourself a PC-like experience, then please continue. You might wanna connect to WiFi if you're in an area where your mobile data is inconsistent or restricted to an EDGE connection.

Step 4: With the command prompt/terminal window that contains your adb/ubuntu shell, let's continue entering some commands to get our GUI set up.
Code:
root@localhost:/# apt-get update
root@localhost:/# apt-get install tightvncserver
root@localhost:/# apt-get install lxde
root@localhost:/# export USER=root
root@localhost:/# vncserver -geometry 1024x800
After entering the last command, you'll be prompted to enter a password. It'll ask you to set up a second one, just press "n" then continue.

For the second and third commands, press "y" when prompted to then hit ENTER, so you can install the packages. The reason why we set the VNC server's resolution is because even though the G2/Dz's resolution is 800x480, a higher resolution will provide a better viewing experience. If you want it set up to your phone's resolution, then swap it with "800x480" to scale the server's resolution to your phone's screen size.

Step 5: Enter the following commands. After entering the first command, you'll notice there's no user indicator at the left side. DON'T PANIC. Just continue entering the following commands:
Code:
root@localhost:# cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Then, press Ctrl+D twice and press enter. You'll be back at "root@localhost:/#" (Conversely, if you're on Mac OS or Linux, just press Ctrl+D once)

Step 6: Go to your phone, and open up the androidVNC app. We're gonna need this to view our desktop. set the nickname to "root" and enter the password you set earlier. Set the port to "5901" and press connect.

Step 7a: And bam! You've got your own cool GNOME desktop! (Though in my experience, it switches over to lxde after a few uses.) Now, we need to get the VNC app to open up every time we boot into our shell. We need to enter a few more commands (yeah I know, it's getting a bit tedious at this point.)
Code:
root@localhost:/# cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×800
Again, you can replace "1024x800" with any screen resolution you desire.

Step 7b: Enter just a few more commands [trust me, we're almost done ]
Code:
root@localhost:/# cat front /root/.bashrc > temp
root@localhost:/# cp temp /root/.bashrc
Step 8: To check that everything is working, enter the following commands in your command prompt/terminal window that contains our adb/ubuntu shell that I hope you kept open all this time.

Code:
root@localhost:/# exit
# bootubuntu
And you're done! Give yourself a round of applause and a pat on the back, because now you have Ubuntu Linux running alongside Android. Yay!!!!!!

To boot into your shell AFTER you're done, use the Terminal Emulator app to access your shell:
Code:
$ su
# bootubuntu
That's it, you're finished.


Now, I don't know why this happens, but after rebooting your phone, it'll take a few extra seconds for your devices to start up. I think it's because of all the files that are in the phone's internal memory. I'm not sure. Also, the VNC server might not open up after you're done with the tutorial. It's only a minor setback, you can still manually open it yourself which is in itself relatively quick.

When you're done with the tutorial, be sure to type in "exit" in the terminal and press enter for a clean kill of Ubuntu. Otherwise, you're gonna have to redo the entire procedure.


If you have any questions, please email me at teh5abiking@gmail.com




FAQ

- I don't have adb, can I still follow this tutorial?
A: Yes you can. However, you're probably going to be stuck at Step 3 with the command line. You can still use the shell, but you won't have a GUI.

- Why does my phone show a black screen after rebooting?
A: It's probably because of all the modding that's a result of the commands we entered.
Don't worry, Your phone will boot up normally. However, if this goes on longer than usual, you might have to install a different ROM. I've tested it on CM7 (Stable and Nightly), Stock G2 ROM, Virtuous 1.0.2, Virtuous G-Lite 1.0.2, and their respective ROM bases with no problems.

- I get an error that won't let me boot into the Ubuntu shell. Help me!!!!!
A: Yeah, you probably either downloaded an incomplete image OR you entered an important command wrong. I suggest deleting the ubuntu image from your sdcard and then copy the image you extracted onto your sdcard. Then what you have to do is redo the entire tutorial.
The Following 5 Users Say Thank You to teh5abiking For This Useful Post: [ Click to Expand ]
 
Spastic909
Old
#2  
Spastic909's Avatar
Senior Member
Thanks Meter 180
Posts: 1,689
Join Date: Dec 2010
Interesting...

Sent from my T-Mobile G2 using XDA Premium App
 
teh5abiking
Old
#3  
Member - OP
Thanks Meter 36
Posts: 94
Join Date: Feb 2011
Location: New York, NY
Quote:
Originally Posted by Spastic909 View Post
Interesting...

Sent from my T-Mobile G2 using XDA Premium App
What's interesting about this?
teh5abiking, @ your service
Former G2/DZ developer, currently and indefinitely retired
 
xsteven77x
Old
(Last edited by xsteven77x; 29th May 2011 at 04:47 AM.)
#4  
xsteven77x's Avatar
Senior Member
Thanks Meter 704
Posts: 3,165
Join Date: Jul 2010
Location: Pittsburgh
Edit: can't wait to try this!
 
teh5abiking
Old
#5  
Member - OP
Thanks Meter 36
Posts: 94
Join Date: Feb 2011
Location: New York, NY
Ouch. . .
It's my first tutorial. . .

I just want to know what he found interesting about this tutorial. No need to get so defensive over a comment some other guy made.

Sent from my T-Mobile G2 using XDA Premium App
teh5abiking, @ your service
Former G2/DZ developer, currently and indefinitely retired
 
xsteven77x
Old
#6  
xsteven77x's Avatar
Senior Member
Thanks Meter 704
Posts: 3,165
Join Date: Jul 2010
Location: Pittsburgh
Didn't mean any offense dude especially if you weren't trying to be rude. You know how the internet doesn't portray emotion very well in text. Just sounded snappy. Back on topic. Can't wait to try this!

Sent from my HTC Vision using XDA Premium App
The Following User Says Thank You to xsteven77x For This Useful Post: [ Click to Expand ]
 
ohshootrawr
Old
#7  
ohshootrawr's Avatar
Senior Member
Thanks Meter 66
Posts: 422
Join Date: Dec 2010
Location: Ewa Beach
I'm not much of a software junky, so what exactly would this do? It looks easy enough to accomplish, since most of it is done through terminal, but I kinda wanna know what this DOES xD

Sent from my HTC Vision using XDA Premium App
 
teh5abiking
Old
(Last edited by teh5abiking; 29th May 2011 at 05:05 AM.)
#8  
Member - OP
Thanks Meter 36
Posts: 94
Join Date: Feb 2011
Location: New York, NY
Quote:
Originally Posted by xsteven77x View Post
Didn't mean any offense dude especially if you weren't trying to be rude. You know how the internet doesn't portray emotion very well in text. Just sounded snappy. Back on topic. Can't wait to try this!

Sent from my HTC Vision using XDA Premium App
Edit: Remember to hit that thanks button!
teh5abiking, @ your service
Former G2/DZ developer, currently and indefinitely retired
 
teh5abiking
Old
#9  
Member - OP
Thanks Meter 36
Posts: 94
Join Date: Feb 2011
Location: New York, NY
Quote:
Originally Posted by ohshootrawr View Post
I'm not much of a software junky, so what exactly would this do? It looks easy enough to accomplish, since most of it is done through terminal, but I kinda wanna know what this DOES xD

Sent from my HTC Vision using XDA Premium App
Well, Ubuntu is a distribution of the Debian family of Linux.


Essentially, you have access to the plethora of apps that exist in Ubuntu/Debian's repos, and it's also possible to use this shell as a test monkey for applications that you might be developing.
teh5abiking, @ your service
Former G2/DZ developer, currently and indefinitely retired
The Following 2 Users Say Thank You to teh5abiking For This Useful Post: [ Click to Expand ]
 
Visi0nofExcellence2
Old
#10  
Senior Member
Thanks Meter 25
Posts: 474
Join Date: Dec 2010
Any idea if this will work with the new Ubuntu 11.04? Though I do hate the new layout

The Following User Says Thank You to Visi0nofExcellence2 For This Useful Post: [ Click to Expand ]
 
Post Reply+
Tags
adb, debian, root, superuser, ubuntu
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...