If you are wondering what to do with your newly rooted LG G2, the next logical step is to flash a custom recovery image. A custom recovery image allows you to flash kernels, ROMs (different versions of your operating system including vanilla Android versions, newer versions of Android, etc.), and much more. Thanks to the developers on XDA (who you should definitely thank/donate to if this procedure helped you), it’s not too hard to do once you have root. Here’s how to flash a custom recovery image on your LG G2 (in this case, TWRP’s recovery image).

I. Before You Begin

  1. You must be rooted. If you aren’t, head to my How to Root the LG G2 procedure, complete it and return here to continue.
  2. You must use Windows.

II. Download the Recovery Image for Your LG G2

  1. Click on the developer’s link here and click on the version of your LG G2 in the first post under Downloads to download the recovery image for your specific version of the G2.
  2. Save it inside the ioroot folder you extracted in the How to Root the LG G2 procedure (if you didn’t do my root procedure but have root already, just go to that link and download the Root .zip file, extract it, then place the .img file for your recovery inside there).
  3. Download Loki Flash from here by clicking on Download Zip on the right side and save it to your Desktop.
  4. Extract the .zip by right-clicking it and selecting Extract All.
  5. Open the newly extracted folder, then open the bin folder inside, select the loki_flash file inside there, right-click it, and copy it.
  6. Paste the loki_flash file from there into the same folder you saved the recovery image above.
  7. Finally, rename the recovery .img file from openrecovery-twrp- to just recovery.img (make sure not to have it be recovery.img.img).

III. Flash the Custom Recovery Image onto the LG G2

  1. Plug in the G2 via USB cable (make sure that USB debugging is turned on from the end of the rooting procedure).
  2. Open the ioroot folder from the How to Root the LG G2 procedure.
  3. Hold Shift on your keyboard and right click in any blank space in that folder then select Open Command Window here.
  4. When the command prompt opens, type the following into it with hitting enter at the end of each line.

    adb push loki_tool /data/local/tmp/loki_tool
    adb push recovery.img /data/local/tmp/recovery.img
    adb shell
    cd /data/local/tmp
    chmod 777 loki_tool
    ./loki_tool flash recovery /data/local/tmp/recovery.img
    adb reboot recovery

    The developer has merged the loki_flash file with the loki_tool file. Therefore, we’ve slightly modified the commands above.

  5. It’ll reboot to recovery. If you see TWRP Recovery, it worked!

If this procedure helped you, please donate/thank the original developer of the program here.

Join 90k others & subscribe to my weekly, not annoying newsletter for more tech!

