Skip to main content

Run Windows exe on Android through Proot Exagear on Termux

Smartphone Termux Tutorial Termux Windows Android
Table of Contents

🇹🇼 中文版

It is possible to run 32bit Windows exe on Android. Exagear allows you to run x86 programs on ARM platform.

Exagear, released by the Russian company ElTechs a few years ago, can translate X86 into ARM instructions, and when used with Wine, it can execute Windows programs on Android phones without root. (Wine is the software that allows Linux computers to execute Windows exe)

Although Exagear was later bought by Huawei ( related discussion on Zhihu), a Russian developer on Github released the Termux Proot version of Exagear.

First you need to install Termux. Then install a i686 32bit proot rootfs with Exagear included. And run 32bit Windows exe using Wine(x86).

You could run 32bit Windows exe in proot.

Even Google Chrome (32bit) works! Though it is slow.

Also you could run some 2D old games, for example Fate/Stay Night. And there is no GPU acceleration.

Follow below steps to install proot-exagear to your system.

Please note that currently Exagear executables on the Internet are somewhat illegal because it was closed-source software and it has been bought by Huawei in 2019. If you are aware of this, you should try Box86 on Proot instead.

Install Proot Exagear
#

  • Device: Sony Xperia 5 II, 8GB RAM, Android 11.
  • Termux version: 0.118.0
  1. Install Termux and Real VNC VIewer

  2. Install tar and git:

pkg update
pkg install tar git
  1. The proot-exagear is developed by Zhymabek Roman. Let’s clone it:
git clone https://github.com/ZhymabekRoman/Exagear-For-Termux ~/ExaTermux
cd ~/ExaTermux
git submodule init
git submodule update
  1. Download Debian 10 rootfs from Termux Proot and extract it. (The lastest Debian 11 rootfs provided by the developer of Proot-Exagear does not work for me )
wget https://github.com/termux/proot-distro/releases/download/v1.1-debian-rootfs/debian-buster-i386-2020.12.05.tar.gz

mkdir exagear-fs/ && tar -C exagear-fs/ --warning=no-unknown-keyword --delay-directory-restore --preserve-permissions --strip=0 -xvf debian-buster-i386-2020.12.05.tar.gz --exclude='dev'||: && cd exagear-fs/ && mv debian-buster-i386-2020.12.05/* ./ && rm -rfv debian-buster-i386-2020.12.05/ && cd ../
  1. Login to Debian:
chmod +x start-exagear.sh
./start-exagear.sh login --old --shared-tmp
  1. Update packages
apt update
apt upgrade

If E: Sub-process /usr/bin/dpkg returned an error code (1) occurs, run:

cd /var/lib/dpkg/
mv info info.bk
mkdir info
apt update && apt install -f
cd info
mv ./* ../info.bk
cd ..
rm -rf info
mv info.bk info
cd
  1. Install XFCE4, TigerVNC, sudo. Be patient, it is slow.
apt install sudo vim fonts-noto-cjk xfce* tigervnc*
  1. Add a new user and setup password:
addgroup wheel users
useradd -m -g users -G wheel -s /bin/bash ivon
passwd ivon
  1. Run visudo, add following lines under"root ALL=(ALL) ALL":
ivon ALL=(ALL) ALL
  1. Install Wine and WineTricks
wget -nc https://dl.winehq.org/wine-builds/winehq.key
apt-key add winehq.key
echo "deb https://dl.winehq.org/wine-builds/debian/ buster main" >>  /etc/apt/sources.list
apt update
apt install winehq-staging winetricks zenity
  1. Finaly, setup PulseAudio. Add following lines to your ~/.bashrc:
export PULSE_SERVER=127.0.0.1
  1. Slide from left, start a new Termux session. Add following lines to the first line of start-exagear.sh:
pulseaudio --start --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
  1. Add this to /data/data/com.termux/files/usr/etc/pulse/default.pa:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
  1. Restart Termux and login to Debian. Run VNC server, setup 6 characters password:
vncserver
  1. Click application menu on top left. Run winetricks --gui. Wait for Wine to finish install.

  2. Now try to run some 32 bit exe. See Termux wiki to know how to access Termux directory from Android file manager.

References
#

Related

[Root] Box86 + Wine in 64bit chroot on Android
Smartphone Termux Tutorial Termux
[Root] Running docker container on Redmi Note 5 Pro
Smartphone Root and Custom Rom Termux Android Linux Docker
Netboot: Booting postmarketOS from the Internet
Smartphone Linux Phone PostmarketOS

Leave a comment

Choose the comment system you like. Giscus for codes, Disqus for anonymous comments.

Please login to your Github account to leave a comment. You can post codes here for discussion. For images, please upload to Imgur and copy links. Your comments would be visible to everyone on Github Discussions.

This comment system is provided by Disqus, you may see forcing Disqus ADs on this page. Sometimes your comment may need to be reviewed, resulting in delayed display. Thank you for your understanding.