Is not `SYSTEM_SHELL` an Android role? I get:

```bash
adb shell cmd role add-role-holder SYSTEM_SHELL com.termux.api
```
```
Error: see logcat for details.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Failed
```

```bash
adb logcat
```
```
RoleControllerServiceImpl: Unknown role: SYSTEM_SHELL
```
Apr 11, 7:28pm

You are correct that SYSTEM_SHELL is not a standard Android role. The error "Unknown role: SYSTEM_SHELL" confirms that this role does not exist in the Android system's role management system. Android roles are predefined and documented, and SYSTEM_SHELL is not among them. Instead, Android roles are used for specific system-level purposes, such as default apps for SMS, browser, or assistant roles, and are not intended for shell access or general privilege escalation.

Why are you getting this error?

  • The SYSTEM_SHELL role does not exist in Android's role system, so you cannot add a role holder for it.
  • If you are trying to grant Termux API or another app access to shell commands, you should use the correct Android permissions or roles that are relevant to your use case, such as WRITE_SECURE_SETTINGS or READ_LOGS for Termux API, as documented in Termux API's GitHub issues.

What should you do instead?

  • If you want to grant Termux API access to certain system features, use:
    bash
    adb shell pm grant com.termux.api android.permission.WRITE_SECURE_SETTINGS
    adb shell pm grant com.termux.api android.permission.READ_LOGS
  • If you need shell access, consider using su or root access, as the standard Android shell does not grant elevated privileges by default.

Would you like help with a specific use case or permission setup?

Apr 11, 7:28pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.