Tag Archives: sony-taoshan

Smartphones #3: buttons

this is way overdue status update, sorry for that

Sony Xperia L (a.k.a Taoshan):

My power switch broke after few power ons 🙁

Powimod mailed to me that he also wanted to port postmarketOS to this phone, and after about a month there is first success 🙂

I couldn’t help too much in a practical way (the power button broke a week ago), I tried to at least find resources how to solve various problems.

So how the work was going?

  • We both compiled Linux kernel independently, theoretically both of them should work but as it turned out the phone wouldn’t boot
  • We thought about finding UART port, and I broke my power button while searching for it  (that button is just small metal sheet connected to plastic base with piece of adhesive tape)
  • Then we started analyzing boot.img image, usingLineageOS/pmos kernel + ramdisk combinations to no avail
  • Whilefastboot boot didn’t work, requiring us to flash boot.img instead of booting it from RAM, we finally could generate working boot.img by adding two options to image generator(`–kernel_offset` and `–ramdisk_offset`) and using pmos kernel &  LineageOS ramdisk to boot LineageOS
  • After flashing pmos we thought that it won’t boot. It turns out it did, but without screen, LED or ssh/telnet (which we were able to get working shortly after)
  • I was told that patch from Konradybcio for Xperia M (sony-nicki) helped turning screen on, however I was unable to check that since my screen broke 🙁

So now there is working port, but I won’t work on it anymore since my screen broke

Glossary:

boot.img – file that contains everything needed to boot a phone

ramdisk – after turning on a phone a kernel is loaded; it loads ramdisk.gz content into ram and run files that are contained in it; it’s like basic filesystem when normal memory is not yet available

Smartphones #1: two bricks in one day

The beginning of the series about smartphones that I experiment on and try to run postmarketOS.

auchan-s6s5in3g:

As it turn out I was able to flash and run recovery made for the different phone with the same SoC, bricking Android at the same time :/. There’s no video but adb works and that alone was enough to make a backup from which I was able to retrieve dts file(see glossary). That file may simplify porting process immensely. Why? With newer Linux kernels (including newest one) I may be able to use generic kernel made for the SoC brand used in this phone (Spreadtrum) and combine it with the dts file to get kernel boot on this device.

sony-taoshan:

This will make a fine addition to my collection, there’s an LineageOS kernel for it which, in theory, should allow for easy porting pmos. Oh naive me. After flashing pmos even kernel didn’t work so I thought about making backup of the whole phone before I hardbrick it, but I needed custom recovery for this. Sadly, as most phones have separate boot and recovery partitions this one does not >:(. I can’t just flash recovery since it would overwrite existing kernel, preventing currently installed system from booting. For each system/kernel I’d have to pack files for recovery mode which would be annoying, so for now I have phone with no working system on it, without backup, waiting for influx of my patience.

glossary:

DTS is a compiled DTB file, also known as  Device tree, that file contains information about all components of the device, such as CPU, GPU, memory, screen, etc. It allows to compile one generic kernel which then reads DTS file and activates needed peripherals instead of compiling specialized kernel for each phone.

fastboot – special mode in smartphones which allows for installation of new firmware, replacing whole partition instead of single files

recovery – special mode in smartphones which allows for installation of new firmware, or updating it without reflashing everything; resetting phone to factory default or making backups