How koush/android_packages_apps_superuser works
This Android Superuser application mediates requests to run commands under another UID/GID. The runtime captures the requester and target, checks remembered permissions, and—when a decision is interactive—launches a confirmation activity and receives its response over a local socket. The app also lists and removes remembered permissions. The excerpts show these UI and storage responsibilities, but do not show the native call site that dispatches the activity; that connection is therefore marked unverified.
Main entry points: su.c su request handling · SuRequest.java Request confirmation · activity.cpp Request activity dispatch · Su.java Permission list and removal
Components 8
Privilege runtime
- su request handling
su.c - Native permission database
su.c - Request activity dispatch
activity.cpp
Authorization UI
- Request confirmation
src/org/zenthought/android/su/SuRequest.java
Permission management
- App permission database
src/org/zenthought/android/su/Su.java - Permission list and removal
src/org/zenthought/android/su/Su.java
Other components
- Requesting process
- Device user
Connections 8
- Requesting process → su request handling: requests privilege
su.c - su request handling → Native permission database: checks and updates
su.c - su request handling → Request activity dispatch: dispatches interactive request
- Request activity dispatch → Request confirmation: starts with request details
activity.cpp - Request confirmation → su request handling: sends decision by socket
src/org/zenthought/android/su/SuRequest.java - Device user → Request confirmation: chooses allow or deny
src/org/zenthought/android/su/SuRequest.java - Device user → Permission list and removal: manages permissions
src/org/zenthought/android/su/Su.java - Permission list and removal → App permission database: queries and deletes
src/org/zenthought/android/su/Su.java