If you ever flashed an Android phone, this should be even easier:
- Get required tools: you need fastboot installed in your pinephone
- Debian/Ubuntu based distros:
apt install android-tools-fastboot
- OR
apt install fastboot
- postmarketOS / Alpine:
apk add android-tools
- Arch/Manjaro:
pacman -S android-tools
- Get latest release from Github
- Unpack the
package.tar.gz
file in some directory:tar xzvf package.tar.gz
- Execute the script included in the file:
./flashall
4b. If the modem doesn't disappear when the script starts, try running the flashall script as root - Wait for the modem to come back
If your Pinephone / Pro came with a really old stock firmware, you might need to update it
- ADSP Version 01.002.01.002
- ADSP Version 01.003.01.003
- ADSP Version 30.004.30.004
- ADSP Version 30.006.30.006
- ADSP Version 30.200.30.200
- ADSP Version 30.202.30.202
- Open a root terminal and run:
echo -ne "AT+QFASTBOOT\r" > /dev/ttyUSB2
to enter fastboot mode - Run
fastboot flash modem NON-HLOS.ubi && fastboot reboot
- Get required tools: you need adb and fastboot installed in your pinephone
- Debian/Ubuntu based distros:
apt install android-tools-adb android-tools-fastboot
- OR
apt install adb fastboot
- postmarketOS / Alpine:
apk add android-tools
- Arch/Manjaro:
pacman -S android-tools
- Grab a copy of the firmware, and, optionally, a recovery firmware (https://github.com/Biktorgj/quectel_eg25_recovery)
- With the modem active, jump to fastboot mode:
- As root, tell the modem to shutdown and enter fastboot mode:
echo -ne "AT+QFASTBOOT\r" > /dev/ttyUSB2
- If the AT interface is not available, you can also do it from ADB:
- If running stock:
adb reboot bootloader
- If running stock:
- If already running this firmware:
adb shell reboot; fastboot oem stay
- If the AT interface is not available, you can also do it from ADB:
- After a bit, if you run
lsusb
you should see the modem in fastboot mode:
Bus 003 Device 005: ID 18d1:d00d Google Inc. Xiaomi Mi/Redmi 2 (fastboot)
- Once in fastboot mode, first flash the unlocked bootloader:
fastboot flash aboot appsboot.mbn
- After that
fastboot reboot ; fastboot oem stay
- After flashing and rebooting to the bootloader the modem will say
FAILED (remote: 'Waiting for orders!')
- Now you can flash everything:
fastboot flash boot boot-mdm9607.img
- If you get an error flashing the kernel, run fastboot flash:raw :
fastboot flash:raw boot boot-mdm9607.img
- If you get an error flashing the kernel, run fastboot flash:raw :
fastboot flash recovery boot-mdm9607.img
fastboot flash system rootfs-mdm9607.ubi
fastboot flash recoveryfs recoveryfs.ubi
- After you flashed everything, you can run 'fastboot reboot' and wait for it to come back (you might have to run
fastboot reboot
twice to clear Quectel's bootloader flags). - If all has gone well, to enable
adb
you will likely need to send the "AT+ADBON" command to the modem.