Jump to content

Sony Xperia Z (sony-yuga): Difference between revisions

From postmarketOS Wiki
Wfranken (talk | contribs)
m Restructure page
m Add type
 
(34 intermediate revisions by 14 users not shown)
Line 2: Line 2:
| manufacturer = Sony
| manufacturer = Sony
| name = Xperia Z
| name = Xperia Z
| codename = yuga
| codename = sony-yuga
| image = File:Sony_yuga_weston.jpg
| image = File:Sony_yuga_weston.jpg
| imagecaption = Sony Xperia Z running Weston
| imagecaption = Sony Xperia Z running Weston
| releaseyear = 2013
| releaseyear = 2013
| originalsoftware = Android 4.1.2 on Linux 3.0.31
| originalsoftware = Android
| chipset = Qualcomm APQ8064 Snapdragon S4 Pro
| originalversion = 4.1.2 (Linux 3.0.31)
| chipset = Qualcomm Snapdragon S4 Pro (APQ8064)
| cpu = Quad-core 1.5 GHz Krait
| cpu = Quad-core 1.5 GHz Krait
| gpu = Adreno 320
| gpu = Adreno 320
Line 13: Line 14:
| display = 1080x1920 TFT
| display = 1080x1920 TFT
| memory = 2 GB
| memory = 2 GB
}}
| architecture = armv7
| type = handset
| status_usbnet = Y
| status_flashing = Y
| status_touch = Y
| status_screen = Y
| status_wifi = Y
| status_xwayland = Y
| status_fde =
| status_mainline = P
| status_battery =
| status_3d =
| status_accel =
| status_audio =
| status_bluetooth =
| status_camera =
| status_gps =
| status_mobiledata =
| status_sms =
| status_calls =
| booting = yes
}}{{Based on SoC|Qualcomm_Snapdragon_600_(APQ8064)|Snapdragon 600}}
 
== Contributors ==
== Contributors ==


* wfranken (porting and testing)
* wfranken (porting and testing)
* ollieparanoid (help via IRC)
* ollieparanoid
* ata2001 (help via IRC)
* ata2001
* opendata (help via IRC)
* opendata
 
== Users owning this device ==
{{Device owners}}
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page -->
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}-->
<!-- you may need to purge page cache to see changes (more->purge cache)-->
<!-- you can use {{My devices}} on your profile page to show table with all your devices -->


== Device knowledge ==
== Device knowledge ==
Line 25: Line 55:
=== Special keycombo's ===
=== Special keycombo's ===


* Boot to bootloader (fastboot): unplug device, hold volume up and plug usb into device
* Boot to bootloader (fastboot): unplug device, hold volume up and plug usb into device. LED turns blue when in fastboot
* Reset if stuck: hold volume up and power button till the phone shakes
* Boot to recovery(when flashed to FOTAkernel only?): repeatedly press volume up during bootup
* Reboot if stuck: hold volume up and power button till the phone vibrates once
* Shutdown phone: hold volume up and power button till phone vibrates three times


=== Notification LED information ===
=== Notification LED information ===


* Constant blue LED: fastboot mode
* Constant blue LED: fastboot mode
* Slowly blinking red LED when plugged in: battery cannot hold any charge.
* Slowly blinking red LED when plugged in: battery cannot hold any charge/battery charge is too low for booting
* Blinking red LED when trying to boot: Cannot boot, maybe offsets are wrong?
* Blinking red LED when trying to boot: Cannot boot, maybe offsets are wrong?
* Constant red LED on while plugged in: charging
* Constant red LED on while plugged in: charging
Line 42: Line 74:
* put the device in fastboot mode
* put the device in fastboot mode
* run <code>fastboot flash boot recovery.img</code> (replace <code>recovery.img</code> with the filename of your recovery of choice)
* run <code>fastboot flash boot recovery.img</code> (replace <code>recovery.img</code> with the filename of your recovery of choice)
* run <code>fastboot reboot</code> to reboot into the recovery


This is also the reason why LineageOS boot.img is far larger than postmarketOS boot image (the recovery is inside it).
This is also the reason why LineageOS boot.img is far larger than postmarketOS boot image (the recovery is inside it).
Line 47: Line 80:
== Current state ==
== Current state ==


