How To Install CWM Recovery on AT&T or Verizon Galaxy S4! [SGH-i337/SCH-i545]

Download this video for viewing in HD on your smartphone or computer.
Click Here to Download High-Quality HD video to your Smartphone or Computer.

This video was brought to you by Click Here to See at

There’s some great news for AT&T or Verizon Galaxy S4 users, bootloader is not unlocked BUT we have LOKI method by XDA user DJrbliss that allows developers to bypass bootloader check to enable custom recoveries and custom ROMs.

So, now you can install CWM recovery for AT&T or Verizon Galaxy S4.

Before we begin, you will need a rooted Galaxy S4.  For AT&T, see Motochopper root method and for Verizon, see Verizon root method.

NOTE: This method does NOT WORK on users on latest AT&T Galaxy S4 with MF3 firmware until we find a new method for it, sorry!

Step 1.  Download the two files onto your phone.

Download loki_flash

Download recovery.lok for your Galaxy S4

Use ES File explorer and browse to your Download folder, rename loki_flash.bin to loki_flash.


Step 2. Copy both loki_flash and recovery_lok.


Step 3. Paste the two files into /data/local/tmp directory.  (You might have to enable Root in ES File Explorer!)


Step 4. Download and open Android Terminal Emulator app from Play Store.


Step 5. Type:


Make sure you hit “Allow” or “Grant” if Superuser permission window pops up.

Then type:

cd /data/local/tmp

chmod 755 *

./lok_flash recovery recovery.lok

If you get successfull message, you can type the following to reboot into recovery:

What is a Custom ROM?

A custom ROM is a custom, modified operating system that you can install on your Android device. Basically it's like installing Windows OS on a Macbook. By installing a custom ROM, you can bypass stock factory settings like locked hotspot tether, install new Android versions early, or even convert your phone into another OS.

With a custom ROM, you can really maximize the capabilities of your smartphone by adding custom features that have been developed by open source developers.

How to Install Custom ROMs

First, you will need to root your device, if it is not rooted yet, follow our root tutorial and root your phone.

Once rooted, you should have TWRP installed on your phone. Installation of a custom ROM is easy if you learn the basic of it. If you don't know how to install custom ROMs using TWRP recovery, see our tutorial on How to Install Custom ROM using TWRP!

You may also like...

