Chroot and systemd-nspawn rootfs installer
Find a file
JeremyStarTM 3f0f0e0113 Update code
CHANGES
- [androot.sh] Improve code quality
- [androot.sh] Modify DOWNLOADSERVER* variables
- [patch.sh] Implement rootfs patching
- [prepare.sh] Squashed bugs
- [rootfsbuilder/archlinux-x86_64.sh] Remove "copy pacman config" flag causing some issues
- [systeminstall.sh] Implement rootfs configuration and update script

BUGS
- [systeminstall.sh|patch.sh] Scripts only work on the same architecture as the host
2023-11-10 15:08:35 +01:00
rootfsbuilder Update code 2023-11-10 15:08:35 +01:00
androot.sh Update code 2023-11-10 15:08:35 +01:00
bootscriptdl.sh Update code 2023-11-10 15:08:35 +01:00
Makefile Improve code quality 2023-11-08 19:47:37 +01:00
mount.sh Update code 2023-11-10 15:08:35 +01:00
patch.sh Update code 2023-11-10 15:08:35 +01:00
prepare.sh Update code 2023-11-10 15:08:35 +01:00
README.md Update code 2023-11-10 15:08:35 +01:00
rootfsinstall.sh Update code 2023-11-10 15:08:35 +01:00
systeminstall.sh Update code 2023-11-10 15:08:35 +01:00

androot

Chroot and systemd-nspawn rootfs installer

Experimental

androot is experimental software and can lead to breakage!
Only run these scripts with extensive knowledge of Linux (and Android if using Termux)!

How to use

Termux

WARNING

If you want to use androot under Android you need a working Magisk or KernelSU installation.
If you wish to install a (more limited) Linux distribution without root access use Andronix instead.

Dependencies

Use

curl -sSL "https://git.staropensource.de/StarOpenSource/androot/raw/branch/master/androot.sh"|sudo bash - --download

Linux

Dependencies

  • curl
  • bash
  • chroot/systemd-nspawn
  • bsdtar

Use

curl -sSL "https://git.staropensource.de/StarOpenSource/androot/raw/branch/master/androot.sh"|sudo bash - --download

Architectures

Supported (target architectures)

  • x86_64 (amd64)
  • arm64 (aarch64)

Supported (execution architectures)

  • x86_64 (amd64)
  • arm64 (aarch64)
  • powerpc64 (ppc64,ppc64le)
  • mips64

Unsupported

  • x86 (i386,i686)
  • arm
  • powerpc (ppc,ppcle)
  • mips

Distributions

  • Arch Linux

How does this work?

tldr

We download & decompress a rootfs, apply some magic and make it "bootable" with the help of chroot or systemd-nspawn.

The short answer

  1. check architecture
  2. ask for target architecture, execution architecture(s) and distribution
  3. download rootfs
  4. decompress rootfs
  5. mount rootfs
  6. install updates and bootscript dependencies
  7. apply patches (if using chroot)
  8. download bootscripts
  9. unmount rootfs
  10. finish and print information about how to "boot" the rootfs

The long answer

Just read the source code.

How to test

make test to run it, make log to view the log file.

Recommendation

We recommend using /dev/shm as a install location during development. Although using temporary directories
is disallowed for normal installations we highly recommend using /dev/shm during development as you will
be wearing out your disk very fast otherwise. Just make sure that you have enough memory available and that you
use /dev/shm instead of /tmp as your install location (/tmp uses your disk while /dev/shm uses your computer memory).

Annotations

### TOBECHANGED     -  this should be changed in the future
### MISIMPLEMENTED  -  implemented, but wrong