=== What works ===
=== Downstream ===
 
The downstream kernel is based on the [https://github.com/LineageOS/android_kernel_sony_apq8064 LineageOS Sony APQ8064 kernel]. The kernel version is 3.4.0 and below is described what currently works, doesn't work and what is not tested yet.
 
==== What works ====


* charging
* charging
Line 54: Line 91:
* ssh
* ssh
* adjusting the led, torch and the lcd backlight
* adjusting the led, torch and the lcd backlight
* display
** Weston
** Xwayland
* touchscreen
* touchscreen
* display (Weston UI was tested)
* Wifi


=== Known issues ===
==== Known issues ====


* Splash screens don't work
* Splash screens works but disappears long before Weston comes up
* Launching Weston is delayed by 135 seconds to let udev settle down
* FDE does not work, password unlock screen does not appear
* Display works only when running <code>cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode</code> after being logged in using SSH.


=== What has not been tested ===
==== What has not been tested ====


* Bluetooth
* Bluetooth
* 3G
* Mobile network
* Sound
* Sound
* Phone calls
* Phone calls
* SD card
* SD card
* Wifi


=== Mainline support ===
=== Mainline support ===


* It should be possible to run [[The Mainline Kernel]] on the device. At least there is a <code>dts</code> file already in the 4.14 kernel: <code>arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts</code>
It is possible to boot the device using [https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_600_(APQ8064) the mainline kernel for devices with a Qualcomm APQ8064 SOC]. Below we describe what works, what doesn't and what still needs to be tested. These tests are done on <code>qcom-apq8064-v5.10</code> branch of [https://github.com/apq8064-mainline/linux APQ8064 kernel].
 
==== What works ====
 
* network through USB
* telnet in initramfs
* ssh
* Wifi (more or less): USB stops working when Wifi gets enabled. (to start wifi you should run 'echo start > /sys/class/remoteproc/remoteproc0/state')
 
==== Known issues ====


At the moment this is not tested yet.
* Display does not work
* Charging does not work: after some time the device shuts down and starts charging very slowly. This is because charging is divided in HW part and SW part. The HW part of charging happens when the battery is so low that it cannot boot, thus the device will charge until a critical charge so it can at least boot. When the device boots up the SW will take over the charging. Because the mainline kernel currently does not have a power supply configured for this devices (the pm8921 PMIC power charger is not yet supported in mainline), the battery won't charge after booting up and slowly drain until the device shuts down due to low charge.
* USB stops working when Wifi gets enabled.
 
==== What has not been tested ====
 
Everything else


== Install ==
== Install ==
Line 84: Line 133:
=== Installation procedure ===
=== Installation procedure ===


Follow the [[Installation guide]].
Follow the [[Installation guide]]


=== Troubleshooting ===
=== Troubleshooting ===
Line 91: Line 140:
** Open the back (eg. with a hairdryer) and try to unplug and plug the battery
** Open the back (eg. with a hairdryer) and try to unplug and plug the battery
** If all else fails: buy a new battery
** If all else fails: buy a new battery
* If you don't get into fastboot mode (blue notification LED): try another USB cable.
== Hardware details ==
=== PMIC: pm8921 ===
The Power Management IC (PMIC) of this device is a [https://developer.qualcomm.com/download/sd600/pmm8920-power-management-module-device-specification.pdf pm8921]. It is in control of:
* voltage regulation
* power charging
* ...


== References ==
== References ==


* [https://github.com/LineageOS/android_kernel_sony_msm8974 Kernel Source]
* [https://github.com/LineageOS/android_kernel_sony_apq8064 Downstream kernel Source]
* [https://github.com/apq8064-mainline/linux Mainline-ish kernel Source]
 
== See also ==
 
* {{MR|500}} Initial merge request
* {{Device package|sony-yuga}}
* {{Kernel package|sony-yuga}}

Latest revision as of 14:42, 13 September 2024

Sony Xperia Z
Sony Xperia Z running Weston
Sony Xperia Z running Weston
Manufacturer Sony
Name Xperia Z
Codename sony-yuga
Released 2013
Type handset
Hardware
Chipset Qualcomm Snapdragon S4 Pro (APQ8064)
CPU Quad-core 1.5 GHz Krait
GPU Adreno 320
Display 1080x1920 TFT
Storage 16 GB
Memory 2 GB
Architecture armv7
Software
Original software Android
Original version 4.1.2 (Linux 3.0.31)
postmarketOS
Category testing
Pre-built images no
Mainline partial
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
No data
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data

Contributors

  • wfranken (porting and testing)
  • ollieparanoid
  • ata2001
  • opendata

Users owning this device


Device knowledge

Special keycombo's

  • Boot to bootloader (fastboot): unplug device, hold volume up and plug usb into device. LED turns blue when in fastboot
  • Boot to recovery(when flashed to FOTAkernel only?): repeatedly press volume up during bootup
  • Reboot if stuck: hold volume up and power button till the phone vibrates once
  • Shutdown phone: hold volume up and power button till phone vibrates three times

Notification LED information

  • Constant blue LED: fastboot mode
  • Slowly blinking red LED when plugged in: battery cannot hold any charge/battery charge is too low for booting
  • Blinking red LED when trying to boot: Cannot boot, maybe offsets are wrong?
  • Constant red LED on while plugged in: charging

Non-standard notes

The Xperia Z does not have a recovery partition, so flashing PostmarketOS erases any recovery you have installed. Instructions across the internet for reinstalling a custom recovery are almost all incorrect.

To install a custom recovery on the Xperia Z:

  • put the device in fastboot mode
  • run fastboot flash boot recovery.img (replace recovery.img with the filename of your recovery of choice)
  • run fastboot reboot to reboot into the recovery

This is also the reason why LineageOS boot.img is far larger than postmarketOS boot image (the recovery is inside it).

Current state

Downstream

The downstream kernel is based on the LineageOS Sony APQ8064 kernel. The kernel version is 3.4.0 and below is described what currently works, doesn't work and what is not tested yet.

What works

  • charging
  • network through USB
  • telnet in initramfs
  • ssh
  • adjusting the led, torch and the lcd backlight
  • touchscreen
  • display (Weston UI was tested)
  • Wifi

Known issues

  • Splash screens works but disappears long before Weston comes up
  • FDE does not work, password unlock screen does not appear

What has not been tested

  • Bluetooth
  • Mobile network
  • Sound
  • Phone calls
  • SD card

Mainline support

It is possible to boot the device using the mainline kernel for devices with a Qualcomm APQ8064 SOC. Below we describe what works, what doesn't and what still needs to be tested. These tests are done on qcom-apq8064-v5.10 branch of APQ8064 kernel.

What works

  • network through USB
  • telnet in initramfs
  • ssh
  • Wifi (more or less): USB stops working when Wifi gets enabled. (to start wifi you should run 'echo start > /sys/class/remoteproc/remoteproc0/state')

Known issues

  • Display does not work
  • Charging does not work: after some time the device shuts down and starts charging very slowly. This is because charging is divided in HW part and SW part. The HW part of charging happens when the battery is so low that it cannot boot, thus the device will charge until a critical charge so it can at least boot. When the device boots up the SW will take over the charging. Because the mainline kernel currently does not have a power supply configured for this devices (the pm8921 PMIC power charger is not yet supported in mainline), the battery won't charge after booting up and slowly drain until the device shuts down due to low charge.
  • USB stops working when Wifi gets enabled.

What has not been tested

Everything else

Install

Installation procedure

Follow the Installation guide

Troubleshooting

  • If you get a slowly blinking red LED when trying to charge, this could mean your battery does not get charged. You have then have two options:
    • Open the back (eg. with a hairdryer) and try to unplug and plug the battery
    • If all else fails: buy a new battery
  • If you don't get into fastboot mode (blue notification LED): try another USB cable.

Hardware details

PMIC: pm8921

The Power Management IC (PMIC) of this device is a pm8921. It is in control of:

  • voltage regulation
  • power charging
  • ...

References

See also