Home page of this blog

Sunday, August 19, 2012

Flashtool in Ubuntu Linux

Everytime I wanted to change firmware for my Xperia phone, I used to reboot into Windows 7

Recently I feel lots of Blue Screen Of Death in Windows 7 (think due to nvidia driver problem), and did not want to reinstall Windows 7

I tried flashtool in Ubuntu Linux and it worked, I changed firmware in my Xperia phone!! Thanks XDA devs and Flashtool devs

Here is how

Download flashtool for Linux from (Refer, http://forum.xda-developers.com/showthread.php?t=1588586)

http://androxyde.github.com/Flashtool/

http://www.flashtool.net/download.html


After downloading the linux version with extension tar.7z, unzip it

To do this, install p7zip, p7zip-full from synaptic or from software center




Unzip the Flashtool folder,

Add this rules to following file (create this file by copying existing 70-persistent-net.rules as follows,
sudo cp /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/80-persistent-usb.rules)



sudo vi /etc/udev/rules.d/80-persistent-usb.rules

and add


SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="*", MODE="0777"


Should look like this




Before running flashtool install ia32-libs

sudo apt-get install ia32-libs

To run the flashtool enter the directory where the 7zip got extracted and run FlashTool as super user

For e.g I did this



cd Downloads/FlashTool/




sudo su


 ./FlashTool


It should look like this



I choose to install a firmware to my Xperia phone and Flashtool in action





After installing new Firmware my phone screen looks as below 


33 comments:

  1. I rooted my phone with latest flashtool 0.9.8

    and what a difference it made to ICS, I removed power saver app as I suspected it is keeping my screen awake always. Till now I could not reproduce screen wakeup issue after freezing power saver app

    I have disabled google+,facebook, twitter, all extensions to album app and unplug charger reminder earlier in ICS without rooting (before rooting to check if they were causing screen wake up issue)

    Now I left all the disabled apps as is, I have browser to check facebook, no need for a battery gobbler service running in background

    ReplyDelete
  2. I, for one, would appreciate if you updated this guide to work with the latest (0.9.9.0) version of FlashTool that uses libusbx 1.0.14.

    Right now I'm stuck at something like "libusbx 1.0.14 needed libusbx 1.0.12 found" or some such...

    ReplyDelete
    Replies
    1. Oh ok, will try it and update this guide. Meanwhile (you already know this I think) have multiple flashtool folders so that there is a fallback when there is some problem

      Delete
    2. I tested with 0.9.9 and it works, could you tell me which version of Ubuntu you used

      I am using Ubuntu 12.04

      Delete
  3. Hello Sankaran,

    I've just install all and run Flashtool but is this version only for XPERIA devices ¿?

    ReplyDelete
    Replies
    1. This is only for Xperia devices

      Delete
    2. OK :) do you know if there is another app available for the rest of devices ?¿¿?

      Specially for MTK devices. I'm using MTK6577 :)

      Delete
    3. Check this, http://forum.xda-developers.com/showthread.php?t=1846397

      The thread explains about a program called TSsparky for rooting

      For rooting any device, refere superoneclick,

      http://www.xda-developers.com/android/do-everything-with-superoneclick-for-android/

      and

      http://www.xda-developers.com/android/superoneclick-updated-to-2-2-now-features-zergrush-exploit/

      Delete
    4. Just search for superoneclick and you could see thousands of results

      Delete
  4. Thanks.. but it's already rooted. My intention is flashing cooked ROMS from LINUX Ubuntu or Debian without use Windows.

    I was thinking to change
    SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="*", MODE="0777"

    for my idvendor code.. but is not possible ¿?



    ReplyDelete
    Replies
    1. If superoneclick is written in java, we could move share adb from flashtool and try with other phone

      as far as the idVendor, I guess

      sudo lsusb

      should help (or sudo lspci) to get the vendor id

      Delete
  5. how to save that addition :/


    SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="*", MODE="0777"

    ReplyDelete
    Replies
    1. if you don't know how to use vim, use nano or gedit

      anyhow, to save in vi editor, use :wq (to come to command mode, use escape keystroke)

      Delete
  6. no idea wat u said..
    lol
    i'm new to linux

    ReplyDelete
    Replies
    1. :)

      Download the rules file from below link(I uploaded my rules file)

      https://docs.google.com/file/d/0B_nTbpzPbbNJOExLbzVBTWhHSmc/edit

      Copy this file into /etc/udev/rules.d/ from command line, say you downloaded the rules file into Downloads folder, open terminal,

      cd Downloads
      sudo cp 80-persistent-usb.rules /etc/udev/rules.d/

      the above command will ask your password, just key in and the rules will get copied

      Delete
  7. Hi there,

    I just tried installing Flash onto my system (Ubuntu 11), tried installing Libusb dev package - didn't worked, and I tried doing it by compiling Libusbx from binary, but it didn't worked out.It gives me the same error when I try to run Flash tool,

    Libusb not found. Minimum libusb version is 1.0.14
    It can be downloaded on http://www.libusbx.org

    I can not figure what more to do, as I have bricked my phone very badly.

    Hope to see you reply soon on this.

    ReplyDelete
    Replies
    1. Could you try flashtool from Ubuntu 12.04, libusb in Ubuntu 11 maynot be having recent versions of libusb

      Delete
  8. as soon as flashtool runs, it will not respond

    ReplyDelete
    Replies
    1. Be specific, your flashtool is hanging or Ubuntu,

      I changed phone fw yesterday using flashtool without any probs

      Delete
  9. Por cosas como estas odio cada vez mas a windows, gracias.

    ReplyDelete
  10. My xperia ray keeps failing with the following message

    02/054/2013 13:54:04 - ERROR - S1 Header checksum Error
    02/054/2013 13:54:04 - ERROR - Error flashing. Aborted

    Any ideas

    ReplyDelete
    Replies
    1. It could be due to corrupted download of firmware or flashtool. Try checking md5sum after downloading to verify if the download was done properly

      Delete
  11. thanks very much for this. I couldn't get windows to load the right device driver when running flashtool in windows, flashtool couldn't find the device!

    then I realised flashtool was available for linux, so got that and it worked first time.

    the best way to add the udev.d rules and load them without needing an editor is as follows

    $ sudo -i
    --enter password--

    # cd /etc/udev/rules.d
    # echo 'SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="*", MODE="0777"' > 63-sonyxperia.rules

    # ps -ef | grep udevd | grep -v grep | awk '{print $2}' | xargs kill -1


    ReplyDelete
  12. In Ubuntu 13.10 ia32-libs is removed. So the corresponding libraries would be,
    sudo apt-get -y install lib32ncurses5 lib32stdc++6. Rest of the tutorial works just fine

    ReplyDelete
    Replies
    1. Thanks, I have not yet tried it in latest Ubuntu

      Delete
  13. Hi Sankaran,
    Thanks for this very informative article. With the help of this, I have been able to succesfully install Flashtool version 0.9.13.0 on my Ubuntu 13.10. Further on, I would like to proceed with installing a Custom ROM on my Xperia Ray. I am very new to this and would like to know how can one proceed with the installation of a custom ROM on their Xperia phones. Referring other articles, I found out that I need to unlock the bootloader and also install a kernel. But in this article, you have not mentioned any of this. Could you please advise in detail, how can one proceed with the installation of a Custom ROM on their Xperia phones in very simple language for naive users like me.

    A speedy response will be appreciated.
    Many Thanks!!

    Abbas.

    ReplyDelete
    Replies
    1. Try this, it was written for Xperia S but should work for ray as well, once you unlock try firmwares from xda for ray (do not cross flash different firmware by mistake)

      http://duopetalflower.blogspot.in/2012/12/unlock-xperia-s-bootloader-from-ubuntu.html?m=0

      Delete
  14. ubuntu 13.10 x64 , i confirm the flashtool is crap. you know why ? because it gives error that libusbx is missing. libusb-dev doesnt do the trick. if we download to install the libusbx using the "./configure" "make" "make install", it gives error that make file isnt there , but i can see with my eyes that its there.
    so all these is crap.
    is there any simple easy tool/script to root the xperia neo ? i also have lg optimus 4x and the root procedure was only one click. i dont understand why we need to run a whole app and go through that to only root. thats lame. neither the unlock i can understand. unlock is only one command in adb. we only need to change one little file inside stock rom and press the oem unlock bootloader command. can we make things easier and more simple so we dont have a problem in future ubuntu updates ?

    ReplyDelete
    Replies
    1. Flashtool is not crap. In Ubuntu 13.10 x64 you should run the following commands in the Flashtool folder:

      cp /lib/x86_64-linux-gnu/libusb-1.0.so.0 ./x10flasher_lib/linux/lib32/libusbx-1.0.so
      cp /lib/x86_64-linux-gnu/libusb-1.0.so.0 ./x10flasher_lib/linux/lib64/libusbx-1.0.so

      Have a nice flashing :)

      Delete
    2. And you just don't need the libusbx anymore as it just fall back to the libusb.
      "As of 2014.01.26, this project (libusbx) has been fully merged back into libusb and is being discontinued."

      Delete
  15. Very informative article. I hope I can make it to work on my Centos 6 desktop.

    ReplyDelete