红米Note 4X是7,8年前的老手机,但是配置比一般的路由器性能好的多的多,8核ARM A53,4GB内存,64GB内置存储,换脸盆可惜,废物再利用。ubuntu touch官网没有RedMI Note 4X的,有国外大牛自己制作了镜像。
前提RedMI Note 4X已经开BL锁,可在小米官网申请
1、下载TWRP Recovery
https://dl.twrp.me/mido/twrp-3.3.0-0-mido.img
2、进入fastboot(开机时按电源键+音量减 )
或者用adb reboot bootloader命令进入
3、烧录twrp-3.3.0-0-mido.img
电脑里输入命令 fastboot flash recovery twrp-3.3.0-0-mido.img
4、复制Ubuntu-Touch-mido Alpha_V1.1.zip到SD卡
This is a port of Ubuntu Touch for Xiaomi Redmi note 4X
镜像下载地址:https://www.mediafire.com/file/52vgjns7dktx7if/Ubuntu-Touch-mido%28Alpha_V1.1%29.zip/file
SD卡装入RedMI Note 4X
5、进入TWRP
开机时按电源键+音量加 进入TWRP
6、Wipe the System, Cache, and Data,and format the data partition!.
7、install
TWRP里install安装SD卡里的Ubuntu-Touch-mido Alpha_V1.1.zip
8、烧录成功,重启就可以进入ubuntu touch(登录密码a, 账号是phablet)
9、要想制作一台自己的云服务器,那还是半成品
1)、进入系统,在设置里把屏幕设置成常亮,息屏了网络ssh就连接不上了
2)、修改只读分区命令,否则rootfs只读,不能apt安装软件
sudo mount -o remount,rw /
3)、修复systemctl, 关键一步 (注意修复了systemctl,但是启动会出问题,黑屏)
sudo apt install systemd-sysv ubuntu-standard
4)、关屏幕输出(省电,服务器必备) <—功能未验证
sudo apt install x11-xserver-utils
export DISPLAY=:0
xrandr --output eDP-1 --off
5)、安装v2raya,上网好东西 (不要使用snapd安装,snapd不支持32位的v2raya)
下载installer_debian_armv7_2.2.4.6.deb(github上下载,利用apt安装)
sudo apt install ./installer_debian_armv7_2.2.4.6.deb
下载v2ray-linux-arm32-v7a.zip(github上下载)
sudo unzip v2ray-linux-arm32-v7a.zip -d /usr/local/v2ray-core
修改配置文件/etc/default/v2raya, 在尾部添加3句
V2RAYA_V2RAY_BIN=/usr/local/v2ray-core/v2ray
V2RAYA_V2RAY_CONFDIR=/usr/local/v2ray-core
V2RAYA_IPV6_SUPPORT=off
重启服务,就可以了
sudo systemctl restart v2raya
用sys-v方式启动v2raya
vim /etc/init.d/v2raya
#!/bin/bash
### BEGIN INIT INFO
# Provides: v2raya
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: v2rayA Service
# Description: v2rayA Service
### END INIT INFO
# Change the following variables according to your setup
V2RAYA_EXEC="/usr/bin/v2raya"
V2RAYA_LOG_FILE="/var/log/v2raya/v2raya.log"
start() {
echo "Starting v2rayA..."
export V2RAYA_LOG_FILE="$V2RAYA_LOG_FILE"
source /etc/default/v2raya
$V2RAYA_EXEC --config /etc/v2raya/ --v2ray-bin /usr/local/v2ray-core/v2ray --v2ray-confdir /usr/local/v2ray-core --v2ray-assetsdir /usr/local/v2ray-core --ipv6-supp
t off --log-disable-timestamp &
}
stop() {
echo "Stopping v2rayA..."
pkill -f "$V2RAYA_EXEC"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
sudo service v2raya start
6)、apt源
https://mirrors.aliyun.com/ubuntu-ports/
http://ports.ubuntu.com/ubuntu-ports/
7)、镜像源码
Kernel: https://github.com/ubports-mido/android_kernel_xiaomi_msm8953
Device: https://github.com/ubports-mido/android_device_xiaomi_mido
Vendor: https://github.com/ubports-mido/proprietary_vendor_xiaomi