Skip to content

Instantly share code, notes, and snippets.

@binarycraft007
Created March 23, 2026 09:08
Show Gist options
  • Select an option

  • Save binarycraft007/7bd95be326cbfd1f04fefe7dc2f396a7 to your computer and use it in GitHub Desktop.

Select an option

Save binarycraft007/7bd95be326cbfd1f04fefe7dc2f396a7 to your computer and use it in GitHub Desktop.
ieltsbro repackaging

Converting Windows Electron App to Linux aarch64

This document outlines the steps taken to convert the Windows version of the "雅思哥机考软件" (yasige) Electron application to run natively on a Linux aarch64 (ARM64) host.

Prerequisites

Ensure you have Node.js and npm installed on your Linux aarch64 system:

node -v
npm -v

Step-by-Step Guide

1. Extract the Application Source Code

Electron applications bundle their source code into an app.asar archive, typically found in the resources directory of the application bundle. We first need to extract this archive to access the package.json and source files.

Navigate to the resources directory and extract the archive:

cd /home/elliot/Downloads/yasige/resources
npx --yes asar extract app.asar app-source

This creates a new folder called app-source containing the application's code.

2. Re-install Dependencies for Linux aarch64

The original application was built for Windows, meaning any native Node.js modules were compiled for win32. We need to reinstall the dependencies directly on the Linux aarch64 host so that native modules (like node-machine-id or crypto) are recompiled for the target architecture.

cd app-source
npm install

3. Package the Application for Linux

Once the dependencies are correctly installed for Linux ARM64, we use @electron/packager to bundle the application with the Linux-specific Electron binaries.

By inspecting the package.json, we determined the app uses Electron version 21.4.4. We pass this version to the packager:

npx --yes @electron/packager . yasige --platform=linux --arch=arm64 --electron-version=21.4.4 --out=../linux-build --overwrite

This command:

  • Targets the current directory (.)
  • Names the executable yasige
  • Builds for linux on arm64 architecture
  • Uses the exact Electron version specified in the project
  • Outputs the final build to a new directory ../linux-build

4. Verify the Build

You can verify that the resulting executable is a native 64-bit ARM Linux binary:

file ../linux-build/yasige-linux-arm64/yasige

Expected output should indicate: ELF 64-bit LSB pie executable, ARM aarch64...

You can also check that all shared library dependencies are satisfied on your host:

ldd ../linux-build/yasige-linux-arm64/yasige | grep "not found"

(If this outputs nothing, all shared libraries are successfully linked.)

5. Run the Application

Navigate to the build output directory and run the newly compiled native Linux binary:

cd ../linux-build/yasige-linux-arm64
./yasige --no-sandbox

(Note: The --no-sandbox flag is often required for Electron apps running on certain Linux configurations, especially within containers or specialized environments. If it runs fine without it, you may omit it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment