How can I remove encryption from my Samsung Galaxy S4 and eliminate a boot loop?

Kasey R Clark March 14, 2015
Ads by Google

OK, so I installed the 4.4.4 version on my Samsung Galaxy S4, loved it and when released decided to upgrade to the 5.0 version of the same ROM (

While I was on 4.4.4, I encrypted the device and enabled ART runtime.

When Lollipop was released I did a factory wipe via TWRP (including system and data) and then flashed the 5.0 version. The flash was successful but when I reboot to system it still asks for the passkey to boot. I enter and it boot loops.

I have then went through recovery to several more wipes from the advanced options where it even states that “this will remove your encryption”. During that process I successfully removed the encryption PASSWORD (yes, only the password) so that now when I try to boot the device it asks for an encryption password but states that my password is incorrect.

I attempted to reflash the 4.4.4 version but get the same results – password WORKS again but boot loops. Reflashing the 4.4.4 version again after advanced wipe results in password failure instead of boot loop.

I used Titanium Backup to backup all of the system and user apps and installed the zip so that once it boots it was exactly as I left off. Also I have tried to restore from a backup with the same results.

All in all I think it has more to do with the ART runtime, and due to that there is NO Dalvik Cache to clear and I think the encryption is somewhere in Dalvik

  1. Kannon Y
    March 17, 2015 at 1:51 am

    I encountered this EXACT issue when I tried to flash a ROM on an Asus TF700T. The problem -- more or less -- was that encryption is not something devs had to deal with and so many custom recoveries do not deal with it properly. The issue is with TWRP (which is currently the best option for dealing with encryption). It should be resolvable.

    The mistake is that I did not unencrypt my phone prior to flashing the new ROM. When prompted to enter a password, my password didn't work. That's because I did an advanced wipe. Advanced wipe doesn't remove all traces of encryption EVEN THOUGH IT SAYS IT REMOVES ENCRYPTION!!!

    I went back and wiped each part of the device by itself. One of the wipes in this section solved the issue.

    So basically, you might need to wipe each partition (particularly data) independent of the other partitions. Don't use the all-in-one wipes.

    Lollipop -- as you've rightly mentioned -- dispenses with DALVIK. But wipe DALVIK should still show up under advanced options. If the partition is still there, you can wipe it. But you're absolutely right -- this really complicates things. Even so, I'm fairly sure that this is resolvable.

    Let me know if this helps. I'll do everything possible to get your device working again. Good luck!

  2. DalSan M
    March 14, 2015 at 9:53 pm

    The best suggestion is to search your issue on XDA. If you cannot find what you are looking for, post a new question on their forum as the developers there may be able to offer more options and better suggestions. The problem is that you didn't decrypt your device and remove the password before wiping and installing another ROM. I'm sure there are steps to perform in ADB can help, and the community at XDA should be able to shed more light on this topic.

  3. ha14
    March 14, 2015 at 10:55 am

    maybe to try Odin to flash a stock rom you will be what you had stored in SD storage, so be sure to back that up

    • Kasey R Clark
      March 14, 2015 at 1:41 pm

      That is a great suggestion! I have tried to use Odin to flash both the stock and stock with root versions of the original 4.4.2 ROM that my phone shipped with.
      No go on either. The only thing I can get to successfully flash through Odin is TWRP or CWM Recovery. Both flash perfectly and then the respective recovery works. But still can't flash any ROMs. Each time it fails.
      I even went as far as to : advanced wipe via TWRP, followed by flashing cwm via Odin. An advanced wipe via CWM. Reflashed TWRP and another advanced wipe. And then tried to flash the rom. No go.
      Tried the opposite too. CWM, wipe, TWRP, wipe, CWM, flash. Same results
      And still with the same password failure / boot loop results.

    • ha14
      March 14, 2015 at 2:19 pm

      okay, maybe the phone is bricked!!!!! Use Rom Manager in CM to reinstall CWM recovery, factory reset afterwards , Reinstall TWRP