[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] 41.kretschi:
Hi all

recently I flashed legacyexperia CM11 (Oktober '14 Version) on my stock sk17i (unlocked bootloader) without flashing the kernel first. This broke my touchscreen. Why? I don't know if it has to do with the flashing or if theres simply another touch screen than the usual ones in my phone. Now I've been trying all kinds of methods decribed in different thread in this forum, but most of them are just trying out some "magic" without pointing out any clue why this happens.

So if my solution doesn't help you you might try one of these:

http://xdaforums.com/showthread.php?t=2104484

(but that's for later)

Anyway first I made some progress flashing rage kernel and Ultimate HD 2.0.2 with selecting "active" (satsuma) as device. My Phone booted and was fine, but at least the hw keyboard didn't work and who knows what else didn't - I didn't want to leave it like that. When I installed Ultimate HD 2.0.2 again with "mini pro" (mango) as device and followed the further steps in the tutorial touchscreen was broken again.

You can find it here: http://xdaforums.com/showthread.php?p=36219519

So I found out that it has to do something with the touchscreen drivers used by satsuma.

Now theres two tutorials that address this matter.

This one shows how to make the phone use the satsuma touchscreen hw drivers by editing hw_config.sh:

http://xdaforums.com/showthread.php?t=2366426

And this one give some further understanding about how hw_config.sh works:

http://xdaforums.com/showthread.php?t=2657310

So the following happens:

For my CM 11 hw_config.sh makes a cat of /sys/devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/appid which gives it a hex number that is connected to the driver that is beeing loaded.

(stock roms cat /sys/devices/platform/spi_qsd.0/spi0.0/appid)

In case the hexnumber of you touchscreen is NOT one of these 4:

0x0603 : touch_mango_seiko.hex

0x0103 : touch_mango_sony_type1.hex

0x0113 : touch_mango_sony_type2.hex

0x0203 : touch_mango_hitachi.hex

then by default touch_mango_sony_type1.hex is beeing loaded which then doesn't seem to work.

In this case we want the satsuma driver to beeing loaded.

So theres two methods to get this done. For either we need to steal touch_satsuma_hitachi.hex from any satsuma rom. Then we do the following:

Method 1:

We copy it to /system/etc/firmware/ where the other touchscreen drivers are and then edit the /system/etc/hw_config.sh to use it in case none of the mango drivers are useable. So either place another line with hexcode 0x0207 in the case and make it choose the satsuma driver or make the default case use the satsuma driver.

"0x0203")
fw=touch_mango_hitachi.hex
;;
"0x0207")
fw=touch_satsuma_hitachi.hex
;;
*)
fw=touch_mango_sony_type1.hex
;;
esac

or:

"0x0203")
fw=touch_mango_hitachi.hex
;;
*)
fw=touch_satsuma_hitachi.hex
;;
esac

Method 2:

This method is for all of you who are not into editing stuff :)

Just rename the touch_satsuma_hitachi.hex file to touch_mango_sony_type1.hex and put in /system/etc/firmware/ , overwriting the original touch_mango_sony_type1.hex file

Yes and then of course we flash the kernel and then flash the modified zip.

Some hints:

* It doesn't matter which rom you use for that. I took the legacyexperia CM11 (Oktober '14 Version) (found here: http://xdaforums.com/showthread.php?t=2545367), opened the zip file with 7 zip and then messed around in it

* You can find the touch_satsuma_hitachi.hex e.g. in the Ultimate HD 2.0.2 rom in the \aroma\active\etc\firmware folder. I also put it here as an attachment.

* more following.. ?

Open questions:

* does my phone have a different touch screen than the commen sk17i or did I just broke it somehow by making it believe that it's touchscreens hex code it 0x0207?

* in case I broke it, how can I make it choose the correct touch screen hex code again

* to look further into this one could try to change the default touch screen driver in hw_config.sh to one of the mango ones and see if it works?

* is there another method to handle this problem properly?

Since I'm not a developer I'm a bit lost with these questions, maybe somebody who has a deeper understanding of these things could make some explanations?

So long :) - hope it helps.

Thanks to bangladeshi, karandpr, n_tienloi , mihan and of course to mikeioannina