Skip to content

Commit dbf4243

Browse files
committed
Initial release v1.0
- Add web-based UI for managing integrity modules - Support for Magisk, APatch, and KernelSU - Auto-detection of root solution - Batch install functionality for all modules - Real-time status tracking - CORS-enabled API endpoints - Professional README and documentation
0 parents  commit dbf4243

17 files changed

Lines changed: 1092 additions & 0 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/sbin/sh
2+
# Universal update-binary for Magisk, APatch, KernelSU
3+
# This script is executed during module installation
4+
5+
OUTFD=$2
6+
ZIPFILE=$3
7+
8+
ui_print() {
9+
echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD
10+
}
11+
12+
cd /tmp
13+
unzip -o "$ZIPFILE"
14+
15+
if [ -f "install.sh" ]; then
16+
chmod +x install.sh
17+
. ./install.sh
18+
fi
19+
20+
# Detect root solution
21+
if [ -d "/data/adb/ksu" ]; then
22+
ROOT_TYPE="kernelsu"
23+
MODULES_DIR="/data/adb/ksu/modules"
24+
elif [ -d "/data/adb/apatch" ] || [ -d "/data/adb/ap" ]; then
25+
ROOT_TYPE="apatch"
26+
MODULES_DIR="/data/adb/modules"
27+
else
28+
ROOT_TYPE="magisk"
29+
MODULES_DIR="/data/adb/modules"
30+
fi
31+
32+
ui_print "Detected root type: $ROOT_TYPE"
33+
34+
# Copy module files
35+
mkdir -p "$MODULES_DIR/IntegrityHelper"
36+
cp -rf * "$MODULES_DIR/IntegrityHelper/" 2>/dev/null
37+
rm -rf "$MODULES_DIR/IntegrityHelper/META-INF"
38+
39+
# For APatch, copy post-fs-data.sh to post-fs-data.d
40+
if [ "$ROOT_TYPE" = "apatch" ]; then
41+
mkdir -p /data/adb/apatch/post-fs-data.d
42+
cp "$MODULES_DIR/IntegrityHelper/post-fs-data.sh" /data/adb/apatch/post-fs-data.d/IntegrityHelper.sh
43+
chmod 755 /data/adb/apatch/post-fs-data.d/IntegrityHelper.sh
44+
fi
45+
46+
# Set permissions
47+
chmod 755 "$MODULES_DIR/IntegrityHelper/post-fs-data.sh"
48+
chmod 755 "$MODULES_DIR/IntegrityHelper/service.sh"
49+
chmod 755 "$MODULES_DIR/IntegrityHelper/open_ui.sh"
50+
chmod 755 "$MODULES_DIR/IntegrityHelper/scripts/*"
51+
52+
ui_print "IntegrityHelper module installed successfully!"
53+
ui_print "Reboot to start the web UI."

