Skip navigation links
A B C D E F G H I K L O P R S T U V W 

A

ACTION_HIDE_OVERLAYS - Static variable in class eu.chainfire.libsuperuser.HideOverlaysReceiver
 
addCommand(String) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add a command to execute
addCommand(String, int, Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add a command to execute, with a callback to be called on completion
addCommand(List<String>) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add commands to execute
addCommand(List<String>, int, Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add commands to execute, with a callback to be called on completion (of all commands)
addCommand(String[]) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add commands to execute
addCommand(String[], int, Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add commands to execute, with a callback to be called on completion (of all commands)
addCommand(String) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add a command to execute
addCommand(String, int, Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add a command to execute, with a callback to be called on completion
addCommand(String, int, Shell.OnCommandLineListener) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add a command to execute, with a callback.
addCommand(List<String>) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add commands to execute
addCommand(List<String>, int, Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add commands to execute, with a callback to be called on completion (of all commands)
addCommand(List<String>, int, Shell.OnCommandLineListener) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add commands to execute, with a callback.
addCommand(String[]) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add commands to execute
addCommand(String[], int, Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add commands to execute, with a callback to be called on completion (of all commands)
addCommand(String[], int, Shell.OnCommandLineListener) - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Add commands to execute, with a callback.
addEnvironment(String, String) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add or update an environment variable
addEnvironment(Map<String, String>) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Add or update environment variables
Application - Class in eu.chainfire.libsuperuser
Base application class to extend from, solving some issues with toasts and AsyncTasks you are likely to run into
Application() - Constructor for class eu.chainfire.libsuperuser.Application
 
available() - Static method in class eu.chainfire.libsuperuser.Shell.SU
Detects whether or not superuser access is available, by checking the output of the "id" command if available, checking if a shell runs at all otherwise
availableTestCommands - Static variable in class eu.chainfire.libsuperuser.Shell
 

B

Builder() - Constructor for class eu.chainfire.libsuperuser.Shell.Builder
 

C

canInject() - Static method in class eu.chainfire.libsuperuser.Policy
Detects availability of the supolicy tool.
CATEGORY_HIDE_OVERLAYS - Static variable in class eu.chainfire.libsuperuser.HideOverlaysReceiver
 
clearCachedResults() - Static method in class eu.chainfire.libsuperuser.Shell.SU
Clears results cached by isSELinuxEnforcing() and version(boolean internal) calls.
close() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Close shell and clean up all resources.
command(String, Object...) - Static method in class eu.chainfire.libsuperuser.Toolbox
Format a command string, deciding on toolbox or toybox for its execution If init() has not already been called, it is called for you, which may throw an exception if we're in the main thread.

D

Debug - Class in eu.chainfire.libsuperuser
Utility class for logging and debug features that (by default) does nothing when not in debug mode
Debug() - Constructor for class eu.chainfire.libsuperuser.Debug
 
Debug.OnLogListener - Interface in eu.chainfire.libsuperuser
 

E

eu.chainfire.libsuperuser - package eu.chainfire.libsuperuser
 
EXCEPTION_COMMAND - Static variable in exception eu.chainfire.libsuperuser.ShellOnMainThreadException
 
EXCEPTION_NOT_CLOSED - Static variable in exception eu.chainfire.libsuperuser.ShellNotClosedException
 
EXCEPTION_NOT_IDLE - Static variable in exception eu.chainfire.libsuperuser.ShellOnMainThreadException
 
EXCEPTION_TOOLBOX - Static variable in exception eu.chainfire.libsuperuser.ShellOnMainThreadException
 
EXCEPTION_WAIT_IDLE - Static variable in exception eu.chainfire.libsuperuser.ShellOnMainThreadException
 
EXTRA_HIDE_OVERLAYS - Static variable in class eu.chainfire.libsuperuser.HideOverlaysReceiver
 

F

finalize() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
 

G

getDebug() - Static method in class eu.chainfire.libsuperuser.Debug
Is debug mode enabled ?
getInjectCommands() - Method in class eu.chainfire.libsuperuser.Policy
Transform the policies defined by getPolicies() into a set of shell commands
getInjectCommands(boolean) - Method in class eu.chainfire.libsuperuser.Policy
Transform the policies defined by getPolicies() into a set of shell commands
getLogTypeEnabled(int) - Static method in class eu.chainfire.libsuperuser.Debug
Is logging for specific types of messages enabled ?
getLogTypeEnabledEffective(int) - Static method in class eu.chainfire.libsuperuser.Debug
Is logging for specific types of messages enabled ?
getOnLogListener() - Static method in class eu.chainfire.libsuperuser.Debug
Get the currently registered custom log handler
getPolicies() - Method in class eu.chainfire.libsuperuser.Policy
Override this method to return a array of strings containing the policies you want to inject.
getSanityChecksEnabled() - Static method in class eu.chainfire.libsuperuser.Debug
Are sanity checks enabled ?
getSanityChecksEnabledEffective() - Static method in class eu.chainfire.libsuperuser.Debug
Are sanity checks enabled ?

H

hasHandler() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Are we using a Handler to post callbacks ?
haveInjected() - Static method in class eu.chainfire.libsuperuser.Policy
 
HideOverlaysReceiver - Class in eu.chainfire.libsuperuser
Base receiver to extend to catch notifications when overlays should be hidden.
HideOverlaysReceiver() - Constructor for class eu.chainfire.libsuperuser.HideOverlaysReceiver
 

I

init() - Static method in class eu.chainfire.libsuperuser.Toolbox
Initialize.
inject() - Method in class eu.chainfire.libsuperuser.Policy
Inject the policies defined by getPolicies().
inject(Shell.Interactive, boolean) - Method in class eu.chainfire.libsuperuser.Policy
Inject the policies defined by getPolicies().
isIdle() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Have all commands completed executing ?
isRunning() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Is our shell still running ?
isSELinuxEnforcing() - Static method in class eu.chainfire.libsuperuser.Shell.SU
Detect if SELinux is set to enforcing, caches result
isSU(String) - Static method in class eu.chainfire.libsuperuser.Shell.SU
Attempts to deduce if the shell command refers to a su shell

K

kill() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Try to clean up as much as possible from a shell that's gotten itself wedged.

L

log(String) - Static method in class eu.chainfire.libsuperuser.Debug
Log a "general" message
LOG_ALL - Static variable in class eu.chainfire.libsuperuser.Debug
 
LOG_COMMAND - Static variable in class eu.chainfire.libsuperuser.Debug
 
LOG_GENERAL - Static variable in class eu.chainfire.libsuperuser.Debug
 
LOG_NONE - Static variable in class eu.chainfire.libsuperuser.Debug
 
LOG_OUTPUT - Static variable in class eu.chainfire.libsuperuser.Debug
 
logCommand(String) - Static method in class eu.chainfire.libsuperuser.Debug
Log a "per-command" message
logOutput(String) - Static method in class eu.chainfire.libsuperuser.Debug
Log a line of stdout/stderr output

O

onCommandResult(int, int) - Method in interface eu.chainfire.libsuperuser.Shell.OnCommandLineListener
Command result callback
onCommandResult(int, int, List<String>) - Method in interface eu.chainfire.libsuperuser.Shell.OnCommandResultListener
Command result callback
onCreate() - Method in class eu.chainfire.libsuperuser.Application
 
onHideOverlays(Context, Intent, boolean) - Method in class eu.chainfire.libsuperuser.HideOverlaysReceiver
Called when overlays should be hidden or may be shown again.
onLine(String) - Method in interface eu.chainfire.libsuperuser.StreamGobbler.OnLineListener
Line callback
onLog(int, String, String) - Method in interface eu.chainfire.libsuperuser.Debug.OnLogListener
 
onMainThread() - Static method in class eu.chainfire.libsuperuser.Debug
Are we running on the main thread ?
onReceive(Context, Intent) - Method in class eu.chainfire.libsuperuser.HideOverlaysReceiver
 
open() - Method in class eu.chainfire.libsuperuser.Shell.Builder
Construct a Shell.Interactive instance, and start the shell
open(Shell.OnCommandResultListener) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Construct a Shell.Interactive instance, try to start the shell, and call onCommandResultListener to report success or failure

P

parseAvailableResult(List<String>, boolean) - Static method in class eu.chainfire.libsuperuser.Shell
See if the shell is alive, and if so, check the UID
Policy - Class in eu.chainfire.libsuperuser
Helper class for modifying SELinux policies, reducing the number of calls to a minimum.
Policy() - Constructor for class eu.chainfire.libsuperuser.Policy
 

R

resetCanInject() - Static method in class eu.chainfire.libsuperuser.Policy
Reset cached can-inject state and force redetection on nect canInject() call
resetInjected() - Static method in class eu.chainfire.libsuperuser.Policy
Reset policies-have-been-injected state, if you really need to inject them again.
run(String, String[], boolean) - Static method in class eu.chainfire.libsuperuser.Shell
Deprecated.
run(String, String[], String[], boolean) - Static method in class eu.chainfire.libsuperuser.Shell
Runs commands using the supplied shell, and returns the output, or null in case of errors.
run(String) - Static method in class eu.chainfire.libsuperuser.Shell.SH
Runs command and return output
run(List<String>) - Static method in class eu.chainfire.libsuperuser.Shell.SH
Runs commands and return output
run(String[]) - Static method in class eu.chainfire.libsuperuser.Shell.SH
Runs commands and return output
run(String) - Static method in class eu.chainfire.libsuperuser.Shell.SU
Runs command as root (if available) and return output
run(List<String>) - Static method in class eu.chainfire.libsuperuser.Shell.SU
Runs commands as root (if available) and return output
run(String[]) - Static method in class eu.chainfire.libsuperuser.Shell.SU
Runs commands as root (if available) and return output
run() - Method in class eu.chainfire.libsuperuser.StreamGobbler
 
runInApplicationThread(Runnable) - Method in class eu.chainfire.libsuperuser.Application
Run a runnable in the main application thread

S

setAutoHandler(boolean) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Automatically create a handler if possible ? Default to true
setDebug(boolean) - Static method in class eu.chainfire.libsuperuser.Debug
Enable or disable debug mode
setHandler(Handler) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Set a custom handler that will be used to post all callbacks to
setLogTypeEnabled(int, boolean) - Static method in class eu.chainfire.libsuperuser.Debug
Enable or disable logging specific types of message
setMinimalLogging(boolean) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Enable/disable reduced logcat output
setOnLogListener(Debug.OnLogListener) - Static method in class eu.chainfire.libsuperuser.Debug
Register a custom log handler
setOnSTDERRLineListener(StreamGobbler.OnLineListener) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Set a callback called for every line output to STDERR by the shell
setOnSTDOUTLineListener(StreamGobbler.OnLineListener) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Set a callback called for every line output to STDOUT by the shell
setSanityChecksEnabled(boolean) - Static method in class eu.chainfire.libsuperuser.Debug
Enable or disable sanity checks
setShell(String) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Set shell binary to use.
setWantSTDERR(boolean) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Set if error output should be appended to command block result output
setWatchdogTimeout(int) - Method in class eu.chainfire.libsuperuser.Shell.Builder
Enable command timeout callback
SH() - Constructor for class eu.chainfire.libsuperuser.Shell.SH
 
Shell - Class in eu.chainfire.libsuperuser
Class providing functionality to execute commands in a (root) shell
Shell() - Constructor for class eu.chainfire.libsuperuser.Shell
 
shell(int, String) - Static method in class eu.chainfire.libsuperuser.Shell.SU
Constructs a shell command to start a su shell using the supplied uid and SELinux context.
Shell.Builder - Class in eu.chainfire.libsuperuser
Builder class for Shell.Interactive
Shell.Interactive - Class in eu.chainfire.libsuperuser
An interactive shell - initially created with Shell.Builder - that executes blocks of commands you supply in the background, optionally calling callbacks as each block completes.
Shell.OnCommandLineListener - Interface in eu.chainfire.libsuperuser
Command per line callback for parsing the output line by line without buffering It also notifies the recipient of the completion of a command block, including the (last) exit code.
Shell.OnCommandResultListener - Interface in eu.chainfire.libsuperuser
Command result callback, notifies the recipient of the completion of a command block, including the (last) exit code, and the full output
Shell.SH - Class in eu.chainfire.libsuperuser
This class provides utility functions to easily execute commands using SH
Shell.SU - Class in eu.chainfire.libsuperuser
This class provides utility functions to easily execute commands using SU (root shell), as well as detecting whether or not root is available, and if so which version.
shellMountMaster() - Static method in class eu.chainfire.libsuperuser.Shell.SU
Constructs a shell command to start a su shell connected to mount master daemon, to perform public mounts on Android 4.3+ (or 4.2+ in SELinux enforcing mode)
ShellNotClosedException - Exception in eu.chainfire.libsuperuser
Exception class used to notify developer that a shell was not close()d
ShellNotClosedException() - Constructor for exception eu.chainfire.libsuperuser.ShellNotClosedException
 
ShellOnMainThreadException - Exception in eu.chainfire.libsuperuser
Exception class used to crash application when shell commands are executed from the main thread, and we are in debug mode.
ShellOnMainThreadException(String) - Constructor for exception eu.chainfire.libsuperuser.ShellOnMainThreadException
 
StreamGobbler - Class in eu.chainfire.libsuperuser
Thread utility class continuously reading from an InputStream
StreamGobbler(String, InputStream, List<String>) - Constructor for class eu.chainfire.libsuperuser.StreamGobbler
StreamGobbler constructor
StreamGobbler(String, InputStream, StreamGobbler.OnLineListener) - Constructor for class eu.chainfire.libsuperuser.StreamGobbler
StreamGobbler constructor
StreamGobbler.OnLineListener - Interface in eu.chainfire.libsuperuser
Line callback interface
SU() - Constructor for class eu.chainfire.libsuperuser.Shell.SU
 

T

TAG - Static variable in class eu.chainfire.libsuperuser.Debug
 
toast(Context, String) - Static method in class eu.chainfire.libsuperuser.Application
Shows a toast message
Toolbox - Class in eu.chainfire.libsuperuser
Utility class to decide between toolbox and toybox calls on M.
Toolbox() - Constructor for class eu.chainfire.libsuperuser.Toolbox
 

U

useSH() - Method in class eu.chainfire.libsuperuser.Shell.Builder
Convenience function to set "sh" as used shell
useSU() - Method in class eu.chainfire.libsuperuser.Shell.Builder
Convenience function to set "su" as used shell

V

version(boolean) - Static method in class eu.chainfire.libsuperuser.Shell.SU
Detects the version of the su binary installed (if any), if supported by the binary.

W

waitForIdle() - Method in class eu.chainfire.libsuperuser.Shell.Interactive
Wait for idle state.
A B C D E F G H I K L O P R S T U V W 
Skip navigation links