libsu
A complete solution for apps using root permissions
...The library focuses on developer ergonomics: thread-safe helpers, Kotlin-friendly APIs, and utilities for file operations, process management, and parcelable data transfer. It’s designed to interoperate smoothly with Magisk-based root environments while degrading gracefully on non-rooted devices when possible. Attention is given to security and correctness—avoiding resource leaks, handling timeouts, and containing elevated operations to explicit scopes. For apps that legitimately need privileged automation or maintenance tasks, libsu becomes the backbone that keeps the “root” parts predictable and testable.