Thread: Successful Debian chroot on Cliq
- 12-30-2009, 09:28 AM #1
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
Successful Debian chroot on Cliq
I'm chrooted into a debian install right now. Everything seems fully functional at this point. USB mounting also appears to work, but under my Linux install it also mounts the ext2 partition which worries me quite a bit!
Here's what I did, more or less:
Rooted my phone with TheDude's rom.
Mounted 2gb SD card under linux, created a 1.2GB fat32 partition #1, and an 800MB ext2 partition #2.
I mounted the debian .img file from the G1 tutorial and copied all the folders over to the EXT2 partition.
I re-mounted the /system partition read-write via this command in an ADB shell:
I created a /system/debian folder, then I mounted the Debian partition:mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
I chrooted into this partition with:mount -t ext2 -o noatime /dev/block/vold/179:2 /system/debian
And I'm sitting at a bash prompt.chroot /system/debian
I copied a few of the steps from the G1 tutorial:
Then I manually exported my path variable:echo 'deb http://ftp.de.debian.org/debian lenny main' >/etc/apt/sources.list
echo 'nameserver 4.2.2.2' >/etc/resolv.conf
Updated my package list with:PATH='/bin:/sbin:/usr/sbin:/usr/bin'
export PATHAnd mounted some necessary system folders with:
apt-get update
And I can now install packages.mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
I created a BASH script named fixdeb in /root to take care of a lot of these steps after the initial chroot, with contents of:
Make sure you chmod 700 the script.#!/bin/bash
export PATH='/bin:/sbin:/usr/bin:/usr/sbin'
export HOME=/root
export USER=/root
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
/etc/init.d/dropbear start
Now that the initial config is done, to bring the chroot back up (after, say, a phone reboot) I have to perform the following steps:
From a root console or ADB shell:
I think I should be theoretically able to do achroot /system/debian
/root/fixdeb
But for some reason it does not seem to work.chroot /system/debian /root/fixdeb
At this point you've got a Debian chroot you can ssh into from a terminal client like Connectbot and beat on to your heart's content. You can install icewm and tightvnc, and use AndroidVNC to connect to the VNC server and it feels like you're running Debian natively.Last edited by keenerb; 12-31-2009 at 09:00 AM.
-
2 Users Say Thank You to keenerb For This Useful Post
lioks (04-13-2010), Nagual2012 (02-01-2010)
- 12-30-2009, 09:55 AM #2
Cool. Now, if I only understood what the point of doing this was. How does doing something like this benefit you? Honestly curious.
- 12-30-2009, 10:08 AM #3
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
Nobody ever told me there was supposed to be a benefit...
In seriousness, though, it opens 99% of standard Debian apps to run either via SSH (which I have working now) or via VNC (which I'm working on.)
Theoretically you could run full ARM binaries of Openoffice and Firefox this way.
- 12-30-2009, 10:21 AM #4
- 12-30-2009, 12:02 PM #5
That does sound very interesting. Post your results

I'm gonna move this to the development subforum.
_.__.__._I have retired. If you PM me, I may not reply.
- 12-30-2009, 12:18 PM #6
Itty Bitty Modder
- Join Date
- May 2008
- Posts
- 6
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Downloads
- 10
- Uploads
- 0
Emulators!!! Well, that's what I'm going to be using it for. There are still quite a few emulators that are missing from Android (namely any Atari platforms, I mean come on, Stella (Atari 2600) isn't ported yet?)
Not to mention a huge plethora of apps. The only things I can think of that wouldn't be in ARM would be things like Flash, etc that aren't open source. Basically it'd turn your phone into a mini netbook with Linux. Terribly awesome.
Looking at the normal howto, you need to have the ext2.ko and unionfs.ko, did you compile these and can you post them? I am dying to do this, especially since I just bought a 16gb SD card for this very purpose.
slaapliedje
- 12-30-2009, 01:27 PM #7
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
No unionfs or ext2 compilation necessary. Other than using a linux box to partition, format, and otherwise prepare the SD card everything I needed is in TheDude's rooted rom.
I've now installed tightvnc and started a server with ICEWM, and have a full X11 desktop. Not many apps installed though.
Installing iceweasel (firefox) right now...
Xcalc runs.
Not sure about emulators. I don't think sound will work, and it IS pretty slow...
Here's the VNC debian chroot as seen from my PC using ADB to forward port 5109 to the Cliq.

Here's Firefox (well, Iceweasel) running on the Cliq:

Mother of god is it slow though...Last edited by keenerb; 12-30-2009 at 01:36 PM. Reason: Automerged Doublepost
- 12-30-2009, 01:32 PM #8
Hmmm... I get can chroot in, but apt-get doesn't seem to work. I followed the steps you listed, but something is up.
Which Debian image did you use? I know there a few different ones floating around for the G1....
- 12-30-2009, 01:41 PM #9
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
My instructions may, in fact, suck. It's entirely possible.
Apt-get is in /usr/bin, so make sure you export that as part of your path.
My full path now is
PATH="/bin:/sbin:/usr/sbin:/usr/bin"
Once you reboot this will continue to work with /system mounted read-only.Last edited by keenerb; 12-30-2009 at 01:59 PM.
- 12-31-2009, 06:30 AM #10
Itty Bitty Modder
- Join Date
- May 2008
- Posts
- 6
- Thanks
- 0
- Thanked 1 Time in 1 Post
- Downloads
- 10
- Uploads
- 0
Path can be defined globally in /etc/profile and can also be defined per user in their .bash_profile. After making any changes to either of these, you'll want to run 'source /etc/profile' or 'source .bash_profile' depending on if you run as root or normal user.
Is the image set up as only root by default?
slaapliedje
- 12-31-2009, 08:04 AM #11
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
The initial chroot environment is root-only by default.
Adduser works normally, so I added a non-root user and started the ssh server in the initial chroot jail, and then use ssh which sets all environment variables properly.
I'd also recommend running dropbear instead of openssh server. Easier on memory.
New screenshots:
Running ICEWM, Xcalc, Nethack:

Running Telengard in Dosbox:
Last edited by keenerb; 12-31-2009 at 08:04 AM. Reason: Automerged Doublepost
-
The Following User Says Thank You to keenerb For This Useful Post:
Danation (12-31-2009)
- 12-31-2009, 11:29 AM #12
Itty Bitty Modder
- Join Date
- Dec 2009
- Posts
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Downloads
- 3
- Uploads
- 0
This may seem like some-what of a noobish question, but when you chroot to a Debian distro. can you still receive and make phone call and sms messages? im assuming not for the fact its no longer supporting the original OS, but im just curious
- 12-31-2009, 11:56 AM #13
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
Absolutely you can. This is NOT replacing the Android OS, it's running alongside the Android OS (behind the scenes, as it were.)
You actually use an Android app to view the desktop via VNC.
Everything Android is, and everything Android does is fully accessible at all times.
-
The Following User Says Thank You to keenerb For This Useful Post:
Danation (12-31-2009)
- 12-31-2009, 12:59 PM #14
That's good to know, right there. I was wondering that as well.
I'm assuming since you use an Android app to VNC into it, the touchscreen and keyboard work as well?
_.__.__._I have retired. If you PM me, I may not reply.
- 12-31-2009, 01:03 PM #15
Of Mice and Modders
- Join Date
- Dec 2009
- Posts
- 91
- Thanks
- 2
- Thanked 22 Times in 19 Posts
- Downloads
- 9
- Uploads
- 0
Yes, touchscreen and keyboard work perfectly.
Hitting the Home button takes you to the Android home screen, if a call comes in it'll pop up the phone app over the VNC session, etc. etc.
-
The Following User Says Thank You to keenerb For This Useful Post:
Danation (12-31-2009)


LinkBack URL
About LinkBacks
Reply With Quote


