JingOS x86安装Anbox/wine教程/How to install anbox/wine to JingOS x86

感谢网友JingOS-Song的贡献。
demo video:Anbox/wine runs on JingOS x86 | Tutorial inside - YouTube

Anbox

1.备份源:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

2.修改源:
sudo vim /etc/apt/sources.list

3.更换阿里源:
deb Index of /ubuntu/ focal main restricted universe multiverse
deb-src Index of /ubuntu/ focal main restricted universe multiverse
deb Index of /ubuntu/ focal-security main restricted universe multiverse
deb-src Index of /ubuntu/ focal-security main restricted universe multiverse
deb Index of /ubuntu/ focal-updates main restricted universe multiverse
deb-src Index of /ubuntu/ focal-updates main restricted universe multiverse
deb Index of /ubuntu/ focal-proposed main restricted universe multiverse
deb-src Index of /ubuntu/ focal-proposed main restricted universe multiverse
deb Index of /ubuntu/ focal-backports main restricted universe multiverse
deb-src Index of /ubuntu/ focal-backports main restricted universe multiverse

4.按i修改,按住shift加 ZZ(连续2下Z)

5.更新源:
sudo apt update

6.添加surface密匙(###surface用户必须安装其它可以忽略):链接: https://pan.baidu.com/s/1PS0K_OzUipwRiq0AMNl2uA 提取码: nsjg
sudo apt-key add surface.asc

7.升级内核和surface触摸驱动(###surface用户必须安装其它可以忽略):
linux_surface_install.sh

8.更新依赖和软件:
sudo apt upgrade

9.安装kde文件管理器:
sudo apt install dolphin

10-1.安装anbox内核:
sudo apt install dkms

10-2.安装git:
sudo apt install git
git clone https://gitee.com/liuson945/anbox-modules.git
cd anbox-modules
./INSTALL.sh
重启电脑:
ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder

11.编译anbox:

1.安装所需的依赖:
sudo apt install build-essential cmake cmake-data debhelper dbus google-mock
libboost-dev libboost-filesystem-dev libboost-log-dev libboost-iostreams-dev
libboost-program-options-dev libboost-system-dev libboost-test-dev
libboost-thread-dev libcap-dev libexpat1-dev libsystemd-dev libegl1-mesa-dev
libgles2-mesa-dev libglm-dev libgtest-dev liblxc1
libproperties-cpp-dev libprotobuf-dev libsdl2-dev libsdl2-image-dev lxc-dev
pkg-config protobuf-compiler libgmock-dev git
cmake-extras libdw-dev libbfd-dev libdwarf-dev

2…克隆配置(本人自己编译好的,也可以选择官方但是官方很多功能目前无法使用)anbox:
cd /usr/local/src
sudo git clone https://gitee.com/liuson945/anbox.git --recurse-submodules
sudo chown -R $USER:$USER anbox/
mkdir anbox/build/
cd anbox/build/
cmake …
sudo make -j4
sudo -i
cd /usr/local/src/anbox/build/
make install

3.准备 Android 镜像:
android_amd64.img (链接: https://pan.baidu.com/s/1C6qgQ_QydbyR7Jug6jdkPg 提取码: e9c5)
sudo mkdir /var/lib/anbox
sudo mv android_amd64.img /var/lib/anbox/android.img

4.写入 systemctl 服务
sudo vim /lib/systemd/system/anbox-container-manager.service

[Unit]
Description=Anbox Container Manager
After=network.target
Wants=network.target
ConditionPathExists=/var/lib/anbox/android.img

[Service]
#ExecStartPre=/sbin/modprobe ashmem_linux
#ExecStartPre=/sbin/modprobe binder_linux
ExecStartPre=/usr/local/src/anbox/scripts/anbox-bridge.sh start
ExecStart=/usr/local/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox
ExecStopPost=/usr/local/src/anbox/scripts/anbox-bridge.sh stop

[Install]
WantedBy=multi-user.target

  1. 建立启动链接
    sudo ln -s /lib/systemd/system/anbox-container-manager.service /etc/systemd/system/
    如果显示 ln: 无法创建符号链接’/etc/systemd/system/anbox-container-manager.service’: 文件已存在, 删掉 上述文件即可

  2. 启动
    sudo systemctl start anbox-container-manager.service

查看运行状态
sudo systemctl status anbox-container-manager.service

[选择性]开机启动
sudo systemctl enable anbox-container-manager.service

  1. 启动 anbox(如果报错EGL,可以加入环境变量,继续启动,启动需要启动2次)
    export EGL_PLATFORM=x11
    anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

8.安装酷安:
sudo apt install adb

#去官网下载酷安app.apk
adb install 酷安app.apk

9.以后安装app可以在酷安直接安装,也可以adb方法!

Wine

  1. 添加官方源:
    sudo vim /etc/apt/sources.list.d/deepin.list

deb [by-hash=force] Index of /deepin/ apricot main contrib non-free

  1. 在文件中添加deepin20商店源:

sudo vim /etc/apt/sources.list.d/appstore.list

deb https://community-store-packages.deepin.com/appstore eagle appstore

  1. 添加密钥:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1C30362C0A53D5BB

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 425956BB3E31DF51

4.添加源级别:
sudo vim /etc/apt/preferences.d/deepin

Package: *

Pin: origin community-packages.deepin.com

Pin-Priority: 200

5.运行:
cat /etc/apt/preferences.d/deepin

Package: *

Pin: origin community-packages.deepin.com

Pin-Priority: 200

6.更新源:

sudo apt update

7.查找deepin-wine5:
apt search deepin-wine5

deepin-wine5/未知,now 5.0.6-1 i386 [已安装]
WINE Is Not An Emulator - runs MS Windows programs

deepin-wine5-dev/未知 5.0.6-1 i386
WINE Is Not An Emulator - runs MS Windows programs

deepin-wine5-i386/未知,now 5.0.6-1 i386 [已安装]
WINE Is Not An Emulator - runs MS Windows programs

deepin-wine5-tools/未知 5.0.6-1 i386
WINE Is Not An Emulator - runs MS Windows programs

8.切换32位:
sudo dpkg --add-architecture i386

9…安装 deepin-wine5:

sudo apt install -t focal deepin-wine5 deepin-wine5-i386

  1. 安装最新微信

    sudo apt install com.qq.weixin.deepin

wine安装软件(三种):

wine xxx.exe

./ xxx.exe

直接双击软件包

deepin-wine5的命令:

deepin-wine5 winecfg (wine的设置~)

deepin-wine5 taskmgr (任务管理器)

deepin-wine5 uninstaller (卸载软件)

deepin-wine5 regedit (注册表)

deepin-wine5 notepad (记事本)

deepin-wine5 wineboot ( 重启 )

deepin-wine5
中文:

simsun.ttc simsun.ttf
将这个文件复制到〜/.wine/drive_c/windows/Fonts

新建zh.reg

内容如下:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]

Arial=simsun

Arial CE,238=simsun

Arial CYR,204=simsun

Arial Greek,161=simsun

Arial TUR,162=simsun

Courier New=simsun

Courier New CE,238=simsun

Courier New CYR,204=simsun

Courier New Greek,161=simsun

Courier New TUR,162=simsun

FixedSys=simsun

Helv=simsun

Helvetica=simsun

MS Sans Serif=simsun

MS Shell Dlg=simsun

MS Shell Dlg 2=simsun

System=simsun

Tahoma=simsun

Times=simsun

Times New Roman CE,238=simsun

Times New Roman CYR,204=simsun

Times New Roman Greek,161=simsun

Times New Roman TUR,162=simsun

Tms Rmn=simsun

在zh.reg目录下,终端命令:

deepin-wine5 regedit zh.reg

7.删除源:

sudo mv /etc/apt/sources.list.d/deepin.list /etc/apt/sources.list.d/deepin.list.bak

sudo mv /etc/apt/sources.list.d/appstore.list /etc/apt/sources.list.d/appstore.list.bak
sudo apt update