ShellUtils

object ShellUtils : CloseableUtils

Shell 工具类.

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
fun addAdbShellStatusChangeListener(origin: Any, listener: (isValid: Boolean) -> Unit): Result

添加 adb shell状态改变监听器

Link copied to clipboard
fun newAdbShell(origin: Any, environment: Map<String, String> = emptyMap()): <Error class: unknown class>

新建一个具有 Adb 权限的 Shell.

Link copied to clipboard
fun newApplicationShell(origin: Any, environment: Map<String, String> = emptyMap()): <Error class: unknown class>

新建一个具有普通权限的 Shell

Link copied to clipboard
fun newRootShell(origin: Any, environment: Map<String, String> = emptyMap()): <Error class: unknown class>

新建一个具有 root 权限的 Shell

Link copied to clipboard
fun removeAdbShellStatusChangeListener(origin: Any, listener: (isValid: Boolean) -> Unit): Result

移除 adb shell 状态改变监听器