Running Ubuntu Parallel to Android

Feb 19, 2011
1,971
284
0
Visit site
the bootubuntu script is similar in function.
there is a piece of it I'm going to cannibalize and absorb into mine, the part which checks for the existence of a directory before creating it.
let me know if my script gives you trouble and I'll try to help with it.

I forgot to mention, many of the chroot 'boot' methods I've looked at can't be politely shut down and require phone reboot to unmount. Mine (and it looks like your bootubuntu script as well if I'm reading it right,) can be exited and even run again afterwards without rebooting.

My eventual goal with this is to avoid the VNC viewer (another big slowdown for the chroot) and get access to the framebuffer device from linux. Android configures the fb device differently than X, and trying to use it as-is results in a blank screen. It doesn't lock up the phone, but no display without reboot.

@mmarz, you said in the first post that there was a problem with the soft keyboard? I haven't noticed any issues with mine except that I can't find a free 'full' keyboard for esc,ctrl,alt and F-keys.
The android-VNC-viewer I'm using (on google code , also an older version is in the market,) has them in the 'send keys' submenu, but I haven't gotten a soft keyboard with more than a ctrl key to use in the terminal.
(I added my 2 cents on the swype beta forum about special keys but they don't seem to care.)

The chroot method I'm using usually only seems to slow Android down if some CPU-intensive work is going on in the chroot, like building a package from source, running debootstrap, or something like that.
I'll wager the loop-mount is causing most of your system lag.
 
Last edited:

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Maybe it is just with my soft keyboard that it is not mapped correctly. I am using the SlideIt keyboard. It may not be free, but it has lots features including the arrow keys. Or maybe it is my Debian image. The tutorial I took that image from also noted the keys being mapped incorrectly. Would you mind sharing how you setup your Debian package?
 
Feb 19, 2011
1,971
284
0
Visit site
Maybe it is just with my soft keyboard that it is not mapped correctly. I am using the SlideIt keyboard. It may not be free, but it has lots features including the arrow keys. Or maybe it is my Debian image. The tutorial I took that image from also noted the keys being mapped incorrectly. Would you mind sharing how you setup your Debian package?
swype has arrow keys but they're hidden. I want more programmer keys, though.
I used debootstrap on my pc first, with the --foreign option since qemu won't run correctly on my old CPU.
then I ran a chroot on the phone, directly on the sdcard ext partition to complete the debootstrap --second-stage. The script for that chroot is simpler, since no directories get bound, just mounting the sd-ext partition and proc, sysfs, and devpts.
this was a major pain to get working since Android init doesn't use /dev/initctl but debootstrap expects it to be live. basically it ( debootstrap --second-stage ) locks up consistently at "I: configuring sysvinit"
(and a few other operations do the same thing.) A workaround is to create /dev/initctl yourself in the sd-ext partition, writing something to it before running debootstrap --second-stage and then when it hangs, reading from the chroot's /dev/initctl in another terminal instance often tricks the installer into thinking the node is live, and it continues.
Code:
mknod sd-ext/dev/initctl p
to create it, and
Code:
cat test > sd-ext/dev/initctl
to write to it (probably will lock up, close terminal or CTRL-C to break), and
Code:
cat /sd-ext/dev/initctl
to read from it to free debootstrap from its wait on init to respond, even though the cat command may lock up itself.

once debootstrap completes on the phone, exit the chroot. Then Saurik's instructions come back into play, copying /etc/resolv.conf from Android and so on. Then, copy Android's overlapping directories, and use the boot script I posted to run Debian and begin the apt-get marathon for a window manager, tightvncserver, and so on.
When I've got more time, maybe late tonight, I'll put up a full how-to thread starter, since I don't remember seeing many, if any (except for running linux natively INSTEAD of Android,) examples on the web which use my direct-mounted-partition method for chroot, although Saurik's is close (if only I had unionfs! but I don't want to bug AOSP for a kernel module, and haven't yet compiled my own kernel)
 
Last edited:
  • Like
Reactions: mmarz
Feb 19, 2011
1,971
284
0
Visit site
uploaded image

for whomever may be interested, when I began this I couldn't find a small, fresh debian filesystem image for download so I had to learn to use debootstrap.
to save hassle for the community, I have uploaded a base install, debootstrapped on my V, uploaded from my V with iceweasel in debian. no extra packages. you'll need to apt-get tightvncserver and a window manager unless you just want the bash shell. I like xfce4 it's relatively small but functional; lots of people seem to like matchbox wm, too.
it's ready to go once you copy over the extra files from Android's /etc /root /sbin and /sys directories.
(mount the extended partition with debian at /sd-ext first)
Code:
yes n | cp -aiv /etc/* /sd-ext/etc
 yes n | cp -aiv /root/* /sd-ext/root
 yes n | cp -aiv /sbin/* /sd-ext/sbin
 yes n | cp -aiv /sys/* /sd-ext/sys
resolv.conf and sources.list are already configured for 3g access and the main Debian repository, so it's pretty much plug-n-play.
here is the filesystem image
careful! use my script here at your own risk.
you can also chroot into the sd-ext directly, I'll post a script soon for you if you're worried about running in the root filesystem.
root password is root.
change it with
passwd
if you want.:cool:
 
Last edited:
  • Like
Reactions: JerryScript

lift3d

Active member
Mar 25, 2011
34
3
0
Visit site
for whomever may be interested, when I began this I couldn't find a small, fresh debian filesystem image for download so I had to learn to use debootstrap.
to save hassle for the community, I have uploaded a base install, debootstrapped on my V, uploaded from my V with iceweasel in debian. no extra packages. you'll need to apt-get tightvncserver and a window manager unless you just want the bash shell. I like xfce4 it's relatively small but functional; lots of people seem to like matchbox wm, too.
it's ready to go once you copy over the extra files from Android's /etc /root /sbin and /sys directories.
here
careful! use my script at your own risk.
you can also chroot into the sd-ext directly, I'll post a script soon for you if you're worried about running in the root filesystem.
root password is root.
change it with
passwd
if you want.:cool:

nice work, this based of squeeze or wheezy?

i prefer xfce4.8 over 4.6 and thats only in testing atm, unless it is pinned
 
Feb 19, 2011
1,971
284
0
Visit site
nice work, this based of squeeze or wheezy?

i prefer xfce4.8 over 4.6 and thats only in testing atm, unless it is pinned

if you modify sources.list to include backports, I think, you can get stuff from testing or unstable. You can also directly download the .deb and install with dpkg.
 

lift3d

Active member
Mar 25, 2011
34
3
0
Visit site
if you modify sources.list to include backports, I think, you can get stuff from testing or unstable. You can also directly download the .deb and install with dpkg.

4.8 is in testing, backports are only for stable. you would modify the source.list & preferences to pin testing/unstable/experimental

aside from that I was wondering if you ran into any issues? whats working whats not
 
Feb 19, 2011
1,971
284
0
Visit site
4.8 is in testing, backports are only for stable. you would modify the source.list & preferences to pin testing/unstable/experimental
oops, my bad. I should limit myself to what I've tested!
aside from that I was wondering if you ran into any issues? whats working whats not

I haven't noticed anything not working except chromium won't start (armv6 issue if I read the bug reports right)
and iceweasel freezes trying to watch flash videos with gnash (but the stupid thing plays adverts)
aedit: oh, yes, one big thing doesn't work. Xorg-video-fbdev produces a black screen when trying to directly run X from the terminal.
X works fine in the VNC, though.
Any hardcore gurus know how to make X get along with the Android framebuffer?
I've searched and searched but can't find much at all. Most efforts seem to be making Android work with the X framebuffer, not the other way around.
 
Last edited:

Forum statistics

Threads
943,143
Messages
6,917,487
Members
3,158,838
Latest member
akbarramadhani12