Redmi 5Plus Liunx(PostmarketOS) Installation Tutorial

Redmi 5Plus

Setup 1 unlock bootloader

Reference: https://www.miui.com/unlock/index.html
Notice:

  • miflush_unlock requires a windows os
  • If the unlock tool does not recognize the phone, you need to install the driver manually in the device manager, select the path miflush_unlock/driver.
  1. Download Xiaomi Official Unlock Tool (miflush_unlock): https://www.miui.com/unlock/download.html
  2. Run miflush_unlock.exe, login to Xiaomi account
  3. Go to “Settings -> Developer Options -> Device Unlocked Status” to bind your xiaomi account and device.
  4. Enter Bootloader mode manually (after powering off the computer, press and hold the Power On and Volume Down buttons at the same time).
  5. Connect your phone via USB and click the “Unlock” button

Setup 2 Download android sdk

https://developer.android.google.cn/tools/releases/platforms?hl=en
macos can be installed using homebrew, brew install android-platform-tools

  1. Download android platform-tools
  2. Configuring Environment Variables

Setup 3 Download PostmarketOS images

https://images.postmarketos.org/bpo/v23.12/xiaomi-vince/phosh/20240327-0824/
Decompression command: xz --decompress xxx.xz

  1. 20240327-0824-postmarketOS-v23.12-phosh-22.3-xiaomi-vince-boot.img.xz
  2. 20240327-0824-postmarketOS-v23.12-phosh-22.3-xiaomi-vince-lk2nd.img.xz
  3. 20240327-0824-postmarketOS-v23.12-phosh-22.3-xiaomi-vince.img.xz

Setup 4 Write images to phone

Notice: Run fastboot devices to make sure your device is detected.

# 1. flush lk2nd 
fastboot flash boot 20240327-0824-postmarketOS-v23.12-phosh-22.3-xiaomi-vince-lk2nd.img
# 2. wait for the reboot to complete
fastboot reboot
# 3. flush boot
fastboot flash boot 20240327-0824-postmarketOS-v23.12-phosh-22.3-xiaomi-vince-boot.img
# 4. flush os
fastboot flash userdata 20240327-0824-postmarketOS-v23.12-phosh-22.3-xiaomi-vince.img
# 5. wipe the system partition
fastboot erase system
# 6. reboot
fastboot reboot

If all goes correctly, you should now be running postmarketOS! Enjoy!

Setup 5 Login your OS

username: user
password: 147147
PIN Code: 147147

Finally

Replace /etc/apk/repositories with the following

http://mirrors.tuna.tsinghua.edu.cn/postmarketOS/master
http://mirrors.tuna.tsinghua.edu.cn/alpine/edge/main
http://mirrors.tuna.tsinghua.edu.cn/alpine/edge/community

Update Mirror

sudo apk update
sudo apk upgrade -a

Optimization [optional]

  1. Disable GUI:

Reduce memory usage by 700m

# disable
sudo rc-update del tinydm
sudo reboot
# enable
sudo rc-update add tinydm default
  1. Disable modemmanager

Reduce memory usage by 100m
Notice: ModemManager is used to control mobile broadband (2G/3G/4G) devices and connections

# disable
sudo rc-update del modemmanager

# enable
sudo rc-update add modemmanager default
  1. Disable firewall
sudo service nftables stop
sudo rc-update del nftables
  1. Disable pulseaudio

Reduce memory usage by 700m

# disable
echo "autospawn = no" > $HOME/.config/pulse/client.conf
pkill -f pulseaudio

# enable
rm -f $HOME/.config/pulse/client.conf
sudo service pulseaudio start

Github Link

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值