shizuku_api 1.2.1 copy "shizuku_api: ^1.2.1" to clipboard
shizuku_api: ^1.2.1 copied to clipboard

PlatformAndroid

A Flutter Plugin that gives access to shizuku api.

🔌 Shizuku API Flutter Plugin #

Access the Shizuku API seamlessly in your Flutter apps! 🚀

🌟 About #

This plugin powers my Play Store application System App Remover, 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 app should be installed and running

🔧 Configuration #

📝 app/build.gradle

  • minSdk should be >= 24

📝 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
  • !! Shizuku should be installed
  • ✅ Check if Shizuku is running first
  bool isBinderRunning = await _shizukuApiPlugin.pingBinder() ?? false; // tries to ping shizuku
  
  • 🛠️ check Shizuku Permission

      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

      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)
      String command = 'pm uninstall --user 0 com.android.chrome';
      await _shizukuApiPlugin.runCommand(command); // returns success if Uninstalled system app / Failure if failed
    
3
likes
150
points
214
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter Plugin that gives access to shizuku api.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on shizuku_api