Differences between revisions 7 and 8
Revision 7 as of 2012-04-20 23:49:32
Size: 1582
Editor: ?NeilStockbridge
Comment:
Revision 8 as of 2012-04-21 01:01:40
Size: 2104
Editor: ?NeilStockbridge
Comment:
Deletions are marked like this. Additions are marked like this.
Line 38: Line 38:

This seems to work for me so far: Go to the Android root ( start `telnetd -l /system/xbin/bash` from Android if you wish to `telnet localhost` from your chrooted SSH), then:

{{{
mkdir /dev/bin
cp -a /system/bin/* /dev/bin/
cd /dev/bin/
mv app_process app_process.orig
ln -s sleep-forever app_process # have to compile sleep-forever first
mount -o bind /dev/bin /system/bin
killall zygote # actually killed the pid because I don't have killall yet
}}}

The display is now blank and hopefully ready for SDL.

Installing a Debian chroot on Android

This is an account of installing vanilla full-fat Debian squeeze in a chroot on Android.

This was tested on a Vodafone 845 ( a re-branded HuaWei u8120 / Joy / Ascend).

  • First, the phone was rooted by side-loading z4root

  • CyanogenMod 7.2.0-RC0 22b was flashed. This might not be necessary though

  • Set CPU to 710 MHz with the interactiveX governor. YMMV

  • Side-loaded SSHDroid
  • The SD card was formatted with the MBR scheme and a single ext3 partition was created. 15 sectors were left over

Then, on a workstation ( any architecture), insert the µSD card, and:

  sudo debootstrap --arch=armel --variant=minbase --foreign  squeeze  /media/PHONE\ CARD/squeeze  http://mirror.local:9999/debian

Then remove the µSD card and replace it in the phone, start SSHDroid and SSH to the phone, then:

  mount -o remount,exec,dev /mnt/sdcard/
  chroot /mnt/sdcard/squeeze/  /bin/bash -l
  debootstrap/debootstrap --second-stage

Then build up the Debian system as you normally would a minimal installation.

Many thanks to all the people whose hard work made it so trivial for me to install the environment I know and love on my phone.

Available memory

Android pre-loads applications ( in some case that the user has never started) when there is free memory. This reduces the memory available to applications in a chroot.

It looks like the *_MEM properties in /init.rc along with the /sys/module/lowmemorykiller/parameters/minfree might help.

This seems to work for me so far: Go to the Android root ( start telnetd -l /system/xbin/bash from Android if you wish to telnet localhost from your chrooted SSH), then:

mkdir /dev/bin
cp -a /system/bin/* /dev/bin/
cd /dev/bin/
mv app_process app_process.orig
ln -s sleep-forever app_process # have to compile sleep-forever first
mount -o bind /dev/bin /system/bin
killall zygote # actually killed the pid because I don't have killall yet

The display is now blank and hopefully ready for SDL.