Skip to content

[feature] Allow user-defined root shell command with fallback mechanism for non‑standard su binaries #2654

@LangLang03

Description

@LangLang03

Is your feature request related to a problem? Please describe.
Yes. On some devices (e.g., certain Vivo models), the standard su binary is blocked at the hardware or kernel level, even when the device is rooted. A different elevated shell command, such as suu, is required to obtain root privileges. However, the application hardcodes the use of su for privilege escalation, making it impossible to gain root access on these devices. This also affects PC-side operations and ADB-based installation workflows that rely on the app's fixed su command.

Describe the solution you'd like
I would like the application to support a configurable "su" command. Specifically:

  • Provide a setting (e.g., in preferences, a config file, or an environment variable) where the user can specify the custom root shell command to use (e.g., suu, /system/xbin/suu, su -c, etc.).
  • When the app needs to execute a command as root, it should use the user-defined command instead of the hardcoded su.
  • Fallback behavior: If the custom command fails or is not set, the app should fall back to the default su (or try a predefined list of common alternatives, optionally).
  • This setting should be accessible both from the device UI and, ideally, also through an ADB or configuration file push for headless/PC-side automation.

Describe alternatives you've considered

  • Manually replacing the su binary or creating a symlink from suu to su – not always possible due to system protection or selinux policies, and can break OTA updates.
  • Patching the application binary or script each time an update is released – unsustainable and inconvenient.
  • Using a wrapper script that intercepts su calls – complex and may not survive app sandboxing restrictions.
  • Hoping the app will auto-detect suu – not currently implemented and unreliable across different device implementations.

Additional context
This feature is critical for users of Vivo and similar devices where the root management solution relies on a non-standard command (such as suu). Without this, the app cannot perform any operations requiring root, effectively making it unusable on these devices regardless of the ADB or PC-side setup. Being able to set the command once and have it persist across app restarts would greatly improve compatibility. If feasible, supporting an ordered list of fallback commands (e.g., suu, su, /system/bin/su) could further improve the out-of-box experience.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions