OnePlus 6/6T
Installation
Prerequisites
Installation requires fastboot (android-tools)
Before installing Pocketblue, it is recommended to install the latest version of the stock OS to ensure all firmware is present on the vendor partitions.
Make sure the bootloader is unlocked, download the latest Pocketblue release from releases and extract the archive, then proceed to installation.
Warning
Your current OS and all your files will be deleted
Automatic installation
Boot into fastboot, connect your phone to your computer via usb, and run the installation script
On Linux:
./flash-oneplus6-enchilada.shfor OnePlus 6./flash-oneplus6t-fajita.shfor OnePlus 6T
On Windows:
./flash-oneplus6-enchilada.cmdfor OnePlus 6./flash-oneplus6t-fajita.cmdfor OnePlus 6T
Your device will reboot and boot into Pocketblue automatically.
DO NOT reboot via the power button: this can result in not all data being properly written to storage.
Manual installation
List of provided images
The archive contains the following images:
uboot-enchilada.img,uboot-fajita.img- U-Boot, a bootloader implementing the UEFI API (source, GPLv2)fedora_boot.raw- Fedora /boot partition, contains kernels, initrd images, bootloader configs, etcfedora_esp.raw- EFI System Partition, contains EFI executables and device treesfedora_rootfs.raw- root partition
Recommended partition layout
boot- U-Boot (images/uboot-<DEVICE>.img)system_a- /boot partition (images/fedora_boot.raw)system_b- ESP (images/fedora_esp.raw)userdata- root partition (images/fedora_rootfs.raw)
Flashing
Boot into fastboot, connect your phone to your computer via usb, and install the system:
Erase dtbo:
fastboot erase dtbo_a
fastboot erase dtbo_b
Flash U-Boot (replace <DEVICE> with your device codename):
fastboot flash boot images/uboot_<DEVICE>.img --slot=all
Flash Fedora partitions:
fastboot flash system_a images/fedora_boot.raw
fastboot flash system_b images/fedora_esp.raw
fastboot flash userdata images/fedora_rootfs.raw
Reboot, this may take a while. DO NOT reboot via the power button: this can result in not all data being properly written to storage.
fastboot reboot
Default credentials
- default username:
user - default password:
123456
Images, updates and packages
Learn how to upgrade the system and install packages in the following guide: Installing packages
You can rebase to a different image, for example to switch your desktop environment. To do this, run:
rpm-ostree reset
sudo bootc switch <IMAGE>
Available images:
- Gnome mobile -
quay.io/pocketblue/oneplus-sdm845-gnome-mobile:42 - Plasma mobile -
quay.io/pocketblue/oneplus-sdm845-plasma-mobile:42 - Phosh -
quay.io/pocketblue/oneplus-sdm845-phosh:42 - Gnome desktop -
quay.io/pocketblue/oneplus-sdm845-gnome-desktop:42 - Plasma desktop -
quay.io/pocketblue/oneplus-sdm845-plasma-desktop:42
Fix incorrect battery percentage
Sometimes the battery percentage may be reported incorrectly, particularly if you have a replacement battery. This may be fixed by modifying the device tree blob:
# uncomment to select the device model:
# export MODEL=enchilada # OnePlus 6
# export MODEL=fajita # OnePlus 6T
# prepare the dtb file
cd
sudo cp /boot/efi/dtb/qcom/sdm845-oneplus-$MODEL.dtb tmp.dtb
sudo chown user:user tmp.dtb
# create and enter a container
toolbox create fedora
toolbox enter fedora
podman exec -it fedora bash
# modify the dtb
dnf install dtc
cd /home/user
dtc tmp.dtb -o tmp.dts
sed -i 's/bq27441/bq27541/' tmp.dts
sed -i 's/bq27411/bq27541/' tmp.dts
dtc tmp.dts -o tmp.dtb
# exit the container
exit
# install the modified dtb file
sudo cp tmp.dtb /boot/efi/dtb/qcom/sdm845-oneplus-$MODEL.dtb
reboot
Unbricking using python3-edl
github.com/pocketblue/oneplus6-unbrick