JeremyStarTM
8e0e3f63a1
- [androot.sh] Fix $DOWNLOADSERVER_BOOTSCRIPTS - [androot.sh] Add $BRANCH variable - [androot.sh] Introduce run_script() function - [androot.sh] Use case instead of if - [prepare.sh] Fix typo (executer -> executor) - [rootfsinstall.sh] Remove "bsdtar failed" log line - [bootscriptdl.sh] Trim download mode - [bootscriptdl.sh] Implement install-qemu mode - [README.md] Changed wording and added links - [README.md] Add /dev/shm recommendation - [Makefile,README.md] Add Makefile |
||
---|---|---|
rootfsbuilder | ||
androot.sh | ||
bootscriptdl.sh | ||
Makefile | ||
mount.sh | ||
prepare.sh | ||
README.md | ||
rootfsinstall.sh |
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
- Magisk/Magisk Delta/KernelSU
- curl
- bash
- chroot
- bsdtar
- tsu
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
- check architecture
- ask for target architecture, execution architecture(s) and distribution
- download rootfs
- decompress rootfs
- mount rootfs
- install updates and bootscript dependencies
- apply patches (if using chroot)
- download bootscripts
- unmount rootfs
- 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
### UNIMPLEMENTED - not yet finished
### EXPERIMENTAL - experimental code, probably not safe yet
### MISIMPLEMENTED - implemented, but wrong