157 Responses

  1. Vien Cervantes says:

    Does this work on I9505?

  2. Kyle says:

    When I type the ./lok_flash recovery recovery.lok i get can’t execute. permission denied… any ideas?

  3. Kyle says:

    It even did it though when I spelled it correctly. I just used Motochopper and the install TWRP through Goo manager method.

  4. wesley says:

    how do you expect us to root our AT&T galaxy s4 if you do provide a CWM in .tar format all i have sen are the .lok and when i look at that guide it tells me to use the CWM guide but when i go to download the recovery it says use the LOKI guide so its the never ending loop of neither guides work

  5. Kyle says:

    @Wesley just use the TWRP method. Root with Motochopper and install TWRP recovery through Goo Manager.

  6. Mark says:

    when i tap on the data folder it just says the folder is empty so i cant continue :/

  7. Todd says:

    I installed this without any problems on top of TWRP. However, I would like to go back to TWRP and the original method of install for TWRP didn’t work when i tried to change it back. Does anyone have the same problem?

  8. Carlos says:

    I had done the motochopper method and had twrp once i did this i now have CWM. My question is can is switch between both recoveries or one i installed CWM did that delete my twrp?

  9. John says:

    This worked great thanks to everyone who worked on it! One question, which ROMS does this work with (AT&T model)?

  10. luckybun says:

    worked great for me on ATT S4, but when I go backup on external sdcard, it said can’t find the path for backup, what should I have to do? thanks…

  11. Curtis says:


    I have a major problem and need your help, I have an ATT Galaxy S4.

    I rooted my phone through motochopper.

    I followed your instructions and installed CWM recovery on my phone… everything worked until I tried to back it up and a message saying “Error while making a backup image of /data!”

    So after that I went ahead and rebooted the phone…until I found out that the phone was stuck at the ATT boot screen and didn’t advance at all.

    I tried to restore what I had but there was a checking MD5 mismatch and I ended up wiping my data/ factory reset.

    The phone had reset but as I went through the set-up wizard… the phone said there was an problem with the “Settings”… and now I’m stuck.

    Please help, I don’t mind resetting my phone completely and installing everything back myself, but I can’t even get past the set up. Your help is greatly appreciated!

  12. George says:

    In ES File Explorer there is nothing in the data folder when I look to put the recovery.lok and loki_flash files in there. I used Root Explorer and I was in fact able to get into the aforementioned data/local/tmp and I put the files in there. Followed instructions with terminal emulator however this message pops up “unable to chmod recover: no such file or directory. I have tried putting the files in different folders changing the the folder location via cd folder/location/whatever and I still get the same message. I also click root explorer in the options in ES File Explorer and it says superuser rights are given. Please help.

  13. Joergen Ask says:

    Hi ! After ive sucsessfully booted into cwm … i rebooted the phone and switched it off again to turn it back on in cwm mode … but now its just showing odin mode. .. do i have to do the reboot recovery command everytime i want to go into cwm recovery ?

  14. sameer somu says:

    Hi, i recently installed loki and twrp on my att i337 s4. i was wondering if i can perform this method to get CWM or do i need to remove twrp? thanks

  15. Luke says:

    Is there a particular reason the s4 thinks the internal memory is the sdcard? has anyone noticed this?

    • Adi Inbar says:

      That’s because the internal storage *is* an SD card. The path “/sdcard” refers to the internal SD card. The path to the external SD card, if there is one, is “/storage/extSdCard”.

  16. luis says:

    Changed 755 to 766

    chmod 766 *

    // then press enter and type below and enter again……

    ./lok_flash recovery recovery.lok

  17. Damon2nomaD says:

    After I type ./lok_flash recovery recovery.lok
    it tells me not found even I was able to complete the steps before.

    • Ryan says:

      Yea I had the same problem with not being able to chmod 755 * (“no such file or directory found”) and also when trying to do the loki_flash recovery recovery.lok step it says “./loki_flash: not found”.

      I got around the chmod 755 * issue by typing chmod 755 /data/local/tmp but haven’t been able to resolve the second issue…. could it have something to do with the fact that I created the local and tmp directories in the data folder when I originally started this process because I didn’t see them in ES File Explorer?

  18. Aimee says:

    I get to the point where I am almost done and after typing in
    ./loki_flash recovery recovery.lok

    I get the error “input file is not a valid Loki image”

    I am at a loss! I followed everrrrryyyything.

  19. Chrys says:

    I just tried this after watching the video and got a return command that says “Loki aboot version does not match device.” I have tried it start to finish a couple times with the same error.

    I did grab the correct Verizion files too from your website… Any thoughts?

    • Max Lee says:

      I am looking into it.

      • Chrys says:

        Thanks Max. Looking forward to your reply!

        • mekelly00 says:

          Max any update on this “Loki aboot version does not match device” error ?

          • Chrys says:

            mekellly00, did you get this error as well? I have tried many times hoping that it would work one time. Even deleted the files and re-downloaded them a few times. No luck.
            I’m hoping Max can find a fix. I have a couple mods that I want to install.

            • Paul says:

              I am getting this error as well. Looking forward to a resolution.

              Galaxy S4 Verizon VRUAME7 (Encrypted)

            • mekelly00 says:

              Yeah I got the same error and actually ended up soft bricking my phone. lucky for my i was able to download an official ME7 Stock firmware and flashed it with ODIN. Not going to root again until we get this bootloader UNLOCKED. i love big red and the reliability of their network, but damn i wish they would let us do what we want with our own devices.

      • A.J. Dixon says:


        Any update on the “Loki aboot version does not match device” error? I have a Verizon GS4 with build number VRUAME7.


  20. Tony says:

    I’ve got the ME7 update on my S4. I’m stuck in download mode after booting into recovery from TWRP. Any ideas how to get out of that?

  21. Logen says:

    Has anyone figured out the “Loki aboot version does not match device” problem yet? I keep getting the same message… 🙁

  22. yl says:

    The loki method worked for me and I was able to install CWM recovery on my i337 S4. Then switched back to stock touchwiz ROM and it got updated to MF3. I was able to root again but now when I try to install CWM recovery using the loki method I get “Loki aboot version does not match device” error like other.

    In short, it seems like the latest update has broke loki method for installing CWM recovery.

  23. ka7qqv says:

    Has anyone figured out the “Loki aboot version does not match device”
    problem yet? I keep getting the same message… 🙁

    so sad build jdq39.i545vruame7 sch i545

  24. ben says:

    I am getting “Loki aboot versoin does not match device” as well. I am hoping this will get fixed soon. Verizon schi545 with vruame7

  25. Yim says:

    I got the “Loki aboot version does not match device” also on vruame7. I attempted to use Goo manager to flash TWRP and that was a mistake! Now waiting for either TWRP or CWM update as I am currently without a functioning recovery.

    • MaryBeth says:

      I am in the same boat. My phone is currently stuck in Odin mode from when I tried to load recovery software. Everything say that you can’t do it but the previous one that said you could sent me to this one. Can you please adjust above where it says ATT and maybe put it in bold. Whenever the recovery comes out, you could be the first to feature it. There seem to be a lot of people waiting for it.

      • MastaSe7en says:

        Hey mary, i had the same issue happen as you, what you have to do is download the Stock ODIN .tar file (google it) depending on what version you were on, for example im on MK2 on my i337, open the tar.md5 file with winrar and extract the recovery.img and download a tool to convert .img to .tar file (again google) and then put your phone in download mode which its probably already in and then flash that recovery file, and your phone will boot up like normal

  26. Z-man says:

    I just picked up my Verizon S4 and it is running vruame7, I’m also getting the Loki aboot version does not match device error.

    • Jdog says:

      This method will not work on the me7 build. If your phone is running this build then you will have to wait until the bootloader becomes unlockable to install custom recovery.

  27. ricardo says:

    Will this work on the At&t Mf3 ?

  28. mattj says:

    Yes it seems if this dont work ……..DO NOT USE Goo Manager to get twrp
    when I did, I lost my recovery I cant even get back stock recovery if anybody
    got any idea let me no lol… But I would like to thank everybody out there for
    all your hard work try to fig this out !! !!

    • ChrisC says:

      yah goomanager and twrp install messed up mine as well, was stuck on download mode with an error “unable to normal boot”. had to do a hard reboot using the vol/home and power key. when it vibrates, remove you finger from the pwr key keeping it on the vols and home key.. should get you in.. took me a couple of tries to get it right.

  29. ChrisC says:

    Seeing this error as others are , “Loki aboot version does not match device error” saw Max was looking into it ,any fixes yet?

    thanks in advance.

  30. g1ova991 says:

    I just rooted with Motochopper and downloaded ROM Manager from the Google Play store. It was pretty straight forward. I already backed up my current ROM, everything went well except I got an error towards the end of my Data back up in /tmp, but it baked it up and rebooted. I can see the back up in my ROM ManagerI’m the process of dowloading some ROMs to flash. I’ll update. I hope this helps!

  31. Dbateman says:

    Does anyone know if there is any update with the “Loki aboot version does not match device” error? :-/

  32. melvin c. says:

    When I try the loki method it always tells me this recovery does not match you phone. I tried both the verizon one and the att and neither worked. I am on verizon me7, sch-i545. Then I tried the goo manager and it does work either. I am rooted, I used loki method to gain root. Can anyone help me.

  33. Max says:

    Same issue here: “Loki aboot version does not match device”

    Any resolution to this?

    Am on Verizon build ME7, ROOTED, SuperSU active

  34. sammy says:

    Nadaaaa… nadaaaaaa nothing……in i337 new firmware……question if put my cell in stock with odin osea downgrade ….ayuda help please

  35. Dennis says:

    I am getting the same message as everyone else… “Loki aboot version does not match device”. I have root and am looking to install customer recovery. Any help available yet, please?

  36. Jamie says:

    Hey Max,
    After doing my research I have found you to be the s4 expert! Have you found anything for installing custom recovery on i337 running MF3, I have been trying with ZERO success. PLEASE HELP!!!!

  37. Tasty says:

    Same “Loki aboot version does not match” on Verizon Galaxy S 4 i545 with ME7

  38. Keith says:

    Having the same trouble with my Verizon s4 vruame7… Help Please!!!

  39. Doug says:

    I’m confused on what the loki is actually for. I’m on the mdk and rooted with Motochopper. After that I installed rom manager and installed CWM recovery without a problem. Do I still need to use loki to get more features?

  40. Raj says:

    I have verison i545 vruame7 and it says wrong loki version help please

  41. hec143 says:

    Any fix for the unmatched for “loki version error” “loki aboot does not match device”??? any one please!!!

  42. Stephen says:

    So I can get all the way to the end and i get a message that the version does not match my device. I’m running SGH 545 verizon. Can someone help?

  43. hec143 says:

    So it’s very obvious that most of us have the same message when we are trying to flash the loki hack through the emulator. I just hope that Max can get this fix or get some answers soon. Thank you devs for all your hard work!!!

  44. Bill says:

    We’re at the month mark. I really hope a workaround can be found.
    Max any news for Verizon ME 7 users?

  45. Bill says:

    I’m getting Aboot does not match device.

  46. hec143 says:

    Yeah, that’s what’s everybody’s issue is…

  47. keith says:

    Any word on the vruame7 cwm recovery install?

  48. Nick says:

    I was able to get past the “does not match version” error by downloading the newest loki_flash from the official site. But then I typed “./loki_flash recovery recovery.lok” into the terminal emulator and got this error: “syntax error: ‘newline’ unexpected”

    Any help?

  49. Alex E says:

    Max Lee thank you for all your work and this awesome guide!

    Having some issue “aboot version does not match device”.

    Seems this problem only happens on the Verizon ME7, SCH-I545. (If that helps.) ((If you didn’t already know that lol.))

    I have not seen any updates to solve this yet we are eager. It seems.

    Any update?

  50. Spencer says:

    Works up to ./loki_flash recovery recovery.lok then i get loki abut version does match device when i downloaded the right file from above links

  51. cimbus says:

    I have a Samsung S4 Sch-i545 with build Vruame7; my understanding is that on this particular build their is no way possible to unlock the boot loader? I’ve rooted my phone but I want to flash back to the Mdk build it originally came with when I purchased it so I can then root, unlock the boot loader and then flash a custom ROM. Is this even possible? It is my understanding that once you update to the Vruame7 build via OTA you are basically stuck with it until somebody out there finds a way to unlock the boot loader on this particular build? I’ve also heard of some people complaining to Verizon and asking Verizon to put their phone with the Vruame7 build update back to the Mdk build and Verizon actually doing it; any truth to this? If so, how can I do this? I want to go back to the Mdk build because not only is it rootable but the boot loader can be unlocked to flash custom Roms.

  52. dazz1996 says:

    Ok everyone there is still no way to unlock the boot loader but if you go to XDA there is a safe strap method I’m running it now on my SGS4 on ME7 the rom I have installed is the GPI so go there.

  53. keith says:

    How does the safestrap work and is it step by step instruction? Im learning as I go!

    • dazz1996 says:

      Have a look at this link
      I was late to getting the VSGS4 and it came out of the box or maybe the lady at the Verizon store updated it to the ME7 update but now I’m running the GPE rom and I love this phone a lot more, it was hard to work with Samsungs anything because all I have been running for the past 2 years is CM10 I hope this helps you and everyone on this site and happy hacking.

  54. servo says:

    @dazz1996 Could you post a link to the safe strap method? I’m not finding it on XDA.

    And can we update THIS post to mention, at the very beginning, that it DOESN’T work with Verizon ME7??
    I read the first paragraph “There’s some great news for AT&T or Verizon Galaxy S4 users, bootloader is not unlocked BUT we have LOKI method by XDA user DJrbliss that allows developers to bypass bootloader check to enable custom recoveries and custom ROMs” and easily assumed we were talking specifically about ME7, since that’s the only bootloader that hasn’t been unlocked outright, AFAIK. Would’ve been great to know that this isn’t the case, before someone spends 1/2 hour following this great tutorial and ultimately just getting the “aboot version does not match device” error.

    There’s already a notice about it not working with AT&T MF3… just add “or Verizon ME7”.

  55. Colvinm57 says:

    I uses the safestrap method and was able to flash synergy rom to my phone. I have Verizon ME7. Here is the Link After you install it on your phone, Go to page 11 and there is a link that will take to the rooms that work with this recovery. You can only uses those roms or you will brick your phone. Also if you go to youtube and search safestrap for verizon GS4 it shows you how to use it. I plan on flashing the hyperdrive rom in the next couple of days. Make sure you read the whole post, there is an additional download that has has to be flashed after the roms are flashed, or the roms won’t work.

  56. xsellize says:

    Can someone help me for mf3 version flashing custom rom

  57. Matt says:


    I’ve been hunting all day as I just got my new S4 as part of last weekends upgrade with unlimited data intact, (finally laid my weary Gnex to rest). I just realized today how much I’m going to miss that rom friendly device…

    Here’s a tutorial on the safe strap method. It’s not exactly what we hope for, but better than nothing for now.

  58. Romeo says:

    As of right now, there is no CWM Recovery available for SGH-I377 UCAMF3 firmware.

  59. Tristan D. says:

    I too have the Verizon i545. Mine is the “aboot version does not match the device” problem. I will be downloading the files from the actual site and posting my findings on here.

  60. felipe says:

    after i hit enter im getting (loki abooit version does not match device))

    any ideas

  61. Brett says:

    After typing in ./loki_flash recovery recovery.lok it just says
    sh: ./loki_flash: not found
    using att sgh-i337 rooted with motochopper and I also tried chmod 755 * and chmod 766 *
    what do I need to do?

    • dazz1996 says:

      Please people can you all read all the comments before posting, This method will not work if you updated to the newest build. Go to XDA developers and start reading up on your device there. Good luck

  62. asukita says:

    I done everything but when i type ./loki_flash recovery recovery.lok tells me “bus error”, can someone help me?

  63. akihiko_51 says:

    hi,all I’m new here

    i hive samsung galaxy S4 i337, my phone is factory unlock. I’m on ATT carr, two days ago i was at 4.2.2 and rooted, and today my phone it updating itself.
    when was on 4.2.2 i was getting the same thing at boot “”the custom screen with the lock that was unlocked showed up”” but was working ok and rooted.
    after the update, i still get the same thing at boot. Now i can’t root my phone on 4.3 because of the security issue to keep blocking. anything i do.

    Please can someone explain how can I bypasses and rerooted phone, I tried all the method that is available to me but unable to rooted, security block.

    I appreciate the help.

  64. paul says:

    I am on Verizon Galaxy S4 i545 MJ7 rooted and i get the error “Loki aboot version does not match device”

  65. Dhs92 says:

    Getting “Loki aboot version doesn’t match device.”

  66. Craig says:

    I’m running MK2 on Verizon S4. Any way to get this working? Will it work the same as ME7 tutorial? Phone is already rooted.


  67. tutaj says:

    Hey I know this is off topic but I was wondering if you
    knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe
    you would have some experience with something like this. Please let me know if
    you run into anything. I truly enjoy reading your blog and I look
    forward to your new updates.

  68. DAVID_S says:


  69. opel sklep says:

    I have been surfing on-line greater than 3 hours nowadays, yet I never discovered any attention-grabbing
    article like yours. It is lovely value enough
    for me. Personally, if all website owners and bloggers made
    just right content as you did, the internet will likely
    be a lot more useful than ever before.

  70. bruce smith says:

    It’s obvious loki does not work for me7. Please stop trying it and use safestrap. Samsung has the keys to the locked bootloader and never opening it . You feel me people?!

  71. I like what you guys are up too. This kind of clever work and exposure!
    Keep up the awesome works guys I’ve you guys to my personal blogroll.

  72. Iran says:

    So, I have tried everything and still haven’t been able to install CWM. In my journey I have brick twice and recover. Bottom line I’m running AT&T SGH I337 on 4.2.2. I was able to root using Kingo app, however, no luck with recovery. I’ve tried ODIN, LOK, direct flash from CWM, and nothing. I’ll take any advise…

  73. Iran says:

    BTW, in case anyone bricks like (see link) it happen to me twice. Just make sure you give him a like. Also, I’m still open for recommendations to install CWM (SGH-I337 AT&T on 4.2.2).

  74. Troy says:

    Hi Max,

    Is there a bootloader unlock method for AT&T MF3 available?

  75. bruce smith says:

    Cannot unlock mf3. Samsung has the key and the bootloader will never be unlocked. Ya feel me dawg? Piece yo my bra fra anatha ma!!!

  76. Gunner says:

    Method does not work on my S4 Active i537 AT&T, I have my phone rooted, but can find NO way to to install CWM or TWRP using any meathod here on on XDA’s site.
    Tried to install loki from both my phones card and my ext card. It either says “is a directory can’t execute” or “is a directory” shows the directory address, and them says Killed. Terminal Emulator is running with permission from SU.
    I wanted to install the new CM11 4.4.3 ROM

  77. Maximiliano says:

    Does this method work on i337 with 4.4.2 towel-rooted? Anyone?

    • Roy Herman says:

      I have tried and tried and tried to no avail. Please post if you or anyone else successfully installs CWM using Loki or any other method on the Samsung S4 SGH-i337 with Android 4.4.2.

  78. The gems generally seem in your account in about 5

  79. Every weekend i used to pay a visit this web site, as i
    wish for enjoyment, for the reason that this this web site conations genuinely good funny information too.

  80. Javier says:

    I tried to install CWM recovery, my issue is that I can´t paste files in to the / Path, message displayed that I don’t have permission to do that.
    how can I resolve this?

  81. game says:

    If you want to improve your know-how just keep visiting
    this web page and be updated with the latest news posted here.

  82. m88 says:

    whoah this blog is excellent i really like studying
    your posts. Keep up the good work! You realize, lots of people are hunting around for this
    information, you can aid them greatly.

  83. u271D says:

    I have ATT I337 4.2.2 (yes old), I have CWM ( installed.
    Do I need Loki with the current version of CWM ( to install new rom?

  84. If ƴou cɑn’t make it to Electric Daisy Carnival, ɑdd EDCLive on Snapchat tο take a look at the occasion –
    reside – tɦrough ɑ collection οf Snaps!

  85. We’rе a group of volunteers and oρening a neѡ scheme in our community.
    Υour web site ƿrovided uѕ with valuable info to work ߋn. Υou hɑve done а
    formidable job аnd oսr ѡhole community will Ƅе grateful to yߋu.

  86. Alisia says:

    Wow, incredible weblog format! Hοw long have
    you Ƅeen blogging foг? yoս make running a blog look easy.
    Τhe entігe glance of your website іs great,
    as neatly as the cօntent!

  87. vishal says:

    currently in my phone run android 4.3. use safe trap for recovery.
    I want to install loki twrp recovery for flash custom kernel.
    if I downgrade to 4.2.2 then I will install twrp recovery using loki method?
    please reply

  88. chise says:

    there is no tmp folder in data on mine

  89. Erick says:

    Funciona para la version At&t rom stock Lollipop ? o tengo que tener otra

  90. monografia says:

    Thanks for another informative web site. Where else could I get that kind of info written in such
    an ideal way? I’ve a venture that I am simply now running
    on, and I have been on the look out for such info.

  91. Dawn says:

    Hey I have a schi545pp version. My build # is i545ppvruaoh7. So what do I do to make everything work

  92. Leif says:

    I just get an error every time:

    only position independent executables (PIE) are supported.

Leave a Reply

Your email address will not be published. Required fields are marked *