moar docs
[android-debian.git] / README
1 Introduction
2 ------------
3
4 These scripts are intended to ease the process of bootstrapping a Debian
5 chroot on an Android device. Instructions for installing such a chroot
6 may be found at:
7
8 http://www.steven-mcdonald.id.au/tutorials/debian_on_samsung_galaxy.shtml
9
10
11 Overview
12 --------
13
14 These scripts come in pairs; the ones under android/ are to be executed
15 in an Android environment, and the ones under debian/ get executed in a
16 chroot by the Android scripts.
17
18 These scripts are ready to roll if:
19
20 - your Debian chroot lives in /debian,
21 - you place the scripts under android/ in /data/local/bin/, and
22 - you place the scripts under debian/ in /debian/usr/local/sbin/.
23
24 If this is not the case, then you will need to modify these scripts to
25 work for you. Note that you will probably need to modify
26 debian/debian-init anyway, to specify which services you want to have
27 started automatically.
28
29
30 Starting Debian services at boot time
31 -------------------------------------
32
33 In order to run the debian-init script at boot time, you can add the
34 following to /system/etc/init.local.rc:
35
36 service debian /data/local/bin/debian-init
37     user root
38     group root
39
40 For some reason, Android's init won't start Debian if supplied with the
41 'oneshot' option, so do not use that.
42
43
44 Mounting Android file systems within the chroot
45 -----------------------------------------------
46
47 If you'd like to be able to manipulate Android's file systems from
48 Debian, you can bind-mount them under /debian/android/. The debian-init
49 script will do this for you, based on searching through the file system
50 tree under /debian/android/ looking for empty directories. Just create a
51 directory /debian/android/foo for each /foo in Android you want to be
52 mounted in this way, and debian-init will mount it appropriately at boot
53 time.
54
55
56 Using a Debian shell from an Android terminal emulator
57 ------------------------------------------------------
58
59 If you want your device's terminal emulator to default to using a shell
60 in a Debian environment, just use /data/local/bin/debian-sh as your
61 shell. This will su to root if you aren't already, chroot into Debian,
62 set some environment variables and then execute bash in a Debian
63 environment.