SUI

Android Module logo

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 PackageManager#getInstalledApplications 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 PackageManager#getInstalledApplications 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

Note, the shortcut way requires your home app supports shortcut APIs that adds from Android 7.0 and 8.0. Unless you are using a old home app, you can the shortcut with no problem.

Interactive shell

Sui provides interactive shell.

Since Sui does not add files to PATH, the files need to be copied manually. See /data/adb/sui/post-install.example.sh to learn how to do this automatically.

After the files are correctly copied, use rish as ‘sh’.

Application development guide

https://github.com/RikkaApps/Shizuku-API

Build

Clone with git clone --recurse-submodules.

Gradle tasks:

Flavor could be Riru and Zygisk, and BuildType could be Debug and Release.

Internals

Sui requires Magisk (and Riru for non-Zygisk version). Magisk allows us to run processes as uid 0 and a “do anything” SELinux context. Riru or Zygisk allows us to inject into system server process and app processes.

In short, there are four parts:

Download Link

Module Info

Type : module
Date Release :
If the link is broken or there is something that needs to be updated in the post contact us.

Other modules

Android Tweaker magisk ksu module

AndroidxTweaker version : v1.4.1 Changelog : added terminal menu removed apk due to incompatibility Added ram cleaner on profile changing fixed some bugs AndroidxTweaker Version:v1.4.5 Changelog : Enhanced Functionality: Enjoy smoother performance and improved responsiveness. New Tweaks: Unlock new …...

DTSX Ultra ZTE A2020G Pro Magisk Module

By : ryukinotes

DISCLAIMER DTS app and blobs are owned by DTS�. The MIT license specified here is for the Magisk Module only, not for DTS app and blobs. Descriptions Equalizer sound effect ported from ZTE A2020G Pro (P855A01) and integrated as a Magisk Module for all supported and rooted devices with Magisk Post …...

4K60 Camera Mod

Want to unleash the full power of your smartphone camera? The 4K60 Camera Mod Magisk Module might be just what you need. This module allows you to bypass software limitations and enable 4K video recording at 60 frames per second (fps) on devices that don’t officially support it. What is the …...

AdAway

Tired of intrusive ads cluttering your Android screen? AdAway is a powerful open-source solution that gives you control over your mobile browsing and app experience. By leveraging the “hosts” file, AdAway effectively blocks ads across your device, leading to a cleaner, faster, and more …...

Universal GMS Doze

By : gloeyisk

Universal GMS Doze is a Magisk module designed to limit the background activity of Google Mobile Services (GMS) for better battery efficiency. It optimizes wakelocks and GMS processes without disrupting notifications or core Google app functionality. Ideal for users looking to extend battery life …...

Benchkit

Benchkit is a developer-centric toolkit module for Android with a plethora of tools for in-depth profiling and benchmarking. Many of the tools are focused on kernel benchmarking, but userspace (i.e. Android) benchmarking is also covered by some of them. This module aims to make empirical data-driven …...

Dolby Audio Moto G Pro

This module leverages the Magisk framework, a popular tool for modifying system files on rooted Android devices, to potentially improve the audio quality of your Moto G Pro. By replacing or modifying specific system files, the module aims to unlock additional Dolby Atmos features or alter existing …...

AdGuardDNS4Magisk

To make it short: a DNS server listen and give you the corresponding IP address of your website request, and its domain name (forum.xda-developers.com for example). For the long version a little reading is necessary: https://en.wikipedia.org/wiki/Domain_Name_System The purpose of this module? …...

DEX Optimizer Magisk and kernelsu modules

OT - one-time - after installing the module, the script is executed once, then the script and module deletes itself completely (except for the log file) D - daily - the script is executed after each device reboot without complete removal. Dex Optimization The dex optimizer. Improves performance, …...

Riru - Clipboard Whitelist

By : Kr328

A module of Riru/Zygisk. Allowing apps to access the clipboard in the background on Android 10. Requirements Zygote inject framework installed Riru >= 26.0 Zygisk Android 10+ Feature Allowing apps to access the clipboard in the background on Android 10+. Multi-User Support Add …...