QuickInfo
A utility to make a Magisk module that provides full Bash shell capabilities on Android, complete with modern syntax support and essential features. It is designed for developers and power users, enabling a robust Bash environment.
git clone https://github.com/i-Taylo/bash-in-magisk.git
cd bash-in-magisk
chmod +x gen_module.sh
./gen_module.sh
The build
directory contains:
gen_module.sh
: A setup script that generates a module template with a complete Bash environment.
The module configuration code includes:
MODULE_ID="bash_example"
MODULE_NAME="bash-example-name"
MODULE_VERSION="1.0"
MODULE_VERSION_CODE="1000"
AUTHOR="example@author"
DESCRIPTION="This is a description of an example"
UPDATE_JSON="#<json file link>"
Customize these variables to reflect your module's information.
Explanation of variables below:
LAUNCHER_CODE="template/customize.sh"
INSTALLATION_CODE="template/installer.sh"
LAUNCHER_CODE
initializes and prepares the Bash environment automatically; no manual changes are needed as it is generated by gen_module.sh
.
INSTALLATION_CODE
is the main installation script where your code goes. You can view the sample code in template/example_installer.sh
for reference.
The template does not include the following files by default, so you may need to create and configure them if necessary:
├── post-fs-data.sh
├── post-mount.sh
├── service.sh
├── boot-completed.sh
├── uninstall.sh
├── system.prop
├── sepolicy.rule
There is no need to modify gen_module.sh
to include these files, as they will be automatically packed during the zipping process.
Environment variables like:
$OUTFD
$ABI
$API
$MAGISKBIN
$NVBASE
$BOOTMODE
$ZIPFILE
etc...
and the others are all allowed.
gen_module.sh
-›line 79
Jump to line 79
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.