* indicates required
  • Jay

    CLearly something has failed here. I have windows 8 and files are not found. I have root, but cannot get recovery flashed

  • Bryan Bessey

    I followed your instructions to the letter and everything worked good. But when I got to the last part it says [-] Failed to open /data/local/tmp/recovery.img for reading. I haven’t rebooted the phone yet to see what happens as I don’t wanna brick the phone. What did I do wrong and what can I do to make it work properly?

    • Michael O’Neill

      You must wait for the ADB SU popup on your phone. once it pops up grant permission and then continue.

    • deep

      same problem

    • sulemN

      sameee problm with mee 🙁

  • rabi chowdhury

    i also have the t-mobile version and i am also getting stuck on the 2nd line..it says [-] Failed to open /data/local/tmp/recovery.img pleaseeeee help!!!!!!

  • iagozdi212

    My Uncle Blake got an almost new red Chevrolet Camaro
    Convertible only from working part-time off a pc… visit w­w­w.B­I­G­29.c­o­m

  • Andé Petersson

    This worked as it was intended. But, why couldnt someone just create a .bat file for these commands?
    LG G2 802 International version, sold in Sweden

  • aymen

    thanks for all your team, i did that and it is work 100%

  • Christian Rodriguez

    Thanks a lot fellas. I originally went to the forum and was completely lost. That tutorial is in perfect English and not in programmer language. Thanks again.

  • sirpablosan

    tried 4 times 2 time from the start, keep getting the lying down android guy with red triangle. any one have any idea?

    • Tyler Hansen

      I got the same thing. did you ever figure it out? After i let it sit on the android laying down it reboots normally but not into twrp

      • jakub

        same here.

  • Aldaris Ensoniq

    Everything works up until I type in the last command,adb reboot recovery, I get the following

    root@android:/ # adb reboot recovery
    adb reboot recovery
    * daemon not running. starting it now on port 5038 *
    * daemon started successfully *
    error: device not found
    1|root@android:/ #

    No idea what else to do, retried the entire process a few times, no luck.

    • snipe

      type, “exit” once
      then, “exit” again
      finally, “adb reboot recovery”

  • Ulver

    Very easy. Worked perfectly on a D802(International model). After the first command line if you get an error make sure you turn on the debugging mode. then repeat the first line.

  • Robbie Fitzgerald

    Who maintains the downloads? We’re up to now.

  • NB

    Worked like a charm on my D802…fantastic stuff !!! Very easy and readable instructions..well done.

  • MD

    I have followed all instructions but I get this error no matter what I try:
    [+] loki_flash v2.0
    [-] Input file is not a Loki image.
    Please tell me what I am doing wrong.

    • MD

      Figured it out. Had to flash back to stock and it worked like a charm!!

      • derek

        Can you explain this a bit more?

      • Juuso

        I had the same problem. How did you fix it?

      • al gore

        i am on stock version vs98012B, and i get this error. what stock version are you on?

    • maddox

      have you managed to install recovery ?

    • asdasd

      please tell me how you fixed, stock version of what? thanks.

  • Jerry

    Android dude is lying down…did anyone figure out the issue?

  • Gimmy

    this procedure did not work for me (LG G2 – 802 model) …however WORKED the following steps:

    adb push openrecovery-twrp- /data/local/tmp/openrecovery-twrp-

    adb shell


    cd /data/local/tmp

    dd if=/data/local/tmp/openrecovery-twrp- of=/dev/block/platform/msm_sdcc.1/by-name/recovery

    then reboot with “anreboot.apk” in recover mode

    openrecovery-twrp- = my twrp version

    Anyway the update of Gummy Custom ROM failed with TWRP software but I was able to restore from the backup using the same app (TWRP)

    Nice day,

  • Bruno Camarinha

    hi, isue is that i get all perfect until i reboot from recovery… how do i get back to it?
    I tried the volume down+power button… no result…. i get into the “no recovery stock”, any thoughts?

  • Bruno Camarinha

    ok i sorted out just by watching a vid on youtube… thanks anyways

    • kino

      whats the name of the video for thoes that need help

  • barondebxl

    For those that are rooted but are having issue flashing twrp with this method or any methods out there, just install freegee from the playstore, it will insatll TWRP for you super easy but you need to be rooted.

  • Dan

    Thank you very much! IT WORKS!

  • JAke

    i get an error saying “INPUT FILE NOT A LOKI IMAGE”
    can someone please help[ me out??

  • Moruanyi Ntsimane

    my loki flash is far different from yours, i dont have a “loki_flash” file

  • Tony Kamuhu

    i have no loki_flash

  • Jodes

    It seemed to go according to plan until I typed “su[enter]”. After typing “adb shell[enter]”, I got the prompt “shell@g2:/ $”. But after that, each line I typed got echo’d but for example, typing “exit[enter]” twice and “adb reboot recovery[enter]” resulted in nothing happening except the lines being echo’d back.

    • You need to wait for the su prompt to appear on your device and click allow after typing su and hitting enter. You should have a # not a $ when you start typing everything after that. Good luck!

      • helpmepls

        i’m having the same problem, except there is no prompt on the device. i just get the error “/system/bin/sh: su: not found” on the pc. do you know what is wrong?

  • kaiser

    Great Tutorial it works for me. Thank you 🙂

  • trying my best

    HELP!! when i get to the step where you type ./loki_tool flash ect i press enter and it displays: [-] input file is not a loki image .. what do i do now? please help.

  • Hannes Holmquist

    I’ve spent three days now trying to activate xposedinstaller unsuccesfully on my LG-D280
    My version seems to not be available anywhere
    I know the root has been successful because when I try to re-do the process I get a message saying it’s done already
    Yet xposed installer claims it fails to get root access
    ‘Makesure you device is rooted properly and you have not blocked shell commands’

    I’ve installed software after software that is supposed to help this
    Busybox,busyboxinstaller, app ops, superuser, SU update fixer and freegee
    and my phone is STILL not letting me install xposed framework
    Help me please someone

    • Download root checker from the play store and use it to confirm you have root access. If it says yes and Xposed says no, then you need to check with the developers of Xposed.

  • Przemysław

    After commend “su” I have information: “not found su”, some ideas?

    • You must be rooted before you begin -http://theunlockr.com/2013/10/25/root-lg-g2-versions-video/

      • Przemysław

        I have root :/

        • Then you’re not in the right directory or missed a line in the command prompt. Good luck!

  • jo

    downloaded loki master but when i extract i get a loki tool not flash. what do i do/?

    • It is supposed to be loki tool. Check the rest of the written procedure and just continue as normal.

      • jullion

        its not working,,,, my cell don,t accept thi file

  • Trond Lønnevik

    Damn, I can’t get past the first command.
    “adb is not recognized as an internal or external command, operable program or batch file.”

  • sulemN

    did’t work on my g2 f320k :((…..

  • sulemN

    open root.bat file … and then suddenly crash .. when i press any key to continue

  • F. S.

    All versions, except D805!
    Says the aboot is not compatible with device model name.

  • okraM

    When i unzip folder called openrecovery-twrp… i only get recovery but not recovery.img! What should I do to get that? I was following this video, but my computer does that by its self. Please help!

  • scopiegee

    I see your notes that you updated the command lines using loki-tool, but loki_tool in the command lines doesn’t work. Maybe now your instructions need updating?

    • Can you post a screenshot here of the error etc?

  • Kashif Shah

    When i type this command( adb push recovery.img /data/local/tmp/recovery.img) I have followed all instructions but I get this error >>>>>>>>cannot stat ,recovery.img. :No such file or directory..

    • You need to make sure the recovery file is 1. Name recovery.img and not recovery.img.img as that happens by mistake sometimes and 2. it needs to be in the ioroot folder.
      One of these two things is wrong 🙂