Skip to main content

[Root] Box86 + Wine in 64bit chroot on Android

分類 Smartphone Termux Tutorial
標籤 Termux

🇹🇼 中文版

Note: You need root permission to do this. For non-rooted devices please use Box86 in Termux Proot instead.

Note2: Not all programs can be run with Box64 + Wine. Please test running your Windows program with Wine on a x86 Linux PC first to confirm that it can run normally before running it with Box64. If you encounter any problems, please report them to the developer of Box64 first.

Some apps only work in 32bit wine. The best way is to run box86+wine in armhf Termux Proot. However it is possible to compile box86 in 64bit proot when multi-arch enabled (use raspberry pi 4 64’s compile options) but it will not work (bad address, I/O error) Only Box64 + Wine64 works (well there are still many bugs)

After following some tutorials, I tried again in 64bit chroot (Use Linux Deploy). Both Box86 and Box64 works. You may need different wineprefix for each of them, for example export WINEPREFIX=~/.wine64. This will create a new driectory for box64.

So you can run 32bit and 64bit app at the same time.

Here’s the guide of compiling box86 in 64 bit chroot:

  1. Enable multi-arch support in Ubuntu:
dpkg --add-architecture armhf
  1. Edit source list:
sudo vim /etc/apt/sources.list
  1. Add these:
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal main restricted
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates main restricted
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal universe
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates universe
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal multiverse
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates multiverse
deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse
  1. Install following packages:
sudo apt update
sudo apt install git build-essential cmake wget gcc-arm-linux-gnueabihf zenity:armhf libasound*:armhf libstdc++6:armhf mesa*:armhf
  1. Compile Box86 and download wine:
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j$(nproc)
sudo make install
cd
rm -rf box86
mkdir wine
cd wine
wget https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/PlayOnLinux-wine-7.0-rc5-upstream-linux-x86.tar.gz
tar -xvf *.tar.gz
cd
  1. Run an exe (in proot it will end up with “bad address”):
export BOX86_PATH=~/wine/bin/
export BOX86_LD_LIBRARY_PATH=~/wine/lib/wine/i386-unix/:/lib/i386-linux-gnu:/lib/aarch64-linux-gnu/
box86 wine *.exe

References

box86 and box64 wine(run x86 and x64 exe on arm64 debian/ubuntu by box86 and box64)


此處提供二種留言板。點選按鈕,選擇您覺得方便的留言板。

(留言板載入中)這是Giscus留言板,需要Github帳號才能留言。支援Markdown語法,若要上傳圖片請善用外部圖床。您的留言會在Github Discussions向所有人公開。

Click here to edit your comments.

(留言板載入中)這是Disqus留言板,您可能會看到Disqus強制投放的廣告。為防止垃圾內容,有時留言可能會被系統判定需審核,導致延遲顯示,請見諒。若要上傳圖片請善用外部圖床網站。