[DEV] All-in-one flash/root/recovery unbricking script

Search This thread

niraj87

Member
Oct 30, 2010
42
2
Mumbai
Why is unbrick.exe not proceeding with the s/w update....its stuck on "Starting LG S/W Update".....USB driver as well as LG update tool are installed in my pc...plz help
 
  • Like
Reactions: behroya

rajeshmk2012

Senior Member
Dec 22, 2012
138
24
I think smartflash is best way to unbrick phone...

Sent from my LG-P970 using xda app-developers app
 

Roy360

Senior Member
May 18, 2011
101
1
How are you guys installing V10A_00.kdz?
When I run the following:
%ProgramData%\LGMOBILEAX\B2C_Client\LGUserCSTool.exe userid=QM;usertype=B2C;region=K;country=KR;branch=KR;csemergency=F;language=KR;startstep=1;mode=TRUE;url=%A_ScriptDir%\V10A_00.kdz;binversion=V10A_00;localurl=%A_ScriptDir%\V10A_00.kdz;localver=V10A_00;usernd=Y;fileclass=CSE

It it just downloads the latest one automatically, and from there, any attempt to install CWM results in signature error.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    Here is a small AutoHotkey script for getting your bricked phone back in the game in less than 10 minutes. Today I noticed that my dear phone spent more time being bricked than alive. This all due to failed overclocking trials with next Nova kernel version. And even if I already managed to get my phone up in half an hour or so it still involved a lot of manual work which was disturbing my parallel tasks. Considering the fact that my endeavours with OC are still half way there I decided to automate my life a little. I chose AutoHotkey because it allowed easy interaction with LG Update tool.

    Here are the files you'll need:
    Code:
        161 792 adb.exe
         96 256 AdbWinApi.dll
        585 731 psneuter
      6 291 456 recovery.img
          1 534 unbrick.ahk
    238 968 158 V10A_00.kdz
    adb.exe and AdbWinApi.dll are taken from Android SDK, psneuter is from SuperOneClick, recovery.img I dumped from my phone mmcblk0p4 partition, unbrick.ahk is the script I wrote (you'll need to install AutoHotkey to run it), and V10A_00.kdz is LG KDZ. I did not try newer KDZ versions as my goal here was only to get recovery up and running to be able to flash CyanogenMod and continue from there. The script presumes that you already have LG USB drivers and B2C Client installed.

    And here's the script itself:
    Code:
    ; start LG Update tool (presumably installed at %ProgramData%\LGMOBILEAX\B2C_Client\)
    Progress, m zh0, Starting LG S/W Update...
    Run, %ProgramData%\LGMOBILEAX\B2C_Client\LGUserCSTool.exe userid=QM;usertype=B2C;region=K;country=KR;branch=KR;csemergency=F;language=KR;startstep=1;mode=TRUE;url=%A_ScriptDir%\V10A_00.kdz;binversion=V10A_00;localurl=%A_ScriptDir%\V10A_00.kdz;localver=V10A_00;usernd=Y;fileclass=CSE
    WinWait, Select Country
    Control, ChooseString, Diff, ComboBox1
    Control, ChooseString, English, ComboBox2
    Send {Enter}
    WinWait, LG S/W Update
    
    ; wait for update to finish
    ControlGetText, s, Edit4, LG S/W Update
    Progress, m zh0, Waiting for LG S/W Update to finish...
    While InStr(s, "Found(2004, 100)") = 0 {
      Sleep 100
      ControlGetText, s, Edit4, LG S/W Update
    }
    Process, Close, LGUserCSTool.exe
    
    ; at this point the phone should be rebooting
    Progress, m zh0, Wait for the phone to reboot and turn on USB debugging to continue.
    RunWait, adb.exe kill-server
    RunWait, adb.exe -d wait-for-device
    
    ; get temporary root and flash recovery
    Progress, m zh0, Rooting...
    RunWait, adb.exe -d push recovery.img /data/local/tmp/
    RunWait, adb.exe -d push psneuter /data/local/tmp/
    RunWait, adb.exe -d shell "chmod 0755 /data/local/tmp/psneuter"
    Run, adb.exe -d shell /data/local/tmp/psneuter,,,pid
    Sleep 3000
    WinKill, %pid%
    RunWait, adb.exe kill-server
    RunWait, adb.exe shell "dd if=/data/local/tmp/recovery.img of=/dev/block/mmcblk0p4" 
    Progress, OFF
    RunWait, adb.exe reboot recovery
    MsgBox, The phone is rebooting into recovery now and we're done here.
    Just boot your phone to software update mode and execute unbrick.ahk. It'll perform the following tasks:
    • Executes LG Update tool, waits for it to finish, and kills it then
    • Waits for you to enable USB debugging
    • Roots the shell with psneuter, flashes and reboots to recovery
    From this moment on you can already continue inside recovery to restore your backup or flash CM and so on. This and enabling USB debugging are the only user interactions, everything else is automated with the script.

    I hope someone will find it useful beside me as well. Do not fear experimenting with stuff and bricking the phone - unbricking is as easy as running a single script. This is a huge timesaver if you're planning to do this in hourly basis :)
    6
    Package

    Just created a full package to do exacly the same as explained in the first post.
    Read the included README!!.txt first!

    Download: http://d-h.st/mUM
    2
    I've almost always got bootloop with my experiment for bluetooth-audio, but still have nandroid backup and working recovery button :p:D

    Thanks for your hardwork, aprold :)
    1
    does it perform a hard reset ?
    1
    Fantastic work, thanks!