* ksu 对象的运行时接口 * 对应 Android 端 KernelSU WebUI 注入的原生方法
| 20 | * 对应 Android 端 KernelSU WebUI 注入的原生方法 |
| 21 | */ |
| 22 | interface KsuRuntime { |
| 23 | /** 执行 shell 命令 */ |
| 24 | exec(command: string, optionsJson: string, callbackName: string): void; |
| 25 | |
| 26 | /** 启动子进程 */ |
| 27 | spawn(command: string, argsJson: string, optionsJson: string, callbackName: string): void; |
| 28 | |
| 29 | /** 切换全屏模式 */ |
| 30 | fullScreen(isFullScreen: boolean): void; |
| 31 | |
| 32 | /** 启用边到边显示 */ |
| 33 | enableEdgeToEdge(enable: boolean): void; |
| 34 | |
| 35 | /** 显示 Toast 提示 */ |
| 36 | toast(message: string): void; |
| 37 | |
| 38 | /** 获取模块信息 */ |
| 39 | moduleInfo(): string; |
| 40 | |
| 41 | /** 列出包名 */ |
| 42 | listPackages(type: string): string; |
| 43 | |
| 44 | /** 获取包详细信息 */ |
| 45 | getPackagesInfo(packagesJson: string): string; |
| 46 | |
| 47 | /** 退出 WebUI */ |
| 48 | exit(): void; |
| 49 | } |
| 50 | |
| 51 | export {}; |
nothing calls this directly
no outgoing calls
no test coverage detected