AlpineSandbox
class AlpineSandbox(context: Context, workspace: File, image: RootfsImage? = RootfsImage.forDevice(), home: File = File(context.filesDir, "sandbox/alpine")) : ShellRuntime(source)
A Linux sandbox for the agent's shell: PRoot (bundled, built from upstream termux/proot) runs an Alpine Linux root filesystem as an unprivileged user-space "container". The agent gets a real /bin/sh, BusyBox and apk, so it can install Python, git, compilers… without root and without touching the rest of the app.
The root filesystem is downloaded (pinned, checksum-verified) on first use into app storage; state reports progress. workspace is mounted at /workspace (the working directory), so files the agent edits with the file tools and the shell are the same.
The app must package native libraries extracted (packaging.jniLibs.useLegacyPackaging = true): Android only lets apps execute files in their native library directory.
Constructors
Link copied to clipboard
constructor(context: Context, workspace: File, image: RootfsImage? = RootfsImage.forDevice(), home: File = File(context.filesDir, "sandbox/alpine"))