https://github.com/santhosh-D-subramani/Shizuku-Plugin
A flutter Plugin that gives access to shizuku api
https://github.com/santhosh-D-subramani/Shizuku-Plugin
Last synced: 4 months ago
JSON representation
A flutter Plugin that gives access to shizuku api
- Host: GitHub
- URL: https://github.com/santhosh-D-subramani/Shizuku-Plugin
- Owner: santhosh-D-subramani
- License: gpl-3.0
- Created: 2024-10-21T14:05:13.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-01T05:04:40.000Z (4 months ago)
- Last Synced: 2025-02-01T06:17:58.862Z (4 months ago)
- Language: Dart
- Homepage: https://pub.dev/packages/shizuku_api
- Size: 2.41 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-shizuku - Shizuku-Plugin (Flutter) - Shizuku API bindings for Flutter apps `GPL-3.0` (Development libraries / Core)
README
# 🔌 Shizuku API Flutter Plugin
Access the **Shizuku API** seamlessly in your Flutter apps! 🚀
## 🌟 About
This plugin powers my Play Store application [**System App Remover**](https://play.google.com/store/apps/details?id=com.santhoshDsubramani.systemappremover), which allows users to remove system apps (*bloatware*) effortlessly without requiring root access or a computer(Android 10 and below still needs computer to run Shizuku).## ⚡ Installation
Add the plugin to your project:
```
flutter pub add shizuku_api
```## 📋 Requirements
- 📱 [**Shizuku**](https://shizuku.rikka.app/) app should be installed and running## 🔧 Configuration
📝 **app/build.gradle**
- minSdk should be >= 24📝 **AndroidManifest.xml** add this inside application tag:
``` xml
```
# 🚀 Usage- ⚠️ **Important:** DO THIS BEFORE CALLING ANY OTHER PLUGIN FEATURES
- !! [Shizuku](https://shizuku.rikka.app/) should be installed
- ✅ Check if **Shizuku** is running first``` dart
bool isBinderRunning = await _shizukuApiPlugin.pingBinder() ?? false; // tries to ping shizuku
```- 🛠️ **check Shizuku Permission**
``` dart
final _shizukuApiPlugin = ShizukuApi();// checks if shizuku permission granted by user
//returns true if previously allowed permission or false if permission declined /never requested
bool checkPermission = await _shizukuApiPlugin.checkPermission();print(checkPermission);
```
- 🛠️ **request Shizuku Permission**``` dart
final _shizukuApiPlugin = ShizukuApi();
// triggers shizuku popup
//returns true if Permission allowed or false if declined
bool requestPermission = await _shizukuApiPlugin.requestPermission();
print(requestPermission);
```
- 💻 **Run Commands**
- ⚡ **Root environment (su)** is not tested
- ✅ Can run **ADB shell commands** (working fine)
``` dart
String command = 'pm uninstall --user 0 com.android.chrome';
await _shizukuApiPlugin.runCommand(command); // returns success if Uninstalled system app / Failure if failed
```