# topjohnwu/libsu

A complete solution for apps using root permissions

Repository: https://github.com/topjohnwu/libsu
Canonical: https://ross.abutalabs.com/products/libsu
Language: Java
License: Apache-2.0
License Family: permissive
Last push: 2026-03-27T17:57:50+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 74, release rhythm 8, longevity 100
- inputs: {"age_days": 3148, "days_push": 159, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2099, forks 412 (observed 2026-08-28T04:06:13.524070+00:00)

## What it is
libsu is an Android library providing a complete solution for apps that need root (superuser) permissions. It wraps the Unix root shell process with high-level Java APIs and enables launching and managing root services over IPC, including running Java/Kotlin and native C/C++ code with root privileges.

## Use cases
- run shell commands with root permissions in an Android app
- create and manage root services over IPC on Android
- execute root shell scripts from Java or Kotlin
- run native C/C++ code with root privileges via JNI
- access remote file systems with root on Android
- preload and cache a shared root shell in an app

## When to choose
- you are building an Android app that requires root access
- you need robust, high-level APIs over the raw root shell process
- you want to run privileged code in a root service over IPC
- you want a maintained library from the Magisk author

## When to avoid
- your app does not need root/superuser permissions
- you target non-Android platforms
- you only need to run non-privileged shell commands

## Facets
- artifact type: library
- maturity: active
- function: sdk, developer-tools, security
- domain: android-tools, developer-tools, security
- platform: jvm
- tags: root-access, android, shell, ipc, root-services, jni

## Member repositories
- topjohnwu/libsu (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:13.524070+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:54:27.210627+00:00, confidence not recorded.
  - readme: https://github.com/topjohnwu/libsu (fetched 2026-08-28T04:06:13.524070+00:00, sha 2430bde06165)
- Data as of 2026-08-30T08:39:29.467469+00:00.
