Files
SukiSU-Ultra/js
2024-02-22 22:09:27 +08:00
..
2024-02-22 22:09:27 +08:00
2024-02-22 22:09:27 +08:00
2024-02-22 22:09:27 +08:00

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 process
  • env - 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!');