Friday, September 30, 2011

Beware of FlashTools OPTIMIZE button with SO-01B (Xperia X10)


Do NOT press the OPTIMIZE button in FlashTools. I don't care how much you might want to, don't.

That damn little button should be renamed "self destruct". It is supposed to install JIT and should only be used with an Xperia X10 that is running stock 2.1 Eclair. However SO-01B users should avoid using it, even if they are using a stock Docomo ROM because I just spent the last (checks logs) five hours trying to recover from the mess it made of my wife's X10 (which is why I was fixing it instead of sleeping). From all I can find, this phone running 2.1-update1 build 2.0.1.B.0.19 is supposed to be compatible. I don't know what went wrong. Wait, yes I do. I pressed that stupid little button.

Backing up about about half a day, I finally got around to installing Windows in a VM, so I was able to root the Xperia. Everything went smooth as butter - until I got greedy and decided to install JIT. Even then, the install log appeared normal (see below), but after rebooting, the phone hung on the splash screen. I tried booting into recovery, but that didn't work. I could put the phone into flash mode - at least it appeared to be in flash mode - but FlashTool didn't recognize it as such.

I knew it wasn't bricked because the phone was actually booting, but ddms showed me that it was bootlooping. Surprisingly, I could actually get a shell with adb, but I couldn't switch to the root user (seg fault), so I didn't have sufficient privileges to mount the system partition as writeable and undo some of the changes, particularly to build.prop.

So I was stuck. Even if it was not bricked, with a locked bootloader, no ability to flash, a non working recovery, and no root privilege, it might as well have been.

Eventually, I decided to keep fiddling with buttons to see if I could get it in recovery. That didn't work, so I removed the SIM and kept rebooting and fiddling. FINALLY it popped into recovery! The last series of things I did was roughly this (which is most likely just random coincidence):
  • SIM removed
  • Powered on while holding the back button.
  • Pressed the power and middle button at the same time
  • Then alternated between hitting one then the other 
  • Continued for about 10 to 15 seconds.
And then suddenly I was looking at the recovery screen, wondering if I should laugh or cry. I was able to flash the backup that I made before pressing the stupid OPTIMIZE button. On the bright side, it is good to be reminded sometimes why I religiously make backups.

FlashTool "optimize" log
29/055/2011 22:55:39 - INFO  - Remounting system read-write
29/055/2011 22:55:39 - INFO  - Pulling /data/local/tmp/remount.log to .\devices\X10\work\remount.log
29/055/2011 22:55:40 - INFO  - Pulling /system/build.prop to .\devices\X10\work\.
29/055/2011 22:55:40 - INFO  - Pushing ./devices/X10/optimize.tar to /data/local/tmp/optimize.tar
29/055/2011 22:55:42 - INFO  - Pushing .\devices\X10\work\buildnew.prop to /data/local/tmp/build.prop
29/055/2011 22:55:43 - INFO  - Running optimize  as root thru sysrun
29/055/2011 22:55:44 - INFO  - Optimize finished. Rebooting phone ...


That's 5 seconds that turned into 5 hours. おやすみなさい。

5 comments:

  1. I haven't tried it yet, but the bootloader for the Xperia X10 was finally broken about a month ago:
    http://www.addictivetips.com/mobile/unlock-xperia-x10-bootloader-with-a-single-click-unlock-tool/
    http://www.xperiax10root.com/303-sony-ericsson-xperia-x10-bootloader-unlocked.html

    And since docomo has said it will not roll out the gingerbread upgrade to its X10/SO-01B customers, this is great news. Unfortunately there is as yet no version of cyanogenmod, but maybe there will be:
    http://wiki.cyanogenmod.com/wiki/Unofficial_Ports
    http://www.youtube.com/watch?v=ZhR5sIy2Wr4

    ReplyDelete
  2. Hey Greg, long time no see ;-)

    There most certainly will be cyanogen for it. And it will be official.
    http://www.cyanogenmod.com/blog/sony-ericsson-xperia-support

    Unbelievable, but SE gave them the official support they needed to port CM to their devices. A commenter mention that was likely due to the E half of SE based on the S half's shenanigans with hacking the PS3. I'd be inclined to agree.

    ReplyDelete
  3. Well, I also once got boot-looped, but fixed that with PC Companion and by restoring backup. Didn't took long :)

    ReplyDelete
  4. I also have an SO-01B, and have been happily running it with various custom roms in the last year or so.

    Then relatively recently, as I've upgraded to very recent roms, everything seemed to turn to crap - my beloved phone kept lagging like a SOB, freezing, crashing - especially when running google Maps/Navigator, which is when I need it most.

    Then just yesterday, after trying about 4 or 5 recent roms and probably just as many kernels, I decided to try disabling the JIT that seems to be included by default in recent kernels, and BINGO! Things have been running like a charm now. Curious about this, I decided to google around for people who've had similar happen, and saw your blog entry.

    So yeah, JIT == Fail, for us SO-01B users - actually, the phone seems to run smoother without it anyway.

    Just thought I'd share.

    Regards!

    ReplyDelete
  5. yeah, jit is not really good on these 1 GHz single core processors.

    ReplyDelete