Sunday, February 10, 2013

LG Optimus SU640: Comfirmed working guide to Flashing Custom Rom

After three long weeks of scrounging the web for a working guide to flashing custom Roms on my LG Optimus SU640 and not finding any clear method which would simply work, I have finally come up with a method that would work just like that.

I would like to thank XDA Developers forum, a great Android Development forum which has taught me a lot.

Declaimer: None of the tools I used are my own, but the combination of what to use is entirely cooked up by me by experimentation. So if you want to copy this, please give credit and link back. And  I am not responsible if you brick your phone.

Without further ado, here is what you'll need to do .

Files you need.

SU640 Drivers : Download LG update Tool from LG website, it will package all the required drivers
Clockwork Mod recovery : Download ClockworkMod version 5.8.2.0
AllRoot tool : Download AllRoot
A custom ROM for SU640 : XDA developers
SU640 v10i_kdz firmware image. Download
LG_KDZ_FW-Update_OfflineFix  : Download  Download Originally downloaded from XDA but don't have exact link to link back

What you need to do:

Step 1 : Downgrading

Add the following line to the end of C:\Windows\System32\drivers\etc\hosts

127.0.0.1 csmg.lgmobile.com

Once you have downloaded all the files, copy them to "C:\SU640_Flashing".

Extract KDZ update tool "LG_KDZ_FW-Update_OfflineFix"

In the extracted folder, run "Automatic Offline Procedure".
Press "OK" on first two messages.
A word document will open up (ignore it), and a dialog box , press OK on dialog box. If you are on windows 7, it will show you another dialog box, press "Yes".
You will be presented with "R&D Test Tool" by LG. So far so good.


Make sure your R&D Test Tool window has the following options selected. If not, then select these, the ones marked in Red.

  1. Type : CDMA
  2. Phone Mode: Emergency
  3. KDZ file : browse to v10i_00 kdz file you downloaded
  4. Select model.dll : browse to "model.dll" in  LG_KDZ_FW-Update_OfflineFix folder.
Take out the SIM card, memory card and put your phone in "Download mode"

How to put LG SU640 in Download mode


Turn off your phone. Disconnect your cable.

Keep pressing the Volume Up button and insert your USB cable. wait a few seconds and you will enter Download mode.

Once your phone is in Download mode and connected to computer, press "CSE web upgrade test" on the bottom right corner.


A new dialog box will appear, just press "Start Upgrade"
Another dialog box will appear, select "Different country" and "English" language and Press OK.

A new old-style window will appear, and downgrading process will start. Let it finish, and don't worry if it gets stuck at 4%. Just look at the log, and it will be incrementing to 5% , 6% and so on. You'll also notice a "device model not found" message, you can just ignore it.

Your phone will reboot thrice before you see "(2001,0)" string on the Log. which means the process is complete.

Close the window using "task manager" because it will not reach 100% in progress bar and will not close.

Step 2 : Rooting

Once you have booted into the Korean GingerBread firmware, press the "Left" button and select "English".
You can skip other settings because we are not going to use this ROM very long.

In the settings, "Applications" , select "Unknown sources" , "USB debugging", and connect your phone in "LG Software mode".

Extract the "AllRoot.rar" file. and run "RunMe_En" and follow instructions on the screen.
Once RunMe_En finishes successfully, you are rooted.

Step 3 : Clockwork Mod Recovery

Turn your phone off. Insert the Memory Card and Turn on the phone.
Extract  clockworkmod version 5.8.2 you downloaded. 
Put your phone in USB storage mode and copy recovery.img from clockworkmod folder into your memory card, in "wiredsoup" folder.

Safely disconnect your phone.
Download "Terminal emulator" from Playstore.

Run the downloaded "Terminal Emulator", and type the following commands.

su
cd /sdcard/wiredsoup
dd if=recovery.img of=/dev/block/mmcblk0p13

once the final command finishes telling you how many bytes copied in and out etc, type the following command

reboot recovery
Your phone will reboot, and present you with "Clockwork Mod recovery" :) congratulations.

Now you can reboot into the korean ROM again, and copy any downloaded custom Rom to your sdcard, and flash using the recovery mode.

How to enter clockworkmod recovery on LG SU640 and Nitro HD:

One method is via terminal emulator or adb , the "reboot recovery" command.

