Thilo Fischer - 2014-08-20

Hello,

I started using LinuxOnAndroid on my tablet PC a while ago. I am using it mainly from the chroot environment of the shell currently, not via SSH or VNC. (IMHO opening a second shell and chrooting into the environment once more is more comfortable than opening a SSH client.) I created a shell script to easyly mount and unmount image files, chroot into the new environments and such. I'd like to contribure and share this script with you. The script is a basic "proof-of-concept" version yet. It already does everything (I think) I need, but does not yet provide all of the features of bootscript.sh/init.sh. If you like the approach and think it is worth it we could extend the script and maybe make it a substitute for bootscript.sh/init.sh.

You can find my script at https://github.com/thilo-fischer/LinuxOnAndroid-scripts. loa.sh is the main script which is called by the user directly and then invokes all the other scripts. I guess the code is commented enough and comprehensible enough that you can get the idea of how it works from reading the code if you start with the loa.sh file. (Anyway I will add some documentation of course if it turns out other people than me also find the script useful ...)

The main idea behind the script was to break down what bootscript.sh does to several modular pieces creating a flexible and highly configarable approach. You always run the script loa.sh to set up or tear down one of (optionally multiple configured) LoA root file systems, to open a chrooted shell or run a command in the chrooted environment. All the individual tasks will be delegated to subscripts which may be adapted for each LoA environment separately.

In my case, I found out that my Android system (probably the kernel) has a problem with filesystems mounted from an image file via a loop device. The system freezes pretty often when much operation on such file system is going on. Because of this, the LoA system I use productively does not run from an image file, but has all the files from the image file copied into a directory of the regular Android filesystem and chroots into that directory. I also use other LoA environments from image files for experiments and testing every now and then. My script provides flexibility to configure all those setups side by side and work with them easyly concurrently.

Looking forward for your feedback.

Regards

Thilo