Package 

Class ShizukuProvider

  • All Implemented Interfaces:
    android.content.ComponentCallbacks , android.content.ComponentCallbacks2

    
    public class ShizukuProvider
    extends ContentProvider
                        

    This provider receives binder from Shizuku server. When app process starts, Shizuku server (it runs under adb/root) will send the binder to client apps with this provider.

    Add the provider to your manifest like this:

    <manifest>
       ...
       <application>
           ...
           <provider
               android:name="rikka.shizuku.ShizukuProvider"
               android:authorities="${applicationId}.shizuku"
               android:exported="true"
               android:multiprocess="false"
               android:permission="android.permission.INTERACT_ACROSS_USERS_FULL"
           </provider>
           ...
       </application>
    </manifest>

    There are something needs you attention:

    • android:permission shoule be a permission that granted to Shell (com.android.shell) but not normal apps (e.g., android.permission.INTERACT_ACROSS_USERS_FULL), so that it can only be used by the app itself and Shizuku server.
    • android:exported must be true so that the provider can be accessed from Shizuku server runs under adb.
    • android:multiprocess must be falsesince Shizuku server only gets uid when app starts.

    If your app run in multiply processes, this provider also provides the functionality of sharing the binder across processes. See enableMultiProcessSupport.