# Chainfire/libsuperuser

Example code for "How-To SU"

Repository: https://github.com/Chainfire/libsuperuser
Canonical: https://ross.abutalabs.com/products/libsuperuser
Language: Java
License: Apache-2.0
License Family: permissive
Last push: 2024-06-03T15:25:22+00:00

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

## Adoption (not part of the score)
Stars 1673, forks 658 (observed 2026-08-28T04:05:20.274403+00:00)

## What it is
A Java library for Android that simplifies executing shell commands and root (su) operations from apps, with interactive shells, threading support, and shell pooling. It is the reference implementation behind the 'How-To SU' guide.

## Use cases
- run root commands from an android app
- execute shell commands with superuser privileges
- manage interactive root shell sessions in java
- pool and reuse root shell instances
- read stdout and stderr from su commands

## When to choose
- you need battle-tested root shell handling on older Android versions
- you rely on edge-case behaviors the author personally uses
- you are maintaining an existing app already built on libsuperuser

## When to avoid
- you are starting a new Android app needing root access - prefer topjohnwu's libsu
- you need a library actively updated for the latest Android and root solution changes
- you only need non-root shell execution with modern APIs

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools, cli, security
- domain: android-tools, developer-tools, security
- platform: jvm
- tags: android, root, superuser, shell, su

## Member repositories
- Chainfire/libsuperuser (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:20.274403+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-30T03:42:34.174644+00:00, confidence not recorded.
  - readme: https://github.com/Chainfire/libsuperuser (fetched 2026-08-28T04:05:20.274403+00:00, sha 958a108f33e2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
