Sony Xperia Z2 Tablet LTE (sony-castor)

From postmarketOS
Sony Xperia Z2 Tablet LTE
Sony Xperia Z2 Tablet
Sony Xperia Z2 Tablet
Manufacturer Sony
Name Xperia Z2 Tablet LTE
Codename sony-castor
Released 2014
Category testing
Pre-built images no
Original software Android
Original version 4.4.2 on Linux 3.4
Hardware
Chipset Qualcomm Snapdragon 801 (MSM8974AB)
CPU Quad-core 2.3 GHz Krait 400
GPU Adreno 330
Display 1200x1920 TFT
Storage 16/32 GB
Memory 3 GB
Architecture ARMv7
Features
USB Networking
Works
Flashing
Works
Touchscreen
Works
Display
Works
WiFi
Works
FDE
Mainline
Works
Battery
Works
3D Acceleration
Partial
Audio
Broken
Bluetooth
Works
Camera
Broken
Mobile data
Internal storage
SMS
Calls
USB OTG
NFC
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Barometer
Power Sensor
Misc
Built-in DVB
Camera Flash
Keyboard
Touchpad
USB-A
HDMI/DP
Ir TX
Ir RX
Stylus
Memory Card
Haptics
Ethernet
FOSS bootloader


Contributors

  • bjorn andersson (ported device to 4.3)
  • robclark (freedreno support)
  • opendata26
  • plata

Users owning this device

See also Sony_Xperia_Z2_Tablet_(sony-castor-windy), which has no modem but uses the same device package.

Warning

On sony-castor-windy, trying write to an SD card seems to always end up having it corrupted. And even worse: Also the internal memory seems to get corrupted. I have not tested if already reading an SD card can cause memory corruption. The situation is unknown on sony-castor.

What does not work

  • GUI (tested with plasma, phosh on sony-castor)

Installation

Prerequisites

Unlock Bootloader (tested on sony-castor)

This might not work if the device is in factory settings, so setup Android once.

  • open dialer and type *#*#7378423#*#*
  • Service info → Configuration → Rooting Status
  • check that bootloader unlock says "Yes" (otherwise, you cannot unlock)
  • use the IMEI to retrieve the unlock code from the Sony website
  • turn off device and disconnect USB (if connected)
  • hold volume up and connect USB to computer to enter fastboot (LED should switch from red to blue)
  • with the unlock code from the Sony website as KEY:
$ fastboot oem unlock 0xKEY

Install pmbootstrap

Install postmarketOS

  • turn off device and disconnect USB (if connected)
  • hold volume up and connect USB to computer to enter fastboot (LED should switch from red to blue)

Then follow the general installation instructions in Installation_guide, i.e.

$ pmbootstrap init
  • select sony and castor
$ pmbootstrap install
$ pmbootstrap flasher flash_rootfs
$ pmbootstrap flasher flash_kernel

However, the system partition is rather small, so one might want to install to the userdata partition instead via

$ pmbootstrap flasher flash_rootfs --partition userdata

Plasma Mobile

Set scaling to 3x:

$ kscreen-doctor output.1.scale.3

Setting the date

Since the rtc driver is read only you need to use ntp to set the date

# Install openntpd
$ sudo apk add openntpd

# Write the current system time to the hardware clock
$ sudo ntp -s

PostmarketOS kernel

qcom-msm8974

Graphics

Graphics in the current version of the above kernel is very unstable, the screen usually freezes after a few minutes of running X. Maybe the same as pmaports#424? The most recent kernel where it is more stable is qcom-msm8974-5.12.13, which is in commit 2ebc93b43e92b4eada0cefba70561642508b191d in pmaports. However, that version does not include a patch which makes the external power supply work.

So, if you want have both mostly stable graphics and a functioning charger, change to pmaports commit

2ebc93b43e92b4eada0cefba70561642508b191d,

apply the patch

c7bfa860092c00e9c02d3907dbc545e5e41083bc

from linux-postmarketos and build linux-postmarketos-qcom-msm8974 manually.

Useful key combinations

  • fastboot: volume up and connect USB
  • hard shutdown: press and hold volume up and power

Links