小米Mix2S安装Mobian
目录
解锁Mix2S #
去这里 下载小米官方解锁工具,解锁Mix2S的bootloader。
下载所需文件 #
将下载好的文件解压,路径添加至系统环境变量。
Mobian镜像 #
下载地址 https://images.mobian.org/sdm845/weekly/
如mobian-sdm845-phosh-20231008.tar.xz ,下载后解压即可。
安装Mobian #
Mix2s关机,按住音量减+电源键进入bootloader模式,连接电脑。
注意:最新版已经没有mobian-sdm845-phosh-YYYYMMDD.boot.img文件,不需要写入第二个文件了。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## 查看连接设备
$ fastboot.exe devices
4f02e5e9 fastboot
## 刷入boot镜像
$ fastboot.exe flash boot mobian-sdm845-phosh-20231008.boot-polaris.img
Sending 'boot' ( 23220 KB) OKAY [ 0.516s]
Writing 'boot' OKAY [ 0.094s]
Finished. Total time: 1.281s
## 刷入系统镜像
$ fastboot.exe flash system mobian-sdm845-phosh-20231008.boot.img
Sending 'system' ( 40904 KB) OKAY \[ 0.922s]
Writing 'system' OKAY \[ 0.000s]
Finished. Total time: 1.859s
## 刷入userdata
$ fastboot.exe -S 100M flash userdata mobian-sdm845-phosh-20231008.rootfs.img
Sending sparse 'userdata' 1/35 ( 102041 KB) OKAY \[ 3.278s]
Writing 'userdata' OKAY \[ 0.000s]
Sending sparse 'userdata' 2/35 ( 102396 KB) OKAY \[ 3.789s]
Writing 'userdata' OKAY \[ 0.000s]
Sending sparse 'userdata' 3/35 ( 102396 KB) OKAY \[ 3.649s]
Writing 'userdata' OKAY \[ 0.001s]
Sending sparse 'userdata' 4/35 ( 95532 KB) OKAY \[ 3.449s]
Writing 'userdata' OKAY \[ 0.000s]
... ...
Writing 'userdata' OKAY \[ 0.000s]
Sending sparse 'userdata' 34/35 ( 100392 KB) OKAY \[ 4.788s]
Writing 'userdata' OKAY \[ 0.001s]
Sending sparse 'userdata' 35/35 ( 14549 KB) OKAY \[ 1.755s]
Writing 'userdata' OKAY \[ 0.001s]
Finished. Total time: 297.226s
## 清除数据
$ fastboot.exe erase dtbo
Erasing 'dtbo' OKAY \[ 0.005s]
Finished. Total time: 0.007s
## 重启设备
$ fastboot.exe reboot
Rebooting OKAY \[ 0.000s]
Finished. Total time: 0.001s
重启后进入系统,用户名为mobian ,默认密码为1234 。
修改deiban软件源 #
1
2
sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sudo apt update && sudo apt upgrade -y
修改时区 #
1
sudo dpkg-reconfigure tzdata
开启ssh #
1
2
sudo apt install ssh
sudo vim /etc/ssh/sshd_config
编辑/etc/ssh/sshd_config
启用以下内容
1
2
3
4
5
6
7
8
9
10
Port 22
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
重启ssh服务
1
sudo /etc/init.d/ssh restart
安装tailscal #
1
curl -fsSL https://tailscale.com/install.sh | sh
截图工具grim #
1
sudo apt install grim -y
一些系统信息 #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
root@mobian:~# lscpu
Architecture: aarch64
CPU op-mode( s) : 32-bit, 64-bit
Byte Order: Little Endian
CPU( s) : 8
On-line CPU( s) list: 0-7
Vendor ID: Qualcomm
Model name: Kryo-3XX-Silver
Model: 12
Thread( s) per core: 1
Core( s) per socket: 4
Socket( s) : 1
Stepping: 0x7
Frequency boost: disabled
CPU( s) scaling MHz: 71%
CPU max MHz: 1766.4000
CPU min MHz: 300.0000
BogoMIPS: 38.40
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp
asimdhp cpuid asimdrdm lrcpc dcpop
Model name: Kryo-3XX-Gold
Model: 13
Thread( s) per core: 1
Core( s) per socket: 4
Socket( s) : 1
Stepping: 0x6
CPU( s) scaling MHz: 31%
CPU max MHz: 2649.6001
CPU min MHz: 825.6000
BogoMIPS: 38.40
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp
asimdhp cpuid asimdrdm lrcpc dcpop
NUMA:
NUMA node( s) : 1
NUMA node0 CPU( s) : 0-7
Vulnerabilities:
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Mitigation; Branch predictor hardening
Srbds: Not affected
Tsx async abort: Not affected
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
root@mobian:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 233.8G 0 disk
├─sda1 8:1 0 16K 0 part
├─sda2 8:2 0 32K 0 part
├─sda3 8:3 0 440K 0 part
├─sda4 8:4 0 256K 0 part
├─sda5 8:5 0 256K 0 part
├─sda6 8:6 0 512K 0 part
├─sda7 8:7 0 512K 0 part
├─sda8 8:8 0 2M 0 part
├─sda9 8:9 0 4M 0 part
├─sda10 8:10 0 8M 0 part
├─sda11 8:11 0 16M 0 part
├─sda12 8:12 0 16M 0 part
├─sda13 8:13 0 16M 0 part
├─sda14 8:14 0 64M 0 part
├─sda15 8:15 0 64M 0 part
├─sda16 259:0 0 64M 0 part
├─sda17 259:1 0 128M 0 part
├─sda18 259:2 0 832M 0 part
├─sda19 259:3 0 64M 0 part
├─sda20 259:4 0 256M 0 part
└─sda21 259:5 0 232.3G 0 part /
sdb 8:16 0 8M 0 disk
├─sdb1 8:17 0 512K 0 part
└─sdb2 8:18 0 7M 0 part
sdc 8:32 0 8M 0 disk
├─sdc1 8:33 0 512K 0 part
└─sdc2 8:34 0 7M 0 part
sdd 8:48 0 32M 0 disk
├─sdd1 8:49 0 32K 0 part
├─sdd2 8:50 0 128K 0 part
├─sdd3 8:51 0 864K 0 part
├─sdd4 8:52 0 1M 0 part
└─sdd5 8:53 0 1M 0 part
sde 8:64 0 4.5G 0 disk
├─sde1 8:65 0 32K 0 part
├─sde2 8:66 0 32K 0 part
├─sde3 8:67 0 168K 0 part
├─sde4 8:68 0 128K 0 part
├─sde5 8:69 0 128K 0 part
├─sde6 8:70 0 256K 0 part
├─sde7 8:71 0 256K 0 part
├─sde8 8:72 0 128K 0 part
├─sde9 8:73 0 128K 0 part
├─sde10 8:74 0 128K 0 part
├─sde11 8:75 0 128K 0 part
├─sde12 8:76 0 256K 0 part
├─sde13 8:77 0 256K 0 part
├─sde14 8:78 0 512K 0 part
├─sde15 8:79 0 512K 0 part
├─sde16 259:6 0 512K 0 part
├─sde17 259:7 0 512K 0 part
├─sde18 259:8 0 1M 0 part
├─sde19 259:9 0 1M 0 part
├─sde20 259:10 0 1M 0 part
├─sde21 259:11 0 1M 0 part
├─sde22 259:12 0 1M 0 part
├─sde23 259:13 0 1M 0 part
├─sde24 259:14 0 1M 0 part
├─sde25 259:15 0 1M 0 part
├─sde26 259:16 0 1M 0 part
├─sde27 259:17 0 1M 0 part
├─sde28 259:18 0 1M 0 part
├─sde29 259:19 0 1M 0 part
├─sde30 259:20 0 2M 0 part
├─sde31 259:21 0 2M 0 part
├─sde32 259:22 0 2M 0 part
├─sde33 259:23 0 2M 0 part
├─sde34 259:24 0 4M 0 part
├─sde35 259:25 0 4M 0 part
├─sde36 259:26 0 8M 0 part
├─sde37 259:27 0 8M 0 part
├─sde38 259:28 0 8M 0 part
├─sde39 259:29 0 8M 0 part
├─sde40 259:30 0 16M 0 part
├─sde41 259:31 0 16M 0 part
├─sde42 259:32 0 32M 0 part
├─sde43 259:33 0 32M 0 part
├─sde44 259:34 0 32M 0 part
├─sde45 259:35 0 64M 0 part
├─sde46 259:36 0 192M 0 part
├─sde47 259:37 0 1G 0 part
└─sde48 259:38 0 3G 0 part /boot
sdf 8:80 0 32M 0 disk
├─sdf1 8:81 0 256K 0 part
├─sdf2 8:82 0 744K 0 part
├─sdf3 8:83 0 1M 0 part
├─sdf4 8:84 0 2M 0 part
├─sdf5 8:85 0 4M 0 part
├─sdf6 8:86 0 8M 0 part
└─sdf7 8:87 0 8M 0 part
1
2
3
4
root@mobian:~# free -m
total used free shared buff/cache available
内存: 7625 1463 5455 206 1087 6161
交换: 0 0 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
root@mobian:~# neofetch
_,met$$$$$gg . root@mobian
,g$$$$$$$$$$$$$$$P . -----------
,g$$ P" """ Y$$ .". OS: Debian GNU/Linux trixie/sid aarch64
, $$ P' ` $$ $. Host: Xiaomi Mi MIX 2S
', $$ P ,ggs. ` $$ b: Kernel: 6.1-sdm845
`d $$ ' , $P " ' . $$$ Uptime: 25 mins
$$P d$' , $$ P Packages: 1145 ( dpkg)
$$ : $$ . - ,d$$ ' Shell: bash 5.2.15
$$; Y$b._ _,d$P' Resolution: 1080x2160
Y$$ . ` .` "Y $$$$ P" ' Terminal: /dev/pts/0
` $$ b "-.__ CPU: (8) @ 1.766GHz
`Y $$ Memory: 1335MiB / 7625MiB
`Y $$ .
` $$ b.
`Y $$ b.
`" Y$b ._
` """
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
mobian@mobian:~$ inxi -F
System:
Host: mobian Kernel: 6.1-sdm845 arch: aarch64 bits: 64 Console: pty pts/0 Distro: Debian
GNU/Linux trixie/sid
Machine:
Type: ARM System: Xiaomi Mi MIX 2S details: N/A
Battery:
ID-1: qcom-battery charge: 51% condition: N/A/11.6 Wh volts: 3.8 min: 3.4
CPU:
Info: 8-core model: N/A variant: kryo385 bits: 64 type: MCP
Speed ( MHz) : avg: 739 min/max: 300:826/1766:2650 cores: 1: 653 2: 653 3: 653 4: 653 5: 826
6: 826 7: 826 8: 826
Graphics:
Device-1: adreno-630.2 driver: adreno v: N/A
Device-2: sdm845-dpu driver: msm_dpu v: N/A
Display: server: Xwayland v: 22.1.9 driver: N/A tty: 146x44
API: EGL/GBM Message: No known Wayland EGL/GBM data sources.
Audio:
Device-1: db845c-sndcard driver: N/A
API: ALSA v: k6.1-sdm845 status: kernel-api
Server-1: PulseAudio v: 16.1 status: active
Network:
Device-1: wcn3990-wifi driver: ath10k_snoc
IF-ID-1: qmapmux0.0 state: unknown speed: N/A duplex: N/A mac: N/A
IF-ID-2: rmnet_ipa0 state: unknown speed: N/A duplex: N/A mac: N/A
IF-ID-3: tailscale0 state: unknown speed: -1 duplex: full mac: N/A
IF-ID-4: usb0 state: down mac: da:96:0b:e2:c7:90
Bluetooth:
Device-1: geni-uart driver: qcom_geni_serial
Report: hciconfig ID: hci0 state: up address: 39:90:21:74:07:00 bt-v: 3.0
Drives:
Local Storage: total: 238.34 GiB used: 3.38 GiB ( 1.4%)
ID-1: /dev/sda model: KLUEG8U1EA-B0C1 size: 233.76 GiB
ID-2: /dev/sdb model: KLUEG8U1EA-B0C1 size: 8 MiB
ID-3: /dev/sdc model: KLUEG8U1EA-B0C1 size: 8 MiB
ID-4: /dev/sdd model: KLUEG8U1EA-B0C1 size: 32 MiB
ID-5: /dev/sde model: KLUEG8U1EA-B0C1 size: 4.5 GiB
ID-6: /dev/sdf model: KLUEG8U1EA-B0C1 size: 32 MiB
Partition:
ID-1: / size: 228.53 GiB used: 3.34 GiB ( 1.5%) fs: ext4 dev: /dev/sda21
ID-2: /boot size: 2.8 GiB used: 34.1 MiB ( 1.2%) fs: ext4 dev: /dev/sde48
Swap:
Alert: No swap data was found.
Sensors:
Src: /sys System Temperatures: cpu: 44.8 C mobo: N/A
Fan Speeds ( RPM) : N/A
Info:
Processes: 281 Uptime: 30m Memory: available: 7.45 GiB used: 1.5 GiB ( 20.1%) Init: systemd
target: graphical ( 5) Shell: Bash inxi: 3.3.27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
➜ ~ sudo df -ahl
文件系统 大小 已用 可用 已用% 挂载点
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
udev 3.7G 0 3.7G 0% /dev
devpts 0 0 0 - /dev/pts
tmpfs 763M 1.6M 762M 1% /run
/dev/sda21 229G 3.7G 216G 2% /
securityfs 0 0 0 - /sys/kernel/security
tmpfs 3.8G 220K 3.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
cgroup2 0 0 0 - /sys/fs/cgroup
pstore 0 0 0 - /sys/fs/pstore
bpf 0 0 0 - /sys/fs/bpf
systemd-1 - - - - /proc/sys/fs/binfmt_misc
mqueue 0 0 0 - /dev/mqueue
hugetlbfs 0 0 0 - /dev/hugepages
debugfs 0 0 0 - /sys/kernel/debug
fusectl 0 0 0 - /sys/fs/fuse/connections
ramfs 0 0 0 - /run/credentials/systemd-sysctl.service
configfs 0 0 0 - /sys/kernel/config
ramfs 0 0 0 - /run/credentials/systemd-sysusers.service
ramfs 0 0 0 - /run/credentials/systemd-tmpfiles-setup-dev.service
/dev/sde48 2.8G 35M 2.7G 2% /boot
ramfs 0 0 0 - /run/credentials/systemd-tmpfiles-setup.service
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
tmpfs 763M 92K 763M 1% /run/user/1000
gvfsd-fuse 0.0K 0.0K 0.0K - /run/user/1000/gvfs
portal 0.0K 0.0K 0.0K - /run/user/1000/doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-------------------- A Bench.sh Script By Teddysun -------------------
Version : v2023-06-10
Usage : wget -qO- bench.sh | bash
----------------------------------------------------------------------
CPU Model : CPU model not detected
CPU Cores : 8
AES-NI : Enabled
VM-x/AMD-V : Disabled
Total Disk : 231.3 GB ( 4.6 GB Used)
Total Mem : 7.4 GB ( 1.6 GB Used)
System uptime : 0 days, 23 hour 21 min
Load average : 0.06, 0.17, 0.11
OS : Debian GNU/Linux trixie/sid
Arch : aarch64 ( 64 Bit)
Kernel : 6.1-sdm845
TCP CC :
Virtualization : Dedicated
IPv4/IPv6 : Online / Online
Organization : AS4134 CHINANET-BACKBONE
Location : Xi’an / CN
Region : Shaanxi
----------------------------------------------------------------------
I/O Speed( 1st run) : 141 MB/s
I/O Speed( 2nd run) : 142 MB/s
I/O Speed( 3rd run) : 141 MB/s
I/O Speed( average) : 141.3 MB/s
----------------------------------------------------------------------
Node Name Upload Speed Download Speed Latency
Speedtest.net 11.59 Mbps 14.23 Mbps 35.02 ms
Los Angeles, US 5.74 Mbps 2.28 Mbps 283.55 ms
Dallas, US 5.97 Mbps 1.62 Mbps 268.02 ms
Montreal, CA 6.79 Mbps 1.56 Mbps 258.46 ms
Paris, FR 7.33 Mbps 14.97 Mbps 230.72 ms
Amsterdam, NL 6.35 Mbps 1.14 Mbps 319.56 ms
Shanghai, CN 13.45 Mbps 16.52 Mbps 46.85 ms
Nanjing, CN 12.01 Mbps 15.05 Mbps 33.90 ms
Hongkong, CN 4.81 Mbps 1.13 Mbps 74.02 ms
Singapore, SG 4.91 Mbps 1.58 Mbps 364.94 ms
Tokyo, JP 10.93 Mbps 0.44 Mbps 133.65 ms
----------------------------------------------------------------------
Finished in : 7 min 42 sec
Timestamp : 2023-10-10 17:32:30 CST
----------------------------------------------------------------------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
------------------------ 多功能 自更新 测速脚本 ------------------------
Version : v2023-09-21
Usage : bash <( curl -sL bash.icu/speedtest)
GitHub : https://github.com/i-abc/speedtest
------------------------------------------------------------------------
大陆三网+教育网 IPv4 多线程测速,v2023-09-08
------------------------------------------------------------------------
测速节点 下载/Mbps 上传/Mbps 延迟/ms 抖动/ms
最近的测速点 17.13 Mbps 14.58 Mbps 31.30 ms 7.43 ms
电信 甘肃兰州 16.19 Mbps 12.59 Mbps 74.06 ms 96.05 ms
电信 四川成都 13.88 Mbps 14.73 Mbps 39.53 ms 3.39 ms
电信 安徽合肥 5G 16.70 Mbps 15.27 Mbps 39.00 ms 5.50 ms
电信 浙江宁波 5G 12.64 Mbps 14.19 Mbps 50.83 ms 7.13 ms
电信 江苏镇江 5G 15.63 Mbps 13.81 Mbps 36.47 ms 2.18 ms
电信 江苏连云港 5G 15.93 Mbps 11.03 Mbps 41.57 ms 4.94 ms
移动 广东深圳 12.88 Mbps 13.48 Mbps 64.16 ms 145.87 ms
移动 河南郑州 5G 16.87 Mbps 14.61 Mbps 38.03 ms 9.05 ms
移动 浙江杭州 5G 16.93 Mbps 13.63 Mbps 45.22 ms 1.90 ms
测速次数过多,暂时被限制,请过一段时间后再进行测试
教育网 上海 11.14 Mbps 13.46 Mbps 64.09 ms 4.41 ms
教育网 江苏南京 11.15 Mbps 12.55 Mbps 564.00 ms 1184.14 ms
教育网 安徽合肥 失败 11.63 Mbps 61.73 ms 0.85 ms
------------------------------------------------------------------------
当前时间:2023-10-10 17:46:45 CST
北京时间: 2023-10-10 17:46:45+08:00
------------------------------------------------------------------------
一些Mobian截图 #
上篇:NekoBoxForAndroid配置Hysteria2
下篇:小狼毫使用搜狗词库设置方法