Android Debug Bridge, or ADB for short, is a handy development tool for interacting with your phone for debugging and testing. Through ADB, developers and power users can access Android’s built-in Linux command line shell with more privileges than user-installed apps. Notably, ADB shell privilege is not equal to superuser access, so you may still need to root your device to gain full control of the OS. However, depending on your modding requirements, shell access is enough to grant or deny permissions, change system settings values, and more. That’s where Shizuku application comes into play.
Follow this article:
What is Shizuku?
Shizuku is a great solution for a fairly complex scenario in the Android modding world: giving third-party apps access to system-level Application Programming Interfaces (APIs). The idea is to run a dedicated process with shell-level permissions that acts as a proxy between the system server and applications. Instead of relying on executing commands in
su shell developers can then use the Shizuku server component to perform elevated operations.
In a nutshell, if an application needs special permissions that can only be granted via ADB (or using root), you can just use Shizuku to provide them directly from your android device.
The Shizuku project is open source and maintained by Rikka (aka RikkaW), Haruue, and several other developers.
What are the characteristics of Shizuku?
- Minimal performance loss.
- Extremely fast execution (based on Android’s inter-process communication mechanism called “binder”).
- Applications can use the Android system APIs with minor code additions.
- On Android 11 and above, you can set up and run Shizuku directly on your device.
How to download Shizuku?
As mentioned earlier, the Shizuku project is open source, so you can take a look at the codebase or compile it yourself by downloading the sources from the official GitHub repository.
If you are looking for a pre-compiled version of Shizuku, you can get it directly from the Google Play Store. The developers also host several mirrors to make it easier to download the official APK release.
How to install and configure Shizuku?
The Google Play version of Shizuku is installed by Android’s own package manager and will continue to be updated through the Play Store. If you want to choose to release the APK from GitHub, you need to manually download the package to your Android device.
While you can use Shizuku in a non-root environment, having root access greatly simplifies the process of setting up a Shizuku service. Follow the guide below to learn how to set up Shizuku with the method of your choice.
With root access
Before installing Shizuku with root access, make sure the target device has the latest version of Magisk.
- Find the Shizuku icon and click on it to open the app.
- On the main screen, go to the section called Start (for rooted devices).
- Click the “Start” button to begin the process.
- Press Grant to give root permissions upon request.
- If everything goes right, the Shizuku service will start for a few seconds on a new screen and then automatically close when finished.
- Scroll up and check the working status of Shizuku. It should display the version number followed by “root”.
By default, the Shizuku service does not start automatically after a reboot. To change the behavior, tap the Settings icon in the top right corner, then find Run at boot (root) option. Once enabled, the Shizuku service will run without any user intervention after the device reboots.
It is worth noting that the developers of the Shizuku project are working on an advanced interface called Sui. It will eventually replace the current Shizuku app. To try it out, download the latest version from the GitHub repository. Since Sui is designed as a Magisk module, you will still need Magisk to run the app.
Unlike regular companion apps, Sui doesn’t offer a typical app icon to start with. To access its interface, do one of the following:
- (Android 8.0+, Sui 12.1+) Press and hold system settings on the home app and you will find the Sui shortcut.
- (Android 8.0+, Sui 12+) Enter “Developer Options” in system settings, the system will ask you to add a shortcut to Sui.
- To come in
*#*#784784#*#*in the default dialing application.
Although Sui has its potential, the project is not yet complete. Until the migration from the current Shizuku app to Sui is officially approved, it is recommended that you use the main Shizuku app to customize various aspects of Shizuku.
Without root access
Starting with Android 11, Google added the wireless debugging feature to Android Developer Options. It can be used to set up the Shizuku service on the target device without root access.
- Find the Shizuku icon and click on it to open the app.
- On the main screen, go to the section called Starting via wireless network debugging.
- Click Pairing button, then press Developer Options. Then scroll down until you find the Wireless Debugging option. Turn it on.
- Verify Always allow on this network box, then click Permit to enable this feature.
- Press Wireless Debugging menu. Then select the option named Pairing a device with a pairing code.
- Now enter your unique 6-digit Wi-Fi pairing code in the Shizuku pairing code notification text box.
- You can also swipe down on the status bar until the Shizuku notification and then press Enter pairing codeand click the Submit button on the right to confirm.
- At this point you should see Pairing successful message if the pairing code was correct.
- Return to the main screen of the Shizuku app.
- You may need to swipe off the successful pairing notification before you can do so.
- Find Starting via wireless network debugging section and click the “Start” button to enable the service.
- The Shizuku service will now automatically start on a new screen and then automatically close when finished.
- Scroll up and check the working status of Shizuku. It should display the version number followed by “adb”.
Keep in mind that you need to enable the “Wireless Debugging” option again and restart Shizuku after restarting the target device.
It is also possible to call the Shizuku service via wired ADB access. This is especially useful for older versions of Android or some Android OEM skins where wireless debugging is not available. However, you need a PC/Mac with ADB installed as well as an Android OEM driver installed as prerequisites.
- Before proceeding, make sure the target device can be detected by the ADB process on your PC/Mac.
- Type of
adb devicesin the terminal window, then press Enter. You should see a unique device ID number in the list of connected devices, telling you that it is connected and recognized by the ADB interface.
- Type of
- Open the Shizuku app at least once on your phone.
- Run the following command in a terminal window on your PC/Mac:
adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/start.sh
- If successful, you should see exit from 0 status in the terminal window within a few seconds.
- On your phone, open the Shizuku app. Then scroll up and check the working status of Shizuku. It should display the version number followed by “adb”.
If you complete all of this, you should now have a running instance of Shizuku on your Android device.
How to use Shizuku?
If you’re familiar with Magisk, then Shizuku is very similar. But instead of controlling root access, it controls shell access. As a result, if you have a running instance of Shizuku and then try to open an application that uses Shizuku to perform elevated operations, you should see a prompt to allow access. Once you allow this, Shizuku will take care of the API access requirements seamlessly.
It is also possible to use Shizuku in combination with terminal emulator applications on the device. This part is beyond the scope of this guide, but you can explore this feature by clicking “Use Shizuku in Terminal Applications” from the main menu of the application.
For the android app developer community, you can easily use the power of Shizuku. To do this, take a look at our explainer and check out the Shizuku API repository.
Shizuku official website
Rooting your Android device opens up a whole world of settings for it, but it’s not always a viable option. Unfortunately, as time goes on, and Google improves its intrusion detection methods, there is less and less room to fiddle around. The Shizuku app fills the void somewhat, which is great for the Android modding scene. We hope that in the near future we will see many applications and mods with built-in support for the Shizuku service.
#Shizuku #Android #device