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.
-
System Requirements:
- Linux, macOS, Termux, or WSL (Windows Subsystem for Linux).
-
Android NDK (only if zygisk module): Ensure the
NDK_HOME
variable points to the correct Android NDK path.configuration.cfg
-›line 22
Jump to line 22
git clone https://github.com/i-Taylo/bash-in-magisk.git "my-magisk-module"
cd my-magisk-module
chmod +x gen_module.sh
./gen_module.sh
- If you are building a Zygisk module, make sure to set
isZygisk
totrue
. -
- If you want to create a new, fully-structured example Zygisk module template, simply remove the
zygisk
directory (if exist) and then rungen_module.sh
.
- If you want to create a new, fully-structured example Zygisk module template, simply remove the
The bash-in-magisk
directory contains:
gen_module.sh
: A setup script that generates a module template with a complete Bash environment.
You can find the module configurations in (configuration.cfg
) file which 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 example/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.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.