shizuku_api 1.1.0 shizuku_api: ^1.1.0 copied to clipboard
A Flutter Plugin that gives access to shizuku api.
shizuku_api #
A Flutter Plugin that gives access to shizuku api.
info #
- This plugin is built for my Playstore Application System App Remover,which is built to delete system apps(bloatwares) without root or computer.
- Im not good in Java/ Kotlin, Somehow done this plugin if you find any improvements? check out my github
Install #
flutter pub add shizuku_api
Requirements #
-
Shizuku app should be installed and running
-
app/build.gradle
- minSdk should be >= 24
-
In AndroidManifest.xml add this inside application tag
<application>
<!-- other code>
<provider
android:name="rikka.shizuku.ShizukuProvider"
android:authorities="${applicationId}.shizuku"
android:multiprocess="false"
android:enabled="true"
android:exported="true"
android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />
</application>
Usage #
- Important: DO THIS BEFORE CALLING ANY OTHER
- check if Shizuku is running first
bool isBinderRunning = await _shizukuApiPlugin.pingBinder() ?? false;
- Request Shizuku Access
- !! Shizuku should be installed and running
final _shizukuApiPlugin = ShizukuApi(); bool requestPermission = await _shizukuApiPlugin.checkPermission(); // triggers shizuku popup print(requestPermission); // if allowed returns true else false
- Run Commands
- ! root environment(su) is not tested
- can run ADB shell commands (working fine)
String command = 'pm uninstall --user 0 com.android.chrome'; await _shizukuApiPlugin.runCommand(command); // returns success if Uninstalled system app / Failure if failed