🇺🇸 English version
幾年前俄羅斯公司ElTechs發表的Exagear,能夠將X86翻譯成ARM的指令,配合Wine就能在手機執行電腦程式,不需要root。(Wine是讓Linux電腦能夠執行Windows exe的軟體)
雖然後來Exagear的技術被華為買走(相關討論),不過Github有俄羅斯人釋出Termux Proot版的Exagear。
主要原理是在Termux安裝i686 32位元的Proot Debian環境,再用Wine執行32位元的Windows exe。
在Exagear之外,還有一個開源的競爭對手:Box86/Box64
遊戲Fate/stay night

音樂播放器foobar2000

文字編輯器Notepad++

圖片檢視器HoneyView

Google Chrome可攜版

- 開啟Termux安裝tar和git
1
2
| pkg update
pkg install tar git
|
- 複製Exagear-For-Termux儲存庫,並加入submodule
1
2
3
4
| git clone https://github.com/ZhymabekRoman/Exagear-For-Termux ~/ExaTermux
cd ~/ExaTermux
git submodule init
git submodule update
|
- 下載Termux Proot提供的Debian 10檔案系統 (Proot-Exagear開發者有出Debian 11版的rootfs,不過問題很多)
1
2
3
| 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
2
| chmod +x start-exagear.sh
./start-exagear.sh login --old --shared-tmp
|
- 這樣32位元的Debian環境就設定好了,首先進行更新:
1
2
| apt update
apt upgrade
|
如果APT安裝出現E: Sub-process /usr/bin/dpkg returned an error code (1),執行:
1
2
3
4
5
6
7
8
9
10
11
| cd /var/lib/dpkg/
mv info info.bk
mkdir info
apt update
apt -f install
cd info
mv ./* ../info.bk
cd ..
rm -rf info
mv info.bk info
cd
|
- 安裝XFCE4桌面環境和VNC伺服器
1
| apt install sudo vim fonts-noto-cjk xfce* tigervnc*
|
- 新增一般使用者ivon,修改密碼
1
2
3
| addgroup wheel users
useradd -m -g users -G wheel -s /bin/bash ivon
passwd ivon
|
- 執行
visudo
,用VIM在"root ALL=(ALL) ALL"的下一行加入以下內容:
- 安裝Wine和Winetricks
1
2
3
4
5
| 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 -y
|
- 接著設定PulseAudio,在
~/.bashrc
加入:
1
| export PULSE_SERVER=127.0.0.1
|
- 左邊滑出來,開第二個終端機,編輯
start-exagear.sh
,在最上方加入:
1
2
| pulseaudio --start --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
|
- 接著編輯
/data/data/com.termux/files/usr/etc/pulse/default.pa
:
1
| load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
|
- 重新啟動Termux再登入Debian。啟動vcncserver,第一次啟動會要求設定六位數密碼。
開啟Real VNC Viewer,新增連線,輸入localhost:1
連線
從XFCE右上角應用程式按Run Program
,搜尋winetricks --gui
,執行後Wine會進行更新,再安裝mono,大約5分鐘。

最後就可以來試試各種32位元Widnows程式了!如果想知道如何把檔案移動到Termux的內部目錄,請看這篇: 手機檔案管理器如何存取Termux的內部目錄
跟Box86/Box64 + Wine比起來,雖然Exagear只能執行32位元的程式,但至少Termux本身是64位元的情況下可以直接裝32位元的Debian,不需要整個重裝32位元版的Termux。
Exagear唯一的缺點是閉源收費,導致網路上流傳的版本似乎都是盜版,包括這個Debian的版本。並且Proot的速度慢的要命。