- Download:
auto_create_module.sh - Run:
chmod +x auto_create_module.sh ./auto_create_module.sh
- Done! The script creates
terminal_vm_persist.zipautomatically
- Create these 6 files manually (copy content from artifacts below)
- Run:
build_module.shto create ZIP - Install the generated ZIP
- Create directory:
terminal_vm_persist/ - Copy all 6 required file contents into that directory
- Set permissions:
chmod 755 *.sh - Create ZIP:
zip -r terminal_vm_persist.zip terminal_vm_persist/
Lines: 6
Permissions: 644
Content: Copy from "module.prop" artifact
Lines: 70
Permissions: 755 (executable)
Content: Copy from "service.sh" artifact
Lines: 12
Permissions: 755 (executable)
Content: Copy from "uninstall.sh" artifact
Lines: 153
Permissions: 755 (executable)
Content: Copy from "vm_control.sh" artifact
Purpose: Manual VM control commands
Lines: 5
Permissions: 644
Content: Copy from "system.prop" artifact
Purpose: System property overrides
Lines: 350+
Permissions: 644
Content: Copy from "README.md" artifact
Purpose: Full documentation
Use for: Automatic module creation
Content: Copy from "auto_create_module.sh" artifact
How to use:
chmod +x auto_create_module.sh
./auto_create_module.sh
# Creates terminal_vm_persist.zip automaticallyUse for: Building ZIP from manual files
Content: Copy from "build_module.sh" artifact
How to use:
# First create all 6 module files
# Then run:
chmod +x build_module.sh
./build_module.sh# 1. Download auto_create_module.sh
# 2. Make it executable and run
chmod +x auto_create_module.sh
./auto_create_module.sh
# 3. Transfer ZIP to phone
adb push terminal_vm_persist.zip /sdcard/
# 4. Install via Magisk Manager# Option A: Use WSL/Git Bash and run auto_create_module.sh
# Option B: Manual creation
# 1. Create folder: terminal_vm_persist
# 2. Create 6 text files with content from artifacts
# 3. Right-click folder → Send to → Compressed folder
# 4. Rename to terminal_vm_persist.zipThe final ZIP must have this structure:
terminal_vm_persist.zip
├── module.prop (6 lines)
├── service.sh (70 lines, executable)
├── uninstall.sh (12 lines, executable)
├── vm_control.sh (153 lines, executable)
├── system.prop (5 lines)
└── README.md (350+ lines)
IMPORTANT: Files must be in ROOT of ZIP, not in a subfolder!
Before installing, verify:
- ZIP contains
module.prop,service.sh,uninstall.sh - All
.shfiles are marked as executable (755) - Files use Unix line endings (LF), not Windows (CRLF)
- Files are in root of ZIP, not nested in a folder
- ZIP size is approximately 15-20 KB
- Can extract and view all files without errors
Test extraction:
unzip -l terminal_vm_persist.zip| File | Purpose | When It Runs |
|---|---|---|
| module.prop | Module metadata | Read by Magisk |
| service.sh | Main persistence logic | Every boot |
| uninstall.sh | Cleanup | Module removal |
| vm_control.sh | Manual commands | User runs it |
| system.prop | System overrides | Boot time |
| README.md | Documentation | Reference |
- Create
terminal_vm_persist.zip(use auto script or manual) - Transfer to device:
adb push terminal_vm_persist.zip /sdcard/ - Install via Magisk Manager → Modules → Install from storage
- Reboot device
- Verify:
su -c /data/adb/modules/terminal_vm_persist/vm_control.sh status
chmod +x script_name.sh- File has Windows line endings (CRLF)
- Convert to Unix:
dos2unix script_name.sh - Or use sed:
sed -i 's/\r$//' script_name.sh
- Files must be in root of ZIP
- Don't ZIP the folder, ZIP the contents
- Correct:
cd terminal_vm_persist && zip -r ../module.zip . - Wrong:
zip -r module.zip terminal_vm_persist/
- Check module.prop format
- Verify all required fields present
- Ensure files are in root of ZIP
- Check Magisk version (need 20.4+)
Copy content from these conversation artifacts:
- module.prop → "module.prop"
- service.sh → "service.sh"
- uninstall.sh → "uninstall.sh"
- vm_control.sh → "vm_control.sh"
- system.prop → "system.prop"
- README.md → "README.md"
- auto_create_module.sh → "auto_create_module.sh"
- build_module.sh → "build_module.sh"
Easiest method: Just run auto_create_module.sh and you're done! It creates everything automatically.