631 B
631 B
Library for KernelSU's module WebUI
Install
yarn add kernelsu
API
exec
Execute a command in the root shell.
options:
cwd- Current working directory of the child processenv- Environment key-value pairs
import { exec } from 'kernelsu';
const { stdout, stderr } = await exec('ls -l', { cwd: '/tmp'});
console.log(stdout);
fullScreen
Request the WebView enter/exit full screen.
import { fullScreen } from 'kernelsu';
fullScreen(true);
toast
Show a toast message.
import { toast } from 'kernelsu';
toast('Hello, world!');