Jump to content

OnePlus 5 (oneplus-cheeseburger)

From postmarketOS Wiki
Revision as of 16:17, 21 September 2022 by Langfingaz (talk | contribs) (fix shell command)
OnePlus 5
OnePlus 5T with Phosh on 5.15.0 mainline kernel!
OnePlus 5T with Phosh on 5.15.0 mainline kernel!
Manufacturer OnePlus
Name 5
Codename oneplus-cheeseburger
Released 2017
Hardware
Chipset Qualcomm MSM8998 Snapdragon 835
CPU Octa-core (4x 2.45 GHz Kryo 280 Gold + 4x 1.9 GHz Kryo 280 Silver)
GPU Adreno 540
Display 1080x1920 Optic AMOLED
Storage 64/128 GB UFS 2.1
Memory 6/8 GB LPDDR4X RAM
Architecture aarch64
Software
Original software Android 7.1.1 (up to 10) on Linux 4.4
postmarketOS
Category testing
Pre-built images no
Mainline yes
postmarketOS kernel 5.16.0_rc6
Unixbench Whet/Dhry score 3919.7
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Works
NFC
Works
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Works
USB OTG
Partial
HDMI/DP
No data
Sensors
Accelerometer
Broken
Magnetometer
Broken
Ambient Light
Broken
Proximity
Broken
Hall Effect
Works
Haptics
No data
Barometer
No data

The OnePlus 5T is very similar to the OnePlus 5; for information specific to the 5T, also read OnePlus 5T (oneplus-dumpling).

Entering fastboot mode

The OnePlus 5/5T uses fastboot as its flashing protocol.

Unplug from USB, hold Power and Volume Up until you see FastBoot Mode text.

Installation

Prerequisites

Fastboot

Install fastboot on your host, refer to Google for instructions.

Unlocking the bootloader

WARNING: Doing this will delete ALL your data on the device, so backup all your data before continuing!

Before flashing postmarketOS you have to unlock your bootloader. The following is all that's needed to do this:

1. Go to Settings, About and tap on the Build number 7 times until you get a message saying you are now a developer.

2. Go back to Settings, System and Developer options to enable OEM unlocking

3. Refer to entering fastboot mode above and re-attach the USB cable afterwards. Run the following command on your host:

fastboot oem unlock

4. Read the message displayed on your device screen, once happy confirm the unlock and continue to installing postmarketOS.

Installing postmarketOS

Follow the usual flashing guide via pmbootstrap.

Note NOTE: ONLY choose alpine kernel if you accept it will have MUCH less overall working features, otherwise always pick mainline!
Downstream kernel port is also still available as cheeseburger-downstream codename, but usage of it is strongly discouraged and it's completely unmaintained!

Incorrect touchscreen orientation

On some user interfaces such as Plasma Mobile you may have the touchscreen incorrectly oriented by 180 degrees (upside down); to fix that run the following in a root shell:

echo 'ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="Synaptics s3508", ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1"' | sudo tee /etc/udev/rules.d/21-oneplus5-ts.rules

After that simply reboot or also run udevadm control --reload-rules && udevadm trigger to (hopefully) apply the new calibration matrix immediately.

I've still not added this as a part of the Device package because it causes the rotation to be broken in other environments, especially so in Xorg-based ones, but if that really remains the only problematic one perhaps it can be added as a subpackage with some install_if directive.

Modem stability

If Wi-Fi disconnects for any reason (including sleep, signal strength loss etc.) the modem remoteproc will crash and may not recover until a reboot.

LEDs

The LEDs present on the device can be controlled via sysfs by writing values to their brightness control files as root. Here are some examples:

Screen backlight brightness (0-255, 0-1023 on 5T)

echo 255 > /sys/class/backlight/c994000.dsi0/brightness

Notification light brightness (0-255)

echo 255 > /sys/class/leds/notification-led/brightness

Notification light color (0-255, R G B), e.g. green

echo 0 255 0 > /sys/class/leds/notification-led/multi_intensity

The backlight for capacitive buttons can be enabled (1) or disabled (0)

echo 1 > /sys/class/leds/white\:kbd_backlight/brightness

Control of the rear camera flashlight isn't yet possible; it's missing a driver on mainline.

Partition layout

oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sda

oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdb

oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdc

oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdd

oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sde

oneplus5:~# fdisk -l -o Device,Start,End,Sectors,Size,Name /dev/sdf

Community Info

postmarketOS users that own the device

Maintainers

Contributors

See also