Second method is to power off the phone. Keep pressing volume down button and power up button and wait for white text about "factory reset" and stuff. Release both buttons, and press Power button twice.


IMPORTANT:

Note 1:
Some custom ROMs will fail with "some symlinks failed "error and "status 7" . Make sure your downloaded file and original file have the same MD5 hashes.


Note 2:
Some ROMs will give an error: "assert failed getprop(ro.product.device==SU640)" or something like that.

Open that ROM using Winrar, goto "META-INF\com\google\android " and open the file named "updater-script" and remove the first line and save.

On closing the text editor, winrar will ask you if you want to replace the edited file, click "Yes" or "OK" . and flash the ROM again. This time, it will work.

Always remember to wipe before installing new ROMs.

72 comments:

  1. I tried that procedure in that site mentioned above.

    When I press Start Upgrade, it says "Checking for New LGMobile update programe" and this keeps on coming again and again and again.
    Nothing seems to happen.

    What do i do now?

    ReplyDelete

  2. Add the following line to the end of C:\Windows\System32\drivers\etc\hosts

    127.0.0.1 csmg.lgmobile.com

    ReplyDelete
  3. Tried this tutorial and when it comes to rooting, it says device not found or something like that..I followed every step.. Anything I missed or need to do?.. TIA!

    ReplyDelete
  4. Make sure your phone has "USB debugging enabled" , and you are in LG software mode.

    ReplyDelete
  5. ali brother plz guide me in detail to this step how do i add i dont get your point?

    Add the following line to the end of C:\Windows\System32\drivers\etc\hosts

    127.0.0.1 csmg.lgmobile.com

    and where do you have to copy all downloaded files to? to the memory card?
    and which downloaded files plz name them?

    Once you have downloaded all the files, copy them to "C:\SU640_Flashing".

    ReplyDelete
    Replies
    1. there is a file named "hosts" at C:\Windows\System32\drivers\etc\ that you need to edit.
      Open this file in Notepad, and paste 127.0.0.1 csmg.lgmobile.com at the end.

      Which downloaded files ? all the files under the heading "Files you need"

      You do not have to copy anything to Memory Card.

      Delete
    2. ali ok i tried as u said but when i open it in note pad and edit it and again save it the file saves in note pad file??

      and then when i open automatic offline procedure errors come and quits??

      Delete
    3. Here is my hosts file.
      copy the file below to "C:\Windows\System32\drivers\etc" directory in your computer.


      http://www.4shared.com/file/Hr6KLJAh/hosts.html

      Delete
    4. THANKS ALI YOUR FILE WORKED AND I HAVE DOWNGRADED AND ROOTED ALSO

      NOW JUST GIVE ME LINK TO A PERFECT ROM THAT YOU ARE USING THERE ARE MANY ROMS BUT I WANT THE BEST ONE FROM YOU SO KINDLY JUST POST THE LINK THANKSSSS

      Delete
    5. http://forum.xda-developers.com/showthread.php?t=1746127

      Ho!No! cm9 full throttle

      Delete
    6. oh ho yar the download link is dead can you upload rom to 4shared?

      i like that rom u just tell me

      Delete
    7. check the last pages of the linked thread, it contains the download link.

      Delete
  6. Step 3 : Clockwork Mod Recovery

    I FOLLOW EACH STEP AND IN EMULATOR WEN I WRITE COMMAND

    it says cant find dont know where am i wrong plz help

    ReplyDelete
  7. ok got the rom

    and when in terminal i type su and after that when i type cd wiredsoup
    this command comes

    can't cd to wiredsoup

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. ok ali brother i have installed other rom avatar rom it is good and customizable

    i really appreciate your work thanks alot

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. danial can you please tell me how you have solved this problem ihave the same problem

      Delete
    2. I solved it easily. Just try the downgrading and rooting method again from the star nd again install cmw mod and flash a custom rom..

      And dont thank me thank the admin of the website he elped me alot.

      Delete
  14. post ROM specific issues on ROM specific threads please, they can help better.

    ReplyDelete
    Replies
    1. ali you really are lucky for me. thanks again man i tried your software downgrading process and downgraded and rooted and all the stuf and now i am using hono rom and everything is fine so thanks i juste wanted to inform you thanks again buddy

      Delete
  15. Interesting post, will like to appreciate your work.

    ReplyDelete
  16. Hi , i got my new phone LG Optimus LTE SU640 and all the system apps are in korean language and those are useless to me as i dont understand korean , so i want to root my device . i have no clue what to do , can anyone explain me what should be done inorder to root my device , plz tell me from the Scratch..!!!

    ReplyDelete
  17. Dear Mr Muhammad Ali!
    Salaam!
    I've put my phone in download mode and old window is started. Now it is stuck on 15% from last 10 mins with error of "The USB cable and your cellphone are not connected. Please connect your phone and wait for connecting the USB port for a while and press Restart button".

    I tried to repeat the process but still no success. Still stuck @ 15% after 14mins.


    ------------------------
    LAST LINES FROM LOG FILE
    06:43:27 : 0 - NotConnected.
    06:43:27 : 1 - Normal connect success
    06:43:27 : 2 - Emergency connect success
    06:43:27 : [009,400,102,102,102]The USB cable and your cellphone are not connected.\nPlease connect your phone and wait for connecting \nthe USB port for a while and press the [009,700,147,062,092]'Restart'[009,400,102,102,102] button.

    ReplyDelete
    Replies
    1. Plz make sure you are following the guide as is. And make sure of the following specifically
      Type : CDMA
      Phone Mode: Emergency
      KDZ file : browse to v10i_00 kdz file you downloaded
      Select model.dll : browse to "model.dll" in  LG_KDZ_FW-Update_OfflineFix folder.

      Delete
    2. Thanks.
      Problem was with cable drivers. Now all is good.

      Delete
  18. Salaam, Mr Mohammad Ali!

    Thanks for such helping tutorial.
    I tried to install couple of custom roms, and I'm having Error 7. And after that it stucks @ Boot-loop. Any how I flashed it couple of times.

    I've seen at end of your post about this error. You've talked about MD5 hashes.
    Will you guide me through it. What you mean by both Original and Custom roms have same MD5. How to match them?


    (I'm trying to flash Avatar and PAC rom. PAC Rom MD5:4e2347e95ae61713a76f4490c8973d80 and don't know about Avatar Rom MD5. Before my looping problem, both roms installed fine.)

    Looking Forward.
    Salaam
    ---
    Dr FS Abdal

    ReplyDelete
    Replies
    1. Getting a status 7 usually means a bad download. And md5 hash is used to verify if your downloaded file is proper or not.

      Other than that, make sure you are wiping properly ... if that doesn't help the you'll have to go back to stock , and follow guide from start .

      P.s if you can manage to install twrp recovery instead of cwm, it might be helpful . Twrp has gotten more stable and easy to use.

      Delete
  19. Thanks a lot for this Awesome tutorial,i was having the exact same issue as Faryal and thanks to this tutorial,i got my phone running just fine again MashAllah :)

    ReplyDelete
  20. brother in the 1st step when i press upgrade it says please install csmg b2c client tool

    ReplyDelete
  21. great. well done. but i can't installed any JB cus rom

    ReplyDelete
  22. When I installed Recovery and reboot recovery it say:
    Secure booting error
    Cause: boot certification verify
    Please help me to solve this Problem

    ReplyDelete
    Replies
    1. you did not follow the guide as is..
      first you need to unbrick your phone i-e flash v10i firmware using KDz method.

      Delete
    2. It works please follow instruction....

      Delete
  23. Ali bhai,when i give command
    cd /sdcard/wiredsoup
    it says not found...?????????

    ReplyDelete
    Replies
    1. you have to create a folder named wiredsoup... you'd have one if you follow the instructions correctly.

      Delete
  24. Dear Bro. Ali
    i download

    Ho!No! cm9 full throttle

    and install it in my LG Su640, but it say 'error and statu7' like u mention.
    and i try another room cm9, cm9.1, cm10.0. but it still the same.
    what to do? please help me...

    ReplyDelete
  25. sir, while updating there a window keep on saying the phone is not connected but its already in download mode and connected.. pls tell me what to do.. thanks

    ReplyDelete
    Replies
    1. please make sure u have the required phone drivers... you can download them from LG website or just google them out.

      Delete
  26. mr. ali, got same problem with unknown however i've changed my usb cable and followed the step by step tut doesn't have any changes please help. thank you

    ReplyDelete
  27. Dear Ali,

    I followed all the steps and succesfully reooted and flashed custom ROM on my SU640 device. Thanks for your guide.

    I am facing one problem. Basic functionaly is working on my phone but while playing games, graphics are very bad and perfomrsnce is laggy and slow. Is there anything else we have to flash to make it work?.

    Please help me.

    ReplyDelete
    Replies
    1. Sir reddy, can you give me the link for the drivers of su640.. i cant find it on the net and keep on leading me to a dead end.. ive downloaded pda.net however it doesn't work. pls help thanks

      Delete
  28. 16:21:00 : 0 - NotConnected.
    16:21:00 : 1 - Normal connect success
    16:21:00 : 2 - Emergency connect success
    16:21:00 : [009,400,102,102,102]The USB cable and your cellphone are not connected.\nPlease connect your phone and wait for connecting \nthe USB port for a while and press the [009,700,147,062,092]'Restart'[009,400,102,102,102] button.

    keeps on saying this message, please guide me to get through this, changed my cable 4 times and even bought new one. also followed the steps thoroughly.

    ReplyDelete
  29. sir ali, can you give me site on the drivers for su640? i'm having a hard time finding it.. thank you advance

    ReplyDelete
    Replies
    1. you can find the drivers at
      http://adf.ly/TxmbX

      Delete
  30. Ali brother i have su640 korean with ics rom on it. i flashed a jelly bean rom in it and now i cannot connect it to pc using mass storage. whenever i connect data cable with it, it starts charging and nothing else happens. what should i do now?

    ReplyDelete
    Replies
    1. if you flashed a JB based on CM, then you'll probably be getting your device as MTP device. Which is visible in windows 7 easily. you may require additional drivers for windows xp.

      If you want to enable mass storage on JB, there is a thread on XDA LG NITRO HD forums which helps you do that.

      Delete
  31. Muhammad Ali.......................... Finalllllllllyyyyyyy You saved my device from keeping to the train....... :) Happy Happy now.

    ReplyDelete
  32. sir ali, thanks i have successfully downgraded it to gingerbread however now its different problem i i tried to upgrade it to jellybean, it said when installing that its completed but when i went to menu it keeps on saying error something and can't show n menu. pls help

    ReplyDelete
  33. can anyone give me a site for a decent ROM for my su640.. it keeps on giving status 7 and it takes 4-5hours of download but to only a fail.. can anyone help please.. thank in advance

    ReplyDelete
  34. I have version 30D.... when I run downgrade, my phone restarts 3 times and I see the string "(2001,0)" in the log but my phone is still on Jellybean instead of Gingerbread, so can I continue to step 2?

    ReplyDelete
  35. Please Ali brother help me :(

    I done every things correctly but after using about 2 3 months now my device getting loops first splash screen. and do nothing else ?
    after factory reset it is working but when i press power button or phone get lock screen it looping that first splash screen....and phone getting too hot,.... only what i can do is removing the battery :( how can i overcome this problem? thanks u

    ReplyDelete
  36. Hi, thank you very much for this great tutorial, it help me unbrick my device!!!
    Many thanks.

    ReplyDelete
  37. Salam Ali bhai.
    Ali bro i have lg su 640 korien.
    Jab mery no py call ati hai to ring k sath sath girl ki voice main number bolti hai bar bar repeat karti hai jo k bell sy zada onchi us k awaz hoti hai ab main is ko kasy off karo or kahan sy????? Agar no save bhi ho tab bhi asa hi hota hai plz tell me what i do???

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Ali bhai junaid.shah125@gmail.com hai wo opar galt likhi gai hai thanx

      Delete
  38. Dear Ali can we flash lg su870 following this guide?

    ReplyDelete
  39. This comment has been removed by the author.

    ReplyDelete
  40. can we use V20c_00.kdz instead of V10i_00.kdz during downgrading?

    ReplyDelete
    Replies
    1. Sorry brothers I am no longer supporting this phone. I sold my SU640.

      Delete
  41. i have error of model.dll msg not found please help/

    ReplyDelete
  42. When I press "CSE web upgrade test" LGMobile Support Tool pop up but LGMobile Support Tool gives error that Application has stopped working.... help me how to get rid of this...

    ReplyDelete