Decryption failed.

Search This thread

justin97530

Senior Member
May 18, 2015
74
12
Kaohsiung
I had changed my password today on my January patch Oreo device with Magisk installed, and it had encrypted my device. After the reboot, my device had gone into a bootloop, and now after flashing the stock system image, it shows "Decryption failed" stating that although my password was correct, the data was corrupted. However, it does not ask me for a password when booting, unlike TWRP, which allowed my to access my data after entering my PIN.

As this is my primary phone and a lot of data such as 2FA keys are stored on it, is there a possibility of recovering my system without erasing the data?
 

justin97530

Senior Member
May 18, 2015
74
12
Kaohsiung
Checking back in to say that I've managed to fix the phone with little to no loss of data.

For reference to those who might also have a similar problem, here's what I did:
1) Boot into TWRP.
2) Backed up data partition in TWRP, and copied backup to computer.
3) Backed up
Code:
/sdcard/
by copying every file manually to computer.
4) Ran
Code:
fastboot format userdata
. WARNING: THIS WILL DELETE YOUR DATA.
5) Boot into system, an "ERASING" screen should show for a second, then boot into system initial setup.
6) Reboot into TWRP.
7) Restore data partition backup.
8) Copy files back to
Code:
/sdcard/
.
9) Reboot into system.

Note: Phone did not accept my PIN, needed to remove password through TWRP like so:
1) Boot into TWRP.
2) Head to Advanced, then File Manager.
3) Go to
Code:
/data/system
4) Remove
Code:
gatekeeper.password.key
,
Code:
gatekeeper.pattern.key
,
Code:
locksettings.db
,
Code:
locksettings.db-shm
, and
Code:
locksettings.db-wal
.
5) Reboot back into system, everything should work as usual.

Also, I give up on formatting this..
 
Last edited:
  • Like
Reactions: kishd

MoulinSolankar

New member
Jun 3, 2018
2
0
decrption unsuccessful on mia1

I have an issue on my MiA1...my screen shows as" Decryption unsuccessful..The password you entered was correct but the data is corrupted."..please anyone help me out as i have my most imp documents inside and dont have any backup..please.!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Checking back in to say that I've managed to fix the phone with little to no loss of data.

    For reference to those who might also have a similar problem, here's what I did:
    1) Boot into TWRP.
    2) Backed up data partition in TWRP, and copied backup to computer.
    3) Backed up
    Code:
    /sdcard/
    by copying every file manually to computer.
    4) Ran
    Code:
    fastboot format userdata
    . WARNING: THIS WILL DELETE YOUR DATA.
    5) Boot into system, an "ERASING" screen should show for a second, then boot into system initial setup.
    6) Reboot into TWRP.
    7) Restore data partition backup.
    8) Copy files back to
    Code:
    /sdcard/
    .
    9) Reboot into system.

    Note: Phone did not accept my PIN, needed to remove password through TWRP like so:
    1) Boot into TWRP.
    2) Head to Advanced, then File Manager.
    3) Go to
    Code:
    /data/system
    4) Remove
    Code:
    gatekeeper.password.key
    ,
    Code:
    gatekeeper.pattern.key
    ,
    Code:
    locksettings.db
    ,
    Code:
    locksettings.db-shm
    , and
    Code:
    locksettings.db-wal
    .
    5) Reboot back into system, everything should work as usual.

    Also, I give up on formatting this..