[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] gerv.markham:
tl;dr: the Mini I bought as a surprise Christmas present for my wife now has CyanogenMod 9.1 on it, but the touchscreen and buttons no longer work due to a failed attempt to fix the "over-sensitive buttons" problem. How do I recover and have a happy Christmas?

The Story:

My wife's phone is old and clunky, so I decided to get her a new one for Christmas. I wanted one which supported CyanogenMod, but I didn't want it to cost the earth in case she didn't like it. After much research, I got an "as new" Xperia Mini from Amazon Warehouse Deals.

First, I unlocked the phone using the CyanogenMod instructions and Sony's online "provide a code" tool. I then installed ClockwordMod recovery, CyanogenMod 9.1 (cm-9.1.0-smultron.zip) and Google Apps (gapps-ics-20120317-signed.zip). No problems there. Backup? Why on earth would I need one of those? I've done this before... (famous last words.)

However, I ran into what I now realise is a common problem: the buttons kept triggering randomly. This made the phone impossible to use. As I couldn't send it back as it now had CyanogenMod on it, I tried to find a fix. I looked around and found what I thought was a solution, here:

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

http://xdaforums.com/showthread.php?p=31468746#post31468746

The solution involved running a script using GScript. After much fiddling about, I discovered I didn't have the required executable that the script calls, cyttsp_fwloader, on my phone. Other people said they'd got it from the official firmware images. I couldn't find those at the time. But I did find a copy that some guy on XDA had uploaded in a file called Fwloader_flashable_sk17i.zip:

http://xdaforums.com/showpost.php?p=34885060&postcount=4

After more fiddling with copying, executable permissions and remounting /system read-write (http://stackoverflow.com/questions/10973886/android-adb-shell-permission-denied), I managed to run the script.

The commands the script ran were:

dev=/sys/devices/platform/spi_qsd.0/spi0.0
fw=touch_smultron_sony.hex
/system/bin/cyttsp_fwloader -dev $dev -fw /system/etc/firmware/$fw -verify_only

(The script was slightly modified from the one posted in that it didn't reboot the phone; I did that manually.) However, when the phone came back up, both the touchscreen and the buttons were totally non-functional! Suddenly, I noticed that the copy of cyttsp_fwloader I had use was for a sk 17i rather than an sk 15. Oops. However, I don't know for certain whether that's the cause of the problem.

I tried to flash back to Stock, to see if that would help. I don't run Windows, but I discovered FlashTool:

http://androxyde.github.com/index.html

I downloaded flashtool-0.9.9.0-linux.tar.7z with the hope of flashing the .ftf file found inside Xperia_Mini_ST15i_4.1.B.0.587.rar (not entirely sure where I found that).

However, to flash a new stock ROM it requires you to get into a mode entered by holding down the Back button when booting - and that button doesn't work! So I can't flash!

I can boot into fastboot mode (screen blank, blue LED) but I can't figure out how to boot into recovery mode. (Is there some button combo I haven't found the docs for?) I have adb shell access when I boot into CyanogenMod, so I could copy files and run commands that way.

How can I fix all this mess, ideally by restoring the buttons to a working state? I can't return the phone to Amazon in its current state. My wife even has an old Windows XP box downstairs I'd be willing to use to run Windows-only software if I thought it would do any good. Help!

Thanks,

Gerv