README.md

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
# Integrity Helper Magisk/APatch/KernelSU Module
2+
3+
<div align="center">
4+
5+
![Integrity Helper](https://img.shields.io/badge/Integrity-Helper-blue?style=for-the-badge)
6+
![Version](https://img.shields.io/badge/version-v1.0-green?style=flat-square)
7+
![Compatibility](https://img.shields.io/badge/compatibility-Magisk%20%7C%20APatch%20%7C%20KernelSU-orange?style=flat-square)
8+
9+
**Universal web-based UI to manage and install integrity-related Magisk modules**
10+
11+
[📥 Download Latest Release](https://github.com/himanshujjp/IntegrityHelper/releases)[📖 Documentation](#usage)[🐛 Report Issues](https://github.com/himanshujjp/IntegrityHelper/issues)
12+
13+
</div>
14+
15+
---
16+
17+
## ✨ Features
18+
19+
- 🌐 **Web UI**: Lightweight web interface running on `localhost:8585`
20+
- 📦 **Module Management**: Download, install, and track status of required modules
21+
- 🔄 **Auto-Updates**: Always fetches latest releases from official GitHub repositories
22+
-**Batch Install**: "Install All" button for convenient setup
23+
- 📊 **Status Tracking**: Persistent state of installed module versions
24+
- 🔒 **Safety First**: Only downloads from official repos with clear disclaimer
25+
- 🔧 **Universal Support**: Works with Magisk, APatch, and KernelSU automatically
26+
27+
## 🛠️ Compatibility
28+
29+
| Root Solution | Status | Support Level |
30+
|---------------|--------|---------------|
31+
| **Magisk** | ✅ Full | Complete support |
32+
| **APatch** | ✅ Full | Complete support |
33+
| **KernelSU** | ✅ Full | Complete support |
34+
35+
*The module automatically detects your root solution and configures itself accordingly.*
36+
37+
## 📦 Required Modules
38+
39+
This module manages the following integrity-related Magisk modules:
40+
41+
| Module | Description | Repository |
42+
|--------|-------------|------------|
43+
| [**PlayIntegrityFork**](https://github.com/osm0sis/PlayIntegrityFork) | Play Integrity API bypass | `osm0sis/PlayIntegrityFork` |
44+
| [**TrickyStore**](https://github.com/5ec1cff/TrickyStore) | Advanced store restrictions bypass | `5ec1cff/TrickyStore` |
45+
| [**PlayStoreSelfUpdateBlocker**](https://github.com/himanshujjp/PlayStoreSelfUpdateBlocker) | Blocks Play Store auto-updates | `himanshujjp/PlayStoreSelfUpdateBlocker` |
46+
| [**yurikey**](https://github.com/YurikeyDev/yurikey) | Yuri Key integrity module | `YurikeyDev/yurikey` |
47+
| [**ZygiskNext**](https://github.com/Dr-TSNG/ZygiskNext) | Next-generation Zygisk implementation | `Dr-TSNG/ZygiskNext` |
48+
49+
## 🚀 Installation
50+
51+
### Step 1: Download
52+
Download `IntegrityHelper.zip` from the [latest release](https://github.com/himanshujjp/IntegrityHelper/releases)
53+
54+
### Step 2: Flash
55+
Flash the ZIP via your root manager:
56+
- **Magisk Manager** → Modules → Install from storage
57+
- **APatch** → Install → Select ZIP
58+
- **KernelSU** → Install → Select ZIP
59+
60+
### Step 3: Reboot
61+
Reboot your device to activate the module
62+
63+
### Step 4: Access UI
64+
The web UI will automatically start on boot. Access it at: `http://127.0.0.1:8585`
65+
66+
## 🎯 Quick Access
67+
68+
After installation, use these commands to open the UI:
69+
70+
**For Magisk/APatch:**
71+
```bash
72+
sh /data/adb/modules/IntegrityHelper/open_ui.sh
73+
```
74+
75+
**For KernelSU:**
76+
```bash
77+
sh /data/adb/ksu/modules/IntegrityHelper/open_ui.sh
78+
```
79+
80+
## 📖 Usage
81+
82+
1. **Access the Web UI** at `http://127.0.0.1:8585`
83+
2. **View Module Status**: See all required modules with their current installation status
84+
3. **Download Modules**: Click "Download" to fetch the latest release for a specific module
85+
4. **Install Modules**: Click "Install" to install the downloaded module
86+
5. **Batch Install**: Use "Install All" to download and install all modules at once
87+
6. **View Repositories**: Click "Open Repo" to view the module's GitHub page
88+
89+
### UI Features
90+
91+
- 🔄 **Real-time Status**: Shows installed versions vs latest available
92+
- 📥 **One-click Download**: Downloads latest releases automatically
93+
- ⚙️ **Smart Installation**: Handles permissions and dependencies
94+
- 📊 **Progress Tracking**: Visual feedback during operations
95+
- 🔍 **Repository Links**: Direct access to source code
96+
97+
## 🔧 Technical Details
98+
99+
| Component | Technology | Details |
100+
|-----------|------------|---------|
101+
| **Backend** | Shell Scripts | Busybox utilities with CGI support |
102+
| **Web Server** | Busybox httpd | Lightweight CGI-capable server |
103+
| **Frontend** | HTML/JS | Bootstrap-styled responsive interface |
104+
| **Communication** | AJAX | RESTful API calls to CGI endpoints |
105+
| **Storage** | JSON | State saved in `/data/adb/IntegrityHelper/state.json` |
106+
| **Downloads** | Temporary | Files stored in `/data/local/tmp/modules/` |
107+
108+
## ⚠️ Safety & Disclaimer
109+
110+
> **⚠️ Use at your own risk! This tool downloads and installs third-party modules.**
111+
112+
### Important Notes:
113+
- Always backup your data before installing modules
114+
- Review module descriptions and source code before use
115+
- Only install modules you understand and trust
116+
- Installing third-party modules can potentially harm your device
117+
- May violate terms of service for certain apps/services
118+
119+
### What this tool does:
120+
- ✅ Downloads from official GitHub repositories only
121+
- ✅ Verifies module integrity during installation
122+
- ✅ Provides clear version tracking
123+
- ✅ Offers easy uninstallation options
124+
125+
## 🐛 Troubleshooting
126+
127+
### Common Issues
128+
129+
| Issue | Solution |
130+
|-------|----------|
131+
| **UI not loading** | Check if module is enabled in your root manager |
132+
| **Download fails** | Ensure internet connection and GitHub access |
133+
| **Install fails** | Check root manager logs and module compatibility |
134+
| **Permission issues** | Ensure proper root access and SELinux status |
135+
| **Port conflicts** | Verify no other service uses port 8585 |
136+
137+
### Debug Commands
138+
139+
```bash
140+
# Check if service is running
141+
ps | grep httpd
142+
143+
# View service logs
144+
cat /data/adb/IntegrityHelper/service.log
145+
146+
# Test API endpoints
147+
curl http://127.0.0.1:8585/api_test.sh
148+
149+
# Check module status
150+
ls -la /data/adb/modules/IntegrityHelper/
151+
```
152+
153+
## 📁 Module Structure
154+
155+
```
156+
IntegrityHelper/
157+
├── META-INF/com/google/android/update-binary # Installer
158+
├── module.prop # Module properties
159+
├── service.sh # Boot service
160+
├── open_ui.sh # UI launcher script
161+
├── webroot/ # Web interface
162+
│ ├── index.html # Main UI
163+
│ ├── script.js # Frontend logic
164+
│ ├── manifest.json # Module list
165+
│ ├── httpd.conf # Server config
166+
│ └── api_*.sh # CGI endpoints
167+
└── scripts/ # Backend scripts
168+
├── api_server.sh
169+
├── download.sh
170+
├── get_state.sh
171+
└── handle_request.sh
172+
```
173+
174+
## 📋 Changelog
175+
176+
### v1.0 (Current)
177+
- ✨ Initial release with full functionality
178+
- 🌐 Web-based UI for module management
179+
- 📦 Support for 5 essential integrity modules
180+
- 🔄 Automatic latest version detection
181+
- ⚡ Batch install functionality
182+
- 🔒 CORS-enabled API endpoints
183+
- 📊 Persistent state tracking
184+
- 🔧 Universal root solution support (Magisk/APatch/KernelSU)
185+
186+
## 🤝 Contributing
187+
188+
Contributions are welcome! Please:
189+
190+
1. Fork the repository
191+
2. Create a feature branch
192+
3. Make your changes
193+
4. Test thoroughly on your device
194+
5. Submit a pull request
195+
196+
### Development Setup
197+
198+
```bash
199+
# Clone the repository
200+
git clone https://github.com/himanshujjp/IntegrityHelper.git
201+
cd IntegrityHelper
202+
203+
# Make your changes
204+
# Test on device
205+
# Submit PR
206+
```
207+
208+
## 📄 License
209+
210+
This project is released under the **MIT License**.
211+
212+
Individual managed modules maintain their own licenses. Please refer to each module's repository for license information.
213+
214+
## 🙏 Acknowledgments
215+
216+
- **osm0sis** - PlayIntegrityFork
217+
- **5ec1cff** - TrickyStore
218+
- **YurikeyDev** - yurikey
219+
- **Dr-TSNG** - ZygiskNext
220+
- **Magisk/APatch/KernelSU teams** - Root solutions
221+
222+
## 📞 Support
223+
224+
- 📧 **Issues**: [GitHub Issues](https://github.com/himanshujjp/IntegrityHelper/issues)
225+
- 💬 **Discussions**: [GitHub Discussions](https://github.com/himanshujjp/IntegrityHelper/discussions)
226+
- 📖 **Documentation**: This README
227+
228+
---
229+
230+
<div align="center">
231+
232+
**Made with ❤️ by [himanshujjp](https://github.com/himanshujjp)**
233+
234+
⭐ Star this repo if you found it useful!
235+
236+
</div>

module.prop

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
id=IntegrityHelper
2+
name=Integrity Helper
3+
version=v1.0
4+
versionCode=1
5+
author=himanshujjp
6+
description=Universal web-based UI to manage and install integrity-related Magisk modules. Supports Magisk, APatch, and KernelSU with automatic detection.
7+
minApi=21
8+
maxApi=35
9+
needRamdisk=false
10+
changeBootConfig=false

open_ui.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/system/bin/sh
2+
# open_ui.sh - Script to open the Integrity Helper web UI
3+
4+
# Check if httpd is running
5+
if pgrep -f "busybox httpd" > /dev/null; then
6+
# Show toast message
7+
am broadcast -a android.intent.action.MAIN -e message "Opening Integrity Helper UI..." > /dev/null 2>&1
8+
9+
# Open browser to localhost:8585
10+
am start -a android.intent.action.VIEW -d "http://127.0.0.1:8585" > /dev/null 2>&1
11+
12+
# Show success toast
13+
sleep 1
14+
am broadcast -a android.intent.action.MAIN -e message "Integrity Helper UI opened!" > /dev/null 2>&1
15+
16+
echo "Opening Integrity Helper UI..."
17+
else
18+
# Show error toast
19+
am broadcast -a android.intent.action.MAIN -e message "Web UI is not running. Please reboot." > /dev/null 2>&1
20+
echo "Web UI is not running. Please reboot or check module status."
21+
fi

post-fs-data.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/system/bin/sh
2+
# post-fs-data.sh - Runs early in boot to prepare environment
3+
4+
# Detect root solution and set paths
5+
if [ -d "/data/adb/ksu" ]; then
6+
ROOT_TYPE="kernelsu"
7+
MODULES_DIR="/data/adb/ksu/modules"
8+
elif [ -d "/data/adb/apatch" ] || [ -d "/data/adb/ap" ]; then
9+
ROOT_TYPE="apatch"
10+
MODULES_DIR="/data/adb/modules"
11+
else
12+
ROOT_TYPE="magisk"
13+
MODULES_DIR="/data/adb/modules"
14+
fi
15+
16+
MODDIR="$MODULES_DIR/IntegrityHelper"
17+
UI_DIR="$MODDIR/webroot"
18+
SCRIPTS_DIR="$MODDIR/scripts"
19+
20+
# Ensure directories exist
21+
mkdir -p /data/adb/IntegrityHelper
22+
mkdir -p /data/local/tmp/modules
23+
mkdir -p "$UI_DIR/cgi-bin"
24+
25+
# Copy CGI scripts to ui/cgi-bin/
26+
cp "$SCRIPTS_DIR"/*.sh "$UI_DIR/cgi-bin/"
27+
chmod +x "$UI_DIR/cgi-bin/"*.sh
28+
29+
# Copy handle_request.sh to scripts directory (same as simple_http_server.sh)
30+
cp "$SCRIPTS_DIR/handle_request.sh" "$SCRIPTS_DIR/"
31+
chmod +x "$SCRIPTS_DIR/handle_request.sh"
32+
33+
# Copy httpd.conf to webroot
34+
cp "$SCRIPTS_DIR/httpd.conf" "$UI_DIR/"
35+
36+
# Note: Servers will be started by service.sh
37+
# This script just prepares the environment
38+
39+
# Log that preparation completed
40+
echo "$(date): IntegrityHelper environment prepared on $ROOT_TYPE" >> /data/adb/IntegrityHelper/service.log

scripts/httpd.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# httpd.conf for busybox httpd
2+
# CGI scripts in webroot and cgi-bin/ directory
3+
*.sh:/system/bin/sh
4+
/cgi-bin/*.sh:/system/bin/sh
5+
/api_*.sh:/system/bin/sh

0 commit comments

Comments
 (0)