From 9a3f9b18de0ca3a533acce6a91d07473cabc24b3 Mon Sep 17 00:00:00 2001 From: Titan Date: Sun, 22 Oct 2023 17:08:58 +0800 Subject: [PATCH] add doc for how to automatically start Chroot Linux on device boot --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 58e3117..458ee04 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,25 @@ To mount image use : ```console mount_image ``` +## Automatically Start Chroot Linux on Device Boot + +If you have installed the lhroot module, you can simply place the following script in Magisk(or KernelSU)'s boot script directory (/data/adb/service.d): + +``` +#!/bin/sh +/system/bin/bootlinux +``` + +Assuming the script is named lhroot.sh, give it executable permissions with `chmod +x lhroot.sh`. + +Restart your device, and you will see that the Linux system will automatically start along with the device boot. + +This functionality is provided by Magisk or KernelSU. + +For more information, please refer to the following resources: + +- Magisk: [Boot Scripts](https://topjohnwu.github.io/Magisk/guides.html#boot-scripts) +- KernelSU: [Module Guide - Boot Scripts](https://kernelsu.org/guide/module.html#boot-scripts) ## Available Distro - Alpine Linux, Installed on /data/alpine