Skip to content
DIY Wallet
EN

Build the app

Compile the OneKey desktop app on your computer from its source code.

  • 60 min
  • On your computer
Parts and options

The app runs on your computer, shows your balances and prepares transactions. You build it from source for the same reason you built the firmware: so you know what you’re running.

The desktop app is the right choice here. It includes everything it needs to talk to your wallet. The browser extension and the web app load that part from OneKey’s servers when they run.

The one change

When a device connects, the OneKey app checks that OneKey made it. Your device will always fail that check, because only OneKey’s factory can give a device the certificate it asks for. So before building, you apply a one-line change that skips the check. You can read the whole change before you apply it: app-skip-genuine-check.patch.

Install the tools

You need Git and Node.js version 22 or 24, on a Mac or a Linux computer.

  1. Install Apple’s command-line tools, which include Git. In Terminal, run xcode-select --install and follow the prompts.
  2. Install Node.js 22 LTS or 24 LTS from nodejs.org.
  1. Install Git and the usual build tools, for example on Debian or Ubuntu: sudo apt install -y git rsync build-essential python3 pkg-config libudev-dev.
  2. Install Node.js 22 LTS or 24 LTS, from nodejs.org or your distribution.

Close the terminal and open a new one, so it sees the new tools.

Download the source and apply the change

On your computer
git clone --depth 1 --branch v6.6.3 https://github.com/OneKeyHQ/app-monorepo.git
cd app-monorepo
git log -1 --format=%H

The last command should print d510ab79e622ed042444940b8a848c1b1628ab68, the commit OneKey released as v6.6.3.

On your computer
curl -fLO https://raw.githubusercontent.com/rayston92/firmware-classic1s/diy/diy/app-skip-genuine-check.patch
git apply app-skip-genuine-check.patch

git apply prints nothing when it works.

Build

These commands download the app’s libraries and compile it. Expect 30 minutes to an hour, and keep other heavy programs closed: the build uses a lot of memory.

On your computer
corepack enable
export ONEKEY_FONTS_FORCE_FALLBACK=1
yarn
cd apps/desktop
yarn build:renderer
yarn build:main
yarn install-app-deps

If corepack enable says permission denied, run it as sudo corepack enable, then continue.

ONEKEY_FONTS_FORCE_FALLBACK tells the build to use the open-source Inter font instead of trying to download OneKey’s licensed brand font, which you don’t have access to.

Now package it as a program you can open:

On your computer
npx electron-builder build --mac --dir --config electron-builder.config.js -c.mac.identity=null --publish never

The app is in apps/desktop/build-electron, in a folder starting with mac. Open OneKey.app from there. The first time, macOS may say it can’t check the developer: right-click the app, choose Open, then Open again.

On your computer
npx electron-builder build --linux --dir --config electron-builder.config.js --publish never
sudo cp public/static/udev/99-onekey.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

The app is apps/desktop/build-electron/linux-unpacked/onekey-wallet. The second and third commands let it open the wallet’s USB connection without running as root.

Checkpoint

The app opens and shows its welcome screen. Leave it open for the next step.

Done? Go to step 7Connect and create your wallet

Last checked against the source code on