Shizuku module no root
Bulding a module for non-root use with Shizuku involves utilizing the Shizuku service to grant the necessary permissions to apps without requiring root access. Here’s a step-by-step guide to help you build and configure such a module:
Building a Non-Root Module with Shizuku
Requirements
- ADB: Ensure you have ADB installed on your computer.
- Shizuku APK: Download the latest Shizuku APK from the official Shizuku GitHub repository.
- Your App/APK: The APK of the app that requires elevated permissions.
Steps to Build the Module
Install Shizuku:
- Download and install the Shizuku APK on your device.
Enable Developer Options and USB Debugging:
- Go to
Settings > About phone
and tapBuild number
seven times to enable Developer Options. - In
Settings > Developer Options
, enableUSB Debugging
.
- Go to
Start Shizuku via ADB:
Connect your Android device to your PC via USB.
Open a terminal or command prompt on your PC.
Run the following commands to start Shizuku:
adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh
Configure Shizuku:
- Open the Shizuku app on your device.
- Follow the instructions to enable Shizuku in non-root mode.
Granting Permissions to Your App:
To grant specific permissions to your app using Shizuku, you can use an ADB command. Here is an example command to grant
WRITE_SECURE_SETTINGS
permission:adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh adb shell pm grant <your.package.name> android.permission.WRITE_SECURE_SETTINGS
Automate the Process (Optional):
- To automate starting Shizuku every time you restart your device, you can create a simple script or use a task automation app like Tasker.
- For Tasker, you can create a task that runs the ADB command to start Shizuku whenever the device reboots.
Creating a Non-Root Module Package
To create a reusable module package for non-root use:
Script for Starting Shizuku:
- Create a script that users can run via ADB to start Shizuku and grant the necessary permissions.
#!/bin/sh adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh adb shell pm grant <your.package.name> android.permission.WRITE_SECURE_SETTINGS
Save this script as
start_shizuku.sh
.Instructions for Users:
- Provide clear instructions on how users can use ADB to run the script and start Shizuku.
# Starting Shizuku (Non-Root) 1. Enable Developer Options and USB Debugging on your device. 2. Connect your device to your PC via USB. 3. Download and install the Shizuku APK. 4. Run the following command to start Shizuku: ```sh adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh
Run the following command to grant necessary permissions to your app:
adb shell pm grant <your.package.name> android.permission.WRITE_SECURE_SETTINGS
Open the Shizuku app and follow the instructions to configure it.
Distribute the Module:
- Package the script (
start_shizuku.sh
) and the instructions together. - Share the package with users, providing clear guidance on how to use it.
- Package the script (
By following these steps, you can create a non-root module using Shizuku to grant necessary permissions to apps, enabling users to manage their device’s performance and permissions without needing root access.