Shells

interface Shells : Variable

Shell创建工厂接口,用于生成不同类型的Shell实例。

该接口继承自Variable,提供了创建应用Shell、root权限Shell和ADB Shell的方法。 所有创建的Shell实例都支持环境变量配置,并提供标准的输入输出流操作。

See also

Functions

Link copied to clipboard
abstract fun getGlobalName(): String

获取作为全局变量时的名称.

Link copied to clipboard
abstract fun getPublicType(): Type

获取 Variable 注入到脚本时需要显示的类型.

Link copied to clipboard
abstract fun isPrefixRequired(): Boolean

是否需要添加前缀, 每种编程语言添加的前缀不一样, 前缀可以通过 Language.getVariablePrefix 获取.

Link copied to clipboard
abstract fun isSuffixRequired(): Boolean

是否需要添加后缀, 每种编程语言添加的后缀不一样, 后缀可以通过 Language.getVariableSuffix 获取.

Link copied to clipboard
abstract fun newAdbShell(environment: Map<String, String>): Shell

创建一个ADB Shell实例,用于与Android设备通信。

Link copied to clipboard
abstract fun newApplicationShell(environment: Map<String, String>): Shell

创建一个应用级别的Shell实例。

Link copied to clipboard
abstract fun newRootShell(environment: Map<String, String>): Shell

创建一个具有root权限的Shell实例。