The version of pmbootstrap used for this project is 1.53.0
.
You need to install pmbootstrap first, please check the postmarketOS wiki for more details: https://wiki.postmarketos.org/wiki/Installation_guide
Before messing with the phone, you need to dump the partitions using the
mtkclient
tool:
# Set your phone in preloader mode (hold volume up + volume down + power)
$ ./mtk r emmc.bin
This will dump the whole eMMC to the emmc.bin
file. Wait until the process is
finished, it can take a while (around ~20 minutes). Keep the phone plugged in
during the whole process.
Do not forget to archive the emmc.bin
file somewhere safe!
Run the pmbootstrap init
command to initialize the pmbootstrap environment.
Because the device is not supported by pmbootstrap yet, you need to copy the layers from the pmbootstrap repository to your local pmbootstrap cache:
# We need to symlink the device and kernel repos to the pmaports tree:
$ ln -s $PWD/linux-xiaomi-dandelion/ /home/$USER/.local/var/pmbootstrap/cache_git/pmaports/device/testing/
$ ln -s $PWD/device-xiaomi-dandelion/ /home/$USER/.local/var/pmbootstrap/cache_git/pmaports/device/testing/
Run the pmbootstrap init
command to modify the pmbootstrap configuration.
When doing the pmbootstrap init, you need to select the device. Use the following configuration:
Work path: /home/<user>/.local/var/pmbootstrap
Channel: edge
Vendor: Xiaomi
Device codename: dandelion
Username: <user>
User interface: console
Leave the other options to their default values.
Export the image:
$ pmbootstrap install
$ pmbootstrap export