This repository contains the files to build a snap package that bundles box64 and box86. This allows you to run x86 and x86_64 Linux programs on your aarch64 device.
To build this snap, you will need the following installed on your system:
snapcraftlxd
You can install them using snap:
sudo snap install snapcraft --classic
sudo snap install lxd
sudo lxd init --autoTo build the snap, clone this repository and run snapcraft pack from the root of the repository:
git clone <this-repository-url>
cd <repository-directory>
snapcraft packIf you are building on a non-arm64 machine, you can build for arm64 using lxd:
snapcraft pack --use-lxdThis will create a .snap file in the current directory.
To install the locally built snap, use the snap install command with the --dangerous and --classic flags:
sudo snap install --classic --dangerous your-snap-file.snapNote on --dangerous flag: When you build a snap locally, it is not signed by the Snap Store. The --dangerous flag tells your system that you trust the snap and want to install it despite the missing signature. This is the standard procedure for installing local snaps.
Once installed, the box64 and box86 commands will be available, prefixed with the snap name:
# Check the version of box64
box64-86.box64 -v
# Check the version of box86
box64-86.box86 -v
# Run an x86_64 application
box64-86.box64 /path/to/your/x64/application
# Run an x86 application
box64-86.box86 /path/to/your/x86/applicationThis snap is built with "classic" confinement. This means it is not sandboxed and has the same access to your system as a traditionally installed application. This broad access is necessary for tools like box64 and box86 to function correctly, as they need to interact with a wide range of system libraries and processes.