ShellPolicy
Optional host-side denylist for the dedicated shell tools. Passed to ShellTools.all (and the ShizukuTools / RootTools providers); the LLM cannot change it.
The dedicated tools are powerful even without run_shell: put_secure_setting can enable an accessibility service or notification listener, switch the default IME or turn on ADB; grant_permission can grant development permissions such as WRITE_SECURE_SETTINGS. So the default everywhere is RECOMMENDED, which denies the keys in RECOMMENDED_DENIED_SETTING_KEYS and the permissions in RECOMMENDED_DENIED_PERMISSIONS. A host that really needs those writes opts out explicitly:
ShizukuTools.all(context, ShellPolicy.PERMISSIVE)Denied calls return a denied_by_policy error without spawning anything.
Properties
permissions grant_permission refuses to grant. Matched exactly (permission names are case-sensitive). revoke_permission is not affected.
settings keys put_secure_setting / put_global_setting / put_system_setting refuse to write, in any namespace. Matched case-insensitively.
Functions
True if granting permission is denied.
True if writing settings key key is denied.