Sony Xperia 5 II (sony-pdx206)

From postmarketOS
Jump to navigation Jump to search
Sony Xperia 5 II
200px
CHANGE_ME
Manufacturer Sony
Name Xperia 5 II
Codename sony-pdx206
Released 2020
Category testing
Original software Android 10 on kernel 4.14
Hardware
Chipset Qualcomm Snapdragon 865 5G (SM8250)
CPU Octa-core (1x2.84 GHz Kryo 585 & 3x2.42 GHz Kryo 585 & 4x1.80 GHz Kryo 585)
GPU Adreno 650
Display 1080x2520 6.1" OLED
Storage 128GB/?
Memory 8GB
Architecture aarch64
Features
USB Networking
Works
Flashing
Broken
Touchscreen
Display
Partial
WiFi
FDE
Mainline
Works
Battery
3D Acceleration
Audio
Bluetooth
Camera
GPS
Mobile data
SMS
Calls
USB OTG
NFC
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Barometer
Power Sensor
Misc
Keyboard
Touchpad
USB-A
HDMI/DP
Ir TX
TrustZone
FOSS bootloader



Contributors

Users owning this device

How to enter flash mode

Before you can flash PostmarketOS, you'll need to unlock your bootloader as described on Sony's open devices portal. This may potentially void your warranty, be warned, and read the warnings that Sony provide also.

Once you've finished these steps, your device will have been wiped. Set up android if you want, you won't have any reason to get rid of it because UFS doesn't work at the moment (see below). Then, either:

  • Power off the device. Holding up on the volume rocker, plug the device into a computer.
  • (or, on android) get an adb shell and run adb reboot bootloader.

Installation

no actual aport at the moment.

Icon WARNING: DO NOT NEVER EVER EVER TRY TO ENABLE UFS ON NON-VENDOR/NON-SODP KERNELS! IT WILL ERASE THE CHIP CLEAN (INCLUDING THE BOOTLOADER!) CONSIDER YOURSELF WARNED

For more info on UFS see below

Because UFS doesn't work, you'll want to flash the rootfs to an sdcard. Use pmbootstrap install --sdcard=/dev/path-to-sdcard-device. Take a look at partitioning to understand what's going on here.

You'll need to flash some empty bytes to the dtbo due to a bootloader bug. Get a file with two empty bytes and then flash it with fastboot flash dtbo emptystuff.img

Then flash the kernel as usual, by putting the device into flash mode (fastboot) and then running pmbootstrap flasher flash-kernel.

Status

This device belongs to the Sony Edo platform, which is the Xperia 1 II (pdx203), Xperia 5 II (this one, pdx206) and the 2020 Xperia PRO (pdx204). This might warrant a common platform page if anyone gets their hands on another Edo.

The defining features of the Xperia 5 II compared to other Edo is as follows:

  • 128GB UFS + 8GB RAM. GSMArena mentions a 256GB variant but it's not certain that it exists.
  • lack of TOF depth camera
  • smaller display resolution (both other Edo have 1644 x 3840), running at 120hz (other Edo run at 60hz)
  • smaller overall body

Work has been done on the device trees in the mainline kernel by the folks over at somainline. The device does boot, USB networking and ssh work, and the framebuffer works, so x11 UIs should work.

UFS

The phone's internal storage is UFS. Sony's past devices have had a bug that will erase the phone's entire internal storage if you try to start up UFS on mainline, because one of the UFS commands is misimplemented. This includes wiping the bootloader, bricking the device FOR EVER.

Sony does all their development on one kernel for all of their devices, which means that the old driver (which includes the UFS workaround) has been carried over. However, it's not known if it was carried over 'just because' or if that behaviour still exists on Edo platform. These devices are still expensive and so far, no-one has been brave enough to test if this workaround is still needed. If you have a beyond-repair Edo device (Xperia 1 ii, 5 ii) that you are willing to sacrifice to the cause, please ask for help on the mainlining channel.

While it's not known if the workaround is definitely needed, we currently have UFS disabled in the device tree, which renders the device's internal storage unusable but means there is no chance of anything getting bricked. It should be possible to patch out this command and reenable UFS in dts on a device-specific kernel eventually.

See also