如何在 Android 上借助 Wine 来运行 Windows Apps
Wine
![](/data/attachment/album/201807/27/203126n528251218r251tj.jpg)


Wine（一种 Linux 上的程序，不是你喝的葡萄酒）是在类 Unix 操作系统上运行 Windows 程序的一个自由开源的兼容层。创建于 1993 年，借助它你可以在 Linux 和 macOS 操作系统上运行很多 Windows 程序，虽然有时可能还需要做一些小修改。现在，Wine 项目已经发布了 3.0 版本，这个版本兼容 Android 设备。


在本文中，我们将向你展示，在你的 Android 设备上如何借助 Wine 来运行 Windows Apps。


**相关阅读** : [如何使用 Winepak 在 Linux 上轻松安装 Windows 游戏](https://www.maketecheasier.com/winepak-install-windows-games-linux/ "How to Easily Install Windows Games on Linux with Winepak")


### 在 Wine 上你可以运行什么？


Wine 只是一个兼容层，而不是一个全功能的仿真器，因此，你需要一个 x86 的 Android 设备才能完全发挥出它的优势。但是，大多数消费者手中的 Android 设备都是基于 ARM 的。


因为大多数人使用的是基于 ARM 的 Android 设备，所以有一个限制，只有适配在 Windows RT 上运行的那些 App 才能够使用 Wine 在基于 ARM 的 Android 上运行。但是随着发展，能够在 ARM 设备上运行的 App 数量越来越多。你可以在 XDA 开发者论坛上的这个 [帖子](https://forum.xda-developers.com/showthread.php?t=2092348) 中找到兼容的这些 App 的清单。


在 ARM 上能够运行的一些 App 的例子如下：


* [Keepass Portable](http://downloads.sourceforge.net/keepass/KeePass-2.20.1.zip)： 一个密码钱包
* [Paint.NET](http://forum.xda-developers.com/showthread.php?t=2411497)： 一个图像处理程序
* [SumatraPDF](http://forum.xda-developers.com/showthread.php?t=2098594)： 一个 PDF 文档阅读器，也能够阅读一些其它的文档类型
* [Audacity](http://forum.xda-developers.com/showthread.php?t=2103779)： 一个数字录音和编辑程序


也有一些再度流行的开源游戏，比如，[Doom](http://forum.xda-developers.com/showthread.php?t=2175449) 和 [Quake 2](http://forum.xda-developers.com/attachment.php?attachmentid=1640830&amp;amp;d=1358070370)，以及它们的开源克隆，比如 [OpenTTD](http://forum.xda-developers.com/showpost.php?p=36674868&amp;amp;postcount=151) 和《运输大亨》的一个版本。


随着 Wine 在 Android 上越来越普及，能够在基于 ARM 的 Android 设备上的 Wine 中运行的程序越来越多。Wine 项目致力于在 ARM 上使用 QEMU 去仿真 x86 的 CPU 指令，在该项目完成后，能够在 Android 上运行的 App 将会迅速增加。


### 安装 Wine


在安装 Wine 之前，你首先需要去确保你的设备的设置 “允许从 Play 商店之外的其它源下载和安装 APK”。对于本文的用途，你需要去许可你的设备从未知源下载 App。


1、 打开你手机上的设置，然后选择安全选项。


![wine-android-security](/data/attachment/album/201807/27/203127orx496bwud9597dl.png "wine-android-security")


2、 向下拉并点击 “Unknown Sources” 的开关。


![wine-android-unknown-sources](/data/attachment/album/201807/27/203133e1jgzacyag1aaggg.jpg "wine-android-unknown-sources")


3、 接受风险警告。


![wine-android-unknown-sources-warning](/data/attachment/album/201807/27/203136a5q2xjlibl72kspc.png "wine-android-unknown-sources-warning")


4、 打开 [Wine 安装站点](https://dl.winehq.org/wine-builds/android/)，并点选列表中的第一个选择框。下载将自动开始。


![wine-android-download-button](/data/attachment/album/201807/27/203138xwx8j838003666y6.png "wine-android-download-button")


5、 下载完成后，从下载目录中打开它，或者下拉通知菜单并点击这里的已完成的下载。


6、 开始安装程序。它将提示你它需要访问和记录音频，并去修改、删除、和读取你的 SD 卡。你也可为程序中使用的一些 App 授予访问音频的权利。


![wine-android-app-access](/data/attachment/album/201807/27/203143bkkh99l111a96jgt.jpg "wine-android-app-access")


7、 安装完成后，点击程序图标去打开它。


![wine-android-icon-small](/data/attachment/album/201807/27/203145b6u3i29nghh2f4ni.jpg "wine-android-icon-small")


当你打开 Wine 后，它模仿的是 Windows 7 的桌面。


![wine-android-desktop](/data/attachment/album/201807/27/203148w3vudpnokbo866yb.png "wine-android-desktop")


Wine 有一个缺点是，你得有一个外接键盘去进行输入。如果你在一个小屏幕上运行它，并且触摸非常小的按钮很困难，你也可以使用一个外接鼠标。


你可以通过触摸 “开始” 按钮去打开两个菜单 —— “控制面板”和“运行”。


![wine-android-start-button](/data/attachment/album/201807/27/203151e1a6w969k624kk6g.png "wine-android-start-button")


### 使用 Wine 来工作


当你触摸 “控制面板” 后你将看到三个选项 —— 添加/删除程序、游戏控制器、和 Internet 设定。


使用 “运行”，你可以打开一个对话框去运行命令。例如，通过输入 `iexplore` 来启动 “Internet Explorer”。


![wine-android-run](/data/attachment/album/201807/27/203153us1zgl14s4afd4co.png "wine-android-run")


### 在 Wine 中安装程序


1、 在你的 Android 设备上下载应用程序（或通过云来同步）。一定要记住下载的程序保存的位置。


2、 打开 Wine 命令提示符窗口。


3、 输入程序的位置路径。如果你把下载的文件保存在 SD 卡上，输入：



```
cd sdcard/Download/[filename.exe]

```

4、 在 Android 上运行 Wine 中的文件，只需要简单地输入 EXE 文件的名字即可。


如果这个支持 ARM 的文件是兼容的，它将会运行。如果不兼容，你将看到一大堆错误信息。在这种情况下，在 Android 上的 Wine 中安装的 Windows 软件可能会损坏或丢失。


这个在 Android 上使用的新版本的 Wine 仍然有许多问题。它并不能在所有的 Android 设备上正常工作。它可以在我的 Galaxy S6 Edge 上运行的很好，但是在我的 Galaxy Tab 4 上却不能运行。许多游戏也不能正常运行，因为图形驱动还不支持 Direct3D。因为触摸屏还不是全扩展的，所以你需要一个外接的键盘和鼠标才能很轻松地操作它。


即便是在早期阶段的发布版本中存在这样那样的问题，但是这种技术还是值得深思的。当然了，你要想在你的 Android 智能手机上运行 Windows 程序而不出问题，可能还需要等待一些时日。




---


via: <https://www.maketecheasier.com/run-windows-apps-android-with-wine/>


作者：[Tracey Rosenberger](https://www.maketecheasier.com/author/traceyrosenberger/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[qhwdw](https://github.com/qhwdw) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![](https://www.maketecheasier.com/assets/uploads/2018/07/Wine-Android-featured-image.jpg)

Wine (on Linux, not the one you drink) is a free and open-source compatibility layer for running Windows programs on Unix-like operating systems. Begun in 1993, it could run a wide variety of Windows programs on Linux and macOS, although sometimes with modification. Now the Wine Project has rolled out version 3.0 which is compatible with your Android devices.

In this article we will show you how you can run Windows apps on your Android device with WINE.

**Also read:** [How to Easily Install Windows Games on Linux with Winepak](https://www.maketecheasier.com/winepak-install-windows-games-linux/)

## What can you run on Wine?

Wine is only a compatibility layer, not a full-blown emulator, so you need an x86 Android device to take full advantage of it. However, most Androids in the hands of consumers are ARM-based.

Since most of you are using an ARM-based Android device, you will only be able to use Wine to run apps that have been adapted to run on Windows RT. There is a limited, but growing, list of software available for ARM devices. You can find a list of these apps that are compatible in this [thread](https://forum.xda-developers.com/showthread.php?t=2092348) on XDA Developers Forums.

Some examples of apps you will be able to run on ARM are:

[Keepass Portable](https://downloads.sourceforge.net/keepass/KeePass-2.20.1.zip): A password storage wallet[Paint.NET](https://forum.xda-developers.com/showthread.php?t=2411497): An image manipulation program[SumatraPDF](https://forum.xda-developers.com/showthread.php?t=2098594): A document reader for PDFs and possibly some other document types[Audacity](https://forum.xda-developers.com/showthread.php?t=2103779): A digital audio recording and editing program

There are also some open-source retro games available like [Doom](https://forum.xda-developers.com/showthread.php?t=2175449) and [Quake 2](https://forum.xda-developers.com/attachment.php?attachmentid=1640830&d=1358070370), as well as the open-source clone, [OpenTTD](https://forum.xda-developers.com/showpost.php?p=36674868&postcount=151), a version of Transport Tycoon.

The list of programs that Wine can run on Android ARM devices is bound to grow as the popularity of Wine on Android expands. The Wine project is working on using QEMU to emulate x86 CPU instructions on ARM, and when that is complete, the number of apps your Android will be able to run should grow rapidly.

## Installing Wine

To install Wine you must first make sure that your device’s settings allow it to download and install APKs from other sources than the Play Store. To do this you’ll need to give your device permission to download apps from unknown sources.

1. Open Settings on your phone and select your Security options.

2. Scroll down and click on the switch next to “Unknown Sources.”

3. Accept the risks in the warning.

4. Open the [Wine installation site](https://dl.winehq.org/wine-builds/android/), and tap the first checkbox in the list. The download will automatically begin.

5. Once the download completes, open it from your Downloads folder, or pull down the notifications menu and click on the completed download there.

6. Install the program. It will notify you that it needs access to recording audio and to modify, delete, and read the contents of your SD card. You may also need to give access for audio recording for some apps you will use in the program.

7. When the installation completes, click on the icon to open the program.

## Working with Wine

When you open Wine, the desktop mimics Windows 7.

One drawback of Wine is that you have to have an external keyboard available to type. An external mouse may also be useful if you are running it on a small screen and find it difficult to tap small buttons.

You can tap the Start button to open two menus – Control Panel and Run.

When you tap “Control panel” you will see three choices – Add/Remove Programs, Game Controllers, and Internet Settings.

Using “Run,” you can open a dialogue box to issue commands. For instance, launch Internet Explorer by entering `iexplore`

.

## Installing programs on Wine

1. Download the application (or sync via the cloud) to your Android device. Take note of where you save it.

2. Open the Wine Command Prompt window.

3. Type the path to the location of the program. If you have saved it to the Download folder on your SD card, type:

cd sdcard/Download/[filename.exe]

4. To run the file in Wine for Android, simply input the name of the EXE file.

If the ARM-ready file is compatible, it should run. If not, you’ll see a bunch of error messages. At this stage, installing Windows software on Android in Wine can be hit or miss.

There are still a lot of issues with this new version of Wine for Android. It doesn’t work on all Android devices. It worked on my Galaxy S6 Edge but not on my Galaxy Tab 4. Many games won’t work because the graphics driver doesn’t support Direct3D yet. You need an external keyboard and mouse to be able to easily manipulate the screen because touch-screen is not fully developed yet.

Even with these issues in the early stages of release, the possibilities for this technology are thought-provoking. It’s certainly likely that it will take some time yet before you can launch Windows programs on your Android smartphone using Wine without a hitch.

Our latest tutorials delivered straight to your inbox