Page 1 of 5 12345 LastLast
Results 1 to 15 of 61
  1. #1
    offline 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:

    mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
    I created a /system/debian folder, then I mounted the Debian partition:
    mount -t ext2 -o noatime /dev/block/vold/179:2 /system/debian
    I chrooted into this partition with:
    chroot /system/debian
    And I'm sitting at a bash prompt.

    I copied a few of the steps from the G1 tutorial:
    echo 'deb http://ftp.de.debian.org/debian lenny main' >/etc/apt/sources.list

    echo 'nameserver 4.2.2.2' >/etc/resolv.conf
    Then I manually exported my path variable:
    PATH='/bin:/sbin:/usr/sbin:/usr/bin'
    export PATH
    Updated my package list with:

    apt-get update
    And mounted some necessary system folders with:
    mount -t devpts devpts /dev/pts
    mount -t proc proc /proc
    mount -t sysfs sysfs /sys
    And I can now install packages.

    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:
    #!/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
    Make sure you chmod 700 the script.

    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:

    chroot /system/debian
    /root/fixdeb
    I think I should be theoretically able to do a

    chroot /system/debian /root/fixdeb
    But for some reason it does not seem to work.

    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. 2 Users Say Thank You to keenerb For This Useful Post

    lioks (04-13-2010), Nagual2012 (02-01-2010)

  3. #2
    nEx.Software's Avatar
    offline So I Hear You Can Mod
    Join Date
    Nov 2009
    Posts
    349
    Thanks
    24
    Thanked 245 Times in 100 Posts
    Downloads
    33
    Uploads
    0
    Cool. Now, if I only understood what the point of doing this was. How does doing something like this benefit you? Honestly curious.

  4. #3
    offline Of Mice and Modders
    Join Date
    Dec 2009
    Posts
    91
    Thanks
    2
    Thanked 22 Times in 19 Posts
    Downloads
    9
    Uploads
    0
    Quote Originally Posted by nEx.Software View Post
    Cool. Now, if I only understood what the point of doing this was. How does doing something like this benefit you? Honestly curious.
    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.

  5. #4
    nEx.Software's Avatar
    offline So I Hear You Can Mod
    Join Date
    Nov 2009
    Posts
    349
    Thanks
    24
    Thanked 245 Times in 100 Posts
    Downloads
    33
    Uploads
    0
    Quote Originally Posted by keenerb View Post
    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.
    Interesting, and cool from a theory standpoint. You'll have to let me know what you end up doing with it, if anything.

  6. #5
    Danation's Avatar
    offline public static final boolean isEvil() { return true; }
    Join Date
    Oct 2008
    Posts
    6,880
    Thanks
    4,383
    Thanked 3,384 Times in 2,117 Posts
    Downloads
    3
    Uploads
    0
    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.

  7. #6
    offline 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

  8. #7
    offline Of Mice and Modders
    Join Date
    Dec 2009
    Posts
    91
    Thanks
    2
    Thanked 22 Times in 19 Posts
    Downloads
    9
    Uploads
    0
    Quote Originally Posted by slaapliedje View Post
    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
    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

  9. #8
    LordBoreal51's Avatar
    offline Itty Bitty Modder
    Join Date
    Dec 2009
    Posts
    12
    Thanks
    0
    Thanked 1 Time in 1 Post
    Downloads
    5
    Uploads
    0
    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....

  10. #9
    offline Of Mice and Modders
    Join Date
    Dec 2009
    Posts
    91
    Thanks
    2
    Thanked 22 Times in 19 Posts
    Downloads
    9
    Uploads
    0
    Quote Originally Posted by LordBoreal51 View Post
    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....
    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.

  11. #10
    offline 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. #11
    offline Of Mice and Modders
    Join Date
    Dec 2009
    Posts
    91
    Thanks
    2
    Thanked 22 Times in 19 Posts
    Downloads
    9
    Uploads
    0
    Quote Originally Posted by slaapliedje View Post
    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
    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

  13. The Following User Says Thank You to keenerb For This Useful Post:

    Danation (12-31-2009)

  14. #12
    offline 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

  15. #13
    offline Of Mice and Modders
    Join Date
    Dec 2009
    Posts
    91
    Thanks
    2
    Thanked 22 Times in 19 Posts
    Downloads
    9
    Uploads
    0
    Quote Originally Posted by deprav3d View Post
    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
    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.

  16. The Following User Says Thank You to keenerb For This Useful Post:

    Danation (12-31-2009)

  17. #14
    Danation's Avatar
    offline public static final boolean isEvil() { return true; }
    Join Date
    Oct 2008
    Posts
    6,880
    Thanks
    4,383
    Thanked 3,384 Times in 2,117 Posts
    Downloads
    3
    Uploads
    0
    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.

  18. #15
    offline 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.

  19. The Following User Says Thank You to keenerb For This Useful Post:

    Danation (12-31-2009)

Page 1 of 5 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •