Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted in category Systems Software / LineageOS
posted at 29. Jul '21
last updated at 04. Aug '21

Bootloop When Flashing Xperia XZ2 Compact With LineageOS 17.1

A couple of months ago I flashed LineageOS to Xperia XZ2 Compact, because, as with many XZ2 Compacts, touch was broken anyways and microphone too. Out of 2 years warranty and frankly, I didn’t RMAd it even in warranty, because these kinds of random defects suck and hard to explain and I don’t have patience to do it. And needed it for everyday use. Only after quite long time I bought OnePlus 6

Anyways.

The lastest version of LineageOS was 17.1, which means Android 10. I followed official guide, but in the end still got bootloop. While I was thinking, messing around, reading forums and swearing and after few hours I was able to get it working. That made me really happy. Not sure entirely what helped, but overall I did this:

  • follow https://wiki.lineageos.org/devices/xz2c/install
  • get bootloop
  • know difference between fastboot and recovery
  • hard turn off - hold Power button until you feel phone vibrate 3 times
  • boot to fastboot - power + volume up at start
  • boot to recovery - power + volume down at start
  • mess around restarting phone and doing random shit
  • I flashed Lineage image multiple times and ensured it is in partition A and B. Obviously I couldn’t run copy_partitions script since I couldn’t get into the recovery
  • download Xperia Software binaries for AOSP Android 10 https://developer.sony.com/file/download/software-binaries-for-aosp-android-10-0-kernel-4-14-tama/. I’m not sure what it does, but I guess magically provides necessary driver and camera binary blobs since not all code is open source - flash with fastboot flash oem SW_binaries_for_Xperia_Android_10.0.7.1_r1_v12a_tama.img
  • try to flash it to A and B partitions (adb) - may require couple of restarts and with some luck, fastboot or something will choose both partitions
  • get to recovery and add Gapps or something
  • boot into the system

That’s all.

Add Comment