[MODULE] LHROOT | Systemless Linux Chroot Installer and Bootscript

Search This thread

FerryAr

Member
Feb 3, 2019
29
15
17
Wonosobo,Jawa Tengah
LHROOT

Systemless Linux Chroot Installer and Bootscript Magisk Module​

alpine-linux-lhroot.png


Dependancies:
  • busybox
  • coreutils for make_image
  • mke2fs for make_image

Installation:
Just flash the zip release via Magisk Manager.

Usage :
Code:
lhroot
on terminal emulator and follow the instructions

Once installed, to boot into Linux Chroot use :

Code:
bootlinux

To unmount bind directory use :

Code:
killlinux

To make image use :

Code:
make_image <path to img> <img name.img> <size img in MB>

To mount image use :
Code:
mount_image <path to img> <path to linux directory>

Available Distro :
  • Alpine Linux, Installed on /data/alpine
  • Arch Linux, Installed on /data/arch
  • Debian, Installed on /data/debian
  • Fedora, Installed on /data/fedora
  • Kali Linux, Installed on /data/kali
  • Parrot, Installed on /data/parrot
  • Ubuntu, Installed on /data/ubuntu
  • ....more distro added soon

Supported Architectures :
  • arm
  • aarch64
  • x86
  • x64

Credits :

License :
Licensed under GNU GPL v3
Git Repository : https://github.com/FerryAr/lhroot
The rootfs tarball is taken from AnLinux Resources Repository

Note :
  • If you want to store your chroot in image file, make image file first using make_image then mount the image using mount_image script.
    coreutils can be installed via @Zackptg5 's [URL="https://github.com/Magisk-Modules-Repo/ccbins]ccbins[/URL] module.
  • mke2fs can be installed via my [URL="https://github.com/FerryAr/e2fsprogs-arm]e2fsprogs module[/URL], support for arm device only, other arch will be use busybox mke2fs applets,will use ext2 filesystem and limited 2GB image size.
 
Last edited:

FerryAr

Member
Feb 3, 2019
29
15
17
Wonosobo,Jawa Tengah
v1.9 Released (15/01/2021)

Changelog :

v1.9:
  • Code Cleanup
  • Migrate Alpine Linux tarball download to official repository
  • Update Arch Linux to 2021.01
  • Update Alpine Linux to v3.13

v1.8:
  • Remove SELinux Permissive on boot
  • Change way to verify the device online
v1.7:
  • Update mod-util to v2.6.1
  • Add Parrot OS, supported x86 and x64 device only.
  • Add Fedora, Supported arm and x64 device only.
  • Add 15 seconds sleep on remove chroot function

v1.4:
  • Add make_image and mount_image script to store a chroot in img file
  • Add Arch Linux (Support for ARM and x64 only)
  • Add Kali Linux
  • Change login to chroot from /bin/bash to /usr/bin/env su -l

v1.0:
  • Initial Release
 
Last edited:
  • Like
Reactions: pierro78

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    LHROOT

    Systemless Linux Chroot Installer and Bootscript Magisk Module​

    alpine-linux-lhroot.png


    Dependancies:
    • busybox
    • coreutils for make_image
    • mke2fs for make_image

    Installation:
    Just flash the zip release via Magisk Manager.

    Usage :
    Code:
    lhroot
    on terminal emulator and follow the instructions

    Once installed, to boot into Linux Chroot use :

    Code:
    bootlinux

    To unmount bind directory use :

    Code:
    killlinux

    To make image use :

    Code:
    make_image <path to img> <img name.img> <size img in MB>

    To mount image use :
    Code:
    mount_image <path to img> <path to linux directory>

    Available Distro :
    • Alpine Linux, Installed on /data/alpine
    • Arch Linux, Installed on /data/arch
    • Debian, Installed on /data/debian
    • Fedora, Installed on /data/fedora
    • Kali Linux, Installed on /data/kali
    • Parrot, Installed on /data/parrot
    • Ubuntu, Installed on /data/ubuntu
    • ....more distro added soon

    Supported Architectures :
    • arm
    • aarch64
    • x86
    • x64

    Credits :

    License :
    Licensed under GNU GPL v3
    Git Repository : https://github.com/FerryAr/lhroot
    The rootfs tarball is taken from AnLinux Resources Repository

    Note :
    • If you want to store your chroot in image file, make image file first using make_image then mount the image using mount_image script.
      coreutils can be installed via @Zackptg5 's [URL="https://github.com/Magisk-Modules-Repo/ccbins]ccbins[/URL] module.
    • mke2fs can be installed via my [URL="https://github.com/FerryAr/e2fsprogs-arm]e2fsprogs module[/URL], support for arm device only, other arch will be use busybox mke2fs applets,will use ext2 filesystem and limited 2GB image size.
    1
    v1.9 Released (15/01/2021)

    Changelog :

    v1.9:
    • Code Cleanup
    • Migrate Alpine Linux tarball download to official repository
    • Update Arch Linux to 2021.01
    • Update Alpine Linux to v3.13

    v1.8:
    • Remove SELinux Permissive on boot
    • Change way to verify the device online
    v1.7:
    • Update mod-util to v2.6.1
    • Add Parrot OS, supported x86 and x64 device only.
    • Add Fedora, Supported arm and x64 device only.
    • Add 15 seconds sleep on remove chroot function

    v1.4:
    • Add make_image and mount_image script to store a chroot in img file
    • Add Arch Linux (Support for ARM and x64 only)
    • Add Kali Linux
    • Change login to chroot from /bin/bash to /usr/bin/env su -l

    v1.0:
    • Initial Release
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone