RikkaApps /Sui

Modern super user interface implementation on Android.

★ 4,383⑂ 495👁 82⑃ 66● 137▤ 21
JavaGPL-3.0Created 2021-01-03
下载:v13.5.1v13.5.1 ↓13.5.12023-09-19
+4
日增长
4,383
stars
495
forks
82
watchers
66
prs
137
issues
21
releases

README

Sui

Modern super user interface (SUI) implementation on Android. The name, Sui, also comes from a character.

 Introduction

Sui provides Java APIs, Shizuku API, for root apps. It mainly provides the ability to use Android APIs directly (almost in Java as the identity of the root, and start app's own AIDL-style Java service under root. This will make root app development much more comfortable.

Another advantage is that Sui does not add binaries to PATH and does not install a manager app. This means we no longer need to spend a huge amount of time to fight with apps that detect them.

To be clear, the full implementation of "root" is far more than "su" itself, there is a lot of hard work to be done before. Sui is not a full root solution, it requires Magisk to run.


  Why "su" is unfriendly for app development

The "su", a "shell" runs as root, is too far from the Android world.

To explain this, we need to talk about how system API works. For example, we can use PackageManagergetInstalledApplications to get the app list. This is actually an interprocess communication (IPC) process of the app process and system server process, just the Android framework did the inner works for us. Android uses Binder to do this type of IPC. Binder allows the server-side to learn the uid and pid of the client-side so that the system server can check if the app has the permission to do the operation.

Back to "su", there are commands provided by the Android system. In the same example, to get the app list with "su", we have to use pm list. This is too painful.

1. Text-based, this means there is no structured data like PackageInfo in Java. You have to parse the output text.
2. It is much slower because run a command means at least one new process is started. And PackageManagergetInstalledApplications is used inside pm list.
3. The possibility is limited to how the command can do. The command only covers a little amount of Android APIs.

Although it is possible to use Java APIs as root with app_process (there are libraries like libsu and librootjava), transfer binder between app process and root process is painful. If you want the root process to run as a daemon. When the app process restarts, it has no cheap way to get the binder of the root process.

In fact, for Magisk and other root solutions, makes the "su" to work is not that easy as some people think (let "su" itself work and the communication between the "su" and the manager app have a lot of unhappy work behind).



 User guide

Note, the behavior of existing apps that only supports "su" will NOT change.

 Install

You can download and install Sui from Magisk directly. Or, download the zip from release and use "Install from storage" in Magisk.

 Management UI

- (Android 8.0+, Sui 12.1+) Long press system settings from the home app, you will find the shortcut of Sui
- (Android 8.0+, Sui 12+) Enter "Developer options" in system settings, the system will ask you to add the shortcut of Sui
- Enter 784784 in 

Top issues

Latest release

v13.5.1 v13.5.1 2023-09-19

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON