[Guide] Fixing the "Wrong PIN" error after decrypting a Nougat ROM in Mido - Xiaomi Redmi Note 4 Guides, News, & Discussion

I think the title says it all, but if you ever set up your newly installed custom ROM only to find hours later that your phone is encrypted!!!
Now you went ahead and wiped your entire internal storage and successfully decrypted your phone. Your phone boots up and asks to enter your PIN. You proceeds to enter you PIN but you get a "Wrong PIN" error.
Now, this is an extremely frustuating error, but fixing is extremely easy if you have TWRP installed.
Follow the below steps to fix the error:
Go to TWRP ==> Advanced ==> File Manager
Navigate to /data/system folder
Delete the *.key files (There must be two of them)
Delete locksettings.db , locksettings.db-shm and locksettings.db-wal
After that, reboot the phone and the lockscreen wont ask for PIN. Congrats!
Your phone is unlocked and if you want, you can set new PIN normally.

Works perfect on Mi 6 !!!!!!
Thanks a lot!

Didn't fix it on my P600

Related

TWRP decryption on Pixel C is working now -> TWRP_dragon_3.0.2-0_v15

UPDATE:
Version v15 seems to work now .. also on N preview now
Update.ZIP_TWRP_dragon_3.0.2-0_v15.zip (to be installed via TWRP)
TWRP_dragon_3.0.2-0_v15.img (to be installed via fastboot)
Download: https://onedrive.live.com/redir?res...17&authkey=!ACPxBsf1QD-Fr0M&ithint=folder,zip
Please test with encrypted data partition.
Big thanks to @NYCHitman1 for his help !
As well .. Thanks to all the encrypted Pixel C owners helping testing !
Thanks
DELETED
Tested version, bit still encypted Storage is not recongnized: Internal Storage 0MB!
RolfFrie said:
Tested version, bit still encypted Storage is not recongnized: Internal Storage 0MB!
Click to expand...
Click to collapse
Thanks for your test and feedback !
Not recognizing encrypted partition here either (NPD35K)
zezayer said:
Not recognizing encrypted partition here either (NPD35K)
Click to expand...
Click to collapse
Yep .. Thanks.
It's not working ... yet.
Not sure by when and by whom it will be implemented.
Will update the first page accordingly ..
EDIT:
You engage me for a new try ..
RolfFrie said:
Tested version, bit still encypted Storage is not recongnized: Internal Storage 0MB!
Click to expand...
Click to collapse
Maybe another test ?
TWRP_dragon_3.0.2-0_v7.img
Pls try the following command in TWRP terminal .. "twrp decrypt yourpassword"
Thanks
followmsi said:
Maybe another test ?
TWRP_dragon_3.0.2-0_v7.img
Pls try the following command in TWRP terminal .. "twrp decrypt yourpassword"
Thanks
Click to expand...
Click to collapse
Failed to decrypt data.
Testing of v7:
TWRP brings up the decrypt screen on booting, asking for a password to be entered.
Unfortunately I get a "Password Failed, please try again!" on entering my password (4 digit PIN)
"Failed to decrypt data " error when attempting via command line.
This appears to be closer than the previous boots, it recognizes the encrypted partition. I will try again with a password rather than pin
Still having the bootloops when booting into TWRP forum.xda-developers.com/pixel-c/help/twrp-bootloops-t3389438
Thanks for testing .. Seen somewhere you may need to enter password twice.. Just as test, try stock kernel for bootloop issue. Thanks
followmsi said:
Maybe another test ?
TWRP_dragon_3.0.2-0_v7.img
Pls try the following command in TWRP terminal .. "twrp decrypt yourpassword"
Thanks
Click to expand...
Click to collapse
twrp now asks for decryption password. But always returns "passwoord failed"
I tried it three ways with the same result "Failed to decrypt data":
At start of twrp
via mount and decrypt
Last version I think there was no decrypt button and there was a check box for data partition. This could not be checked.
Now there is the decrypt button but the data partion is missing. Klciking the button the result is as mentioned above.
via terminal
So we are getting further ...
RoFrie said:
twrp now asks for decryption password. But always returns "passwoord failed"
I tried it three ways with the same result "Failed to decrypt data":
At start of twrp
via mount and decrypt
Last version I think there was no decrypt button and there was a check box for data partition. This could not be checked.
Now there is the decrypt button but the data partion is missing. Klciking the button the result is as mentioned above.
via terminal
So we are getting further ...
Click to expand...
Click to collapse
Are you able to post the recovery.log of your steps ?
Maybe on pastebin.com ...
Thanks
followmsi said:
Are you able to post the recovery.log of your steps ?
Maybe on pastebin.com ...
Thanks
Click to expand...
Click to collapse
Thanks !
New version compiled today .. v8 ...
Code:
could not find any keystore module
Failed to init keymaster
Please mount /system partition before your start to decrypt via terminal ..
Is the recovery.log changing -> ... "could not open keymaster device in keystore .. "
Ot still "could not find kestore module" ?
Thanks for testing ..
NYChitman made also a new Version for encryption... pls test as well. .. http://forum.xda-developers.com/showthread.php?p=67138209
v10 is my last try on encryption .. makes a copy of the current dragon.keystore while starting up recovery.
This version has also a new kernel included and logcat for TWRP was compiled too.
And no bootloops while testing
Cheers
Still the usual loops on my device but only when I start from recovery. Strange thing. And it does not happen when stock recovery is installed. The funniest thing: If stock recovery is installed I can't open it if I want to. It's the red triangle droid. And if TWRP is flashed it opens if I don't want to Tried to flash the whole tablet back to start from scratch.At the moment impossible. Wiped, flashed, wiped and so on. I get the message (factory image): unable to truncate file... File too large failed to extract system.img I/o error. Installing from TWRP works fine. Tried to close and open bootloader: Not possible without stock recovery. Aaargh. I found out: There were some guys having this issue on Nexus devices who re-installed all drivers and software on their PC to solve the problem or used a different PC. That's my next step next Friday. I'm going to get everything on this stupid son of a... on this tablet working, I swear. Now, dear Pixel C, it's something personal Don't mess with an angry social worker!
GonzoKSV said:
Still the usual loops on my device but only when I start from recovery. Strange thing. And it does not happen when stock recovery is installed. The funniest thing: If stock recovery is installed I can't open it if I want to. It's the red triangle droid. And if TWRP is flashed it opens if I don't want to Tried to flash the whole tablet back to start from scratch.At the moment impossible. Wiped, flashed, wiped and so on. I get the message (factory image): unable to truncate file... File too large failed to extract system.img I/o error. Installing from TWRP works fine. Tried to close and open bootloader: Not possible without stock recovery. Aaargh. I found out: There were some guys having this issue on Nexus devices who re-installed all drivers and software on their PC to solve the problem or used a different PC. That's my next step next Friday. I'm going to get everything on this stupid son of a... on this tablet working, I swear. Now, dear Pixel C, it's something personal Don't mess with an angry social worker!
Click to expand...
Click to collapse
Did you found a solution ?
to "close/open" bootloader you need "full" stock !
Afterwards you can flash TWRP via fastboot again.
Maybe it solves your issue.
again one missing flag .. in fstab -> the very last try on encryption
Update.ZIP_TWRP_dragon_3.0.2-0_v11.zip
TWRP_dragon_3.0.2-0_v11.img
Cheers
Hi followfsi,
I tried your last build without encryption and it seems that in this build adbd doesn't accept the connexion anymore
"error: device unauthorized. Please check the confirmation dialog on your device."
That was working in the 6.0 build
Samt434 said:
Hi followfsi,
I tried your last build without encryption and it seems that in this build adbd doesn't accept the connexion anymore
"error: device unauthorized. Please check the confirmation dialog on your device."
That was working in the 6.0 build
Click to expand...
Click to collapse
Thanks for the finding ... V12 arrived
Update.ZIP_TWRP_dragon_3.0.2-0_v12.zip
TWRP_dragon_3.0.2-0_v12.img
Pls check now .. should work again..
And decryption ?
Do you get a password prompt ?
Does it work ?
Cheers

{Guide} Return your OP3T to stock and lock Bootloader using ADB/Fastboot

Disclaimer: I have done these steps multiple times and haven't come across any issues, but before you continue please read this fully, and follow the steps completely. Any issues or damage to your phone that occurs while doing this I am not responsible.​
That being said below will be everything you need to make sure this all goes smoothly:
Windows or Linux Laptop/PC
Atleast 50% battery on OP3T
Usb Cable for OP3T
Internet Access
Patience
Now to Begin the process to return to stock:
Step 1: Go to http://downloads.oneplus.net/devices/oneplus-3t/ , and download the 4.0.2 version. Again these are the steps I do so that I can make sure the process is done correctly and also that I can get rid of the annoying dm-verity warning. Don't worry at the end of this you will have the latest version for you're device.
Step 2: Go to your phone and reboot to twrp, once in twrp go to wipe>Advance Wipe> Tick everything but usb otg (I do this to make sure my phone starts out in a completely clean state>then swipe to wipe. Once it's finished press back twice to get back to the main screen for twrp.
Step 3: Please reboot device back to twrp. (I found the best way to do this without issues is on the main screen for twrp go to reboot>power off>when the unlocked bootloader warning comes on click the volume up button quickly>use the volume down button when another menu comes on and go to recovery. Again I did it this way because the with twrp version 3.0.4-1 gave me issues when trying to reboot twrp within twrp. Also you will get an No OS installed this is normal as you wiped the system completely. Don't worry just reboot back to twrp.)
Step 4: Once back to twrp you will get the screen where is says to allow modification. Please swipe to allow. Next please connect phone to pc/laptop, and transfer the 4.0.2 you downloaded to your phone. One completed go back to phone and click install and click on the file you just transferred and swipe to install. Once completed reboot device. (Warning: at this time you will get the Dm-verity warning, but dont be alarmed we will take care of that in the up-coming steps.
Step 5: Once the phone reboots and comes to the setup screen don't go through and add your accounts because we will be doing another reset. Quickly get to the home screen of your phone and go to settings>about phone>tap build number 7-10 times>back once>developer options>make sure oem unlocking is ticked, advance reboot is ticked, and usb debugging is ticked(If none of them are please tick them). Since your phone is connected to the pc/laptop after you turn on usb debugging a allow authorization box will show on your phone. Please allow that for this to work.
Step 6: Next go to this link: http://downloads.oneplus.net/oneplus-3t/oneplus_3t_oxygenos_4.0.3/ , and go all the way to the bottom where it says download Oxygen Recovery (optional), and download that file, and place it on desktop.
Step 7: Now this is assuming you have adb/fastboot setup on you're pc/laptop. Please open up a Command prompt window with phone connected and type these commands in:
1) adb devices ( this will show your device ID Number). If it shows it please continue, if not there is an issue with adb/fastboot set up on your computer, or you typed that command in wrong. Once u get the issue resolved try the command again.​
2) adb reboot bootloader (this will reboot your device to bootloader mode)​
3) fastboot devices ( again this will show your device ID number as from before)​
4) fastboot flash recovery [click and drag the recovery file you downloaded from oneplus website and saved to the desktop here, press enter, and once completed go to your phone and use either the volume up or down button till u see the word Start in green and then press the power button. This will reboot your device, and again you will still have the dm-verity warning on. We are almost done.​
Step 8: Once your device is rebooted we need to get rid of all traces of twrp so go to your computer>file explorer>this PC tab>your device should be listed there since its still connected to pc> internal storage>locate twrp folder and delete. Now after you are done with this and you want to lock bootloader go to step 9, but if u don't want to relock the bootloader please just factory reset device, setup your device and then go back to oneplus.net and download the 4.03 version and adb sideload it, and dm verity is gone.
Step 9 Relocking bootloader is easy, and will reset your device. While on your phone go to settings>about phone>tap build number 7-10 times>back once>developer options> make sure that OEM unlocking is ticked, advance reboot is ticked, and usb debugging is ticked (again u may get the allow authorization pop up on your phone please allow). Go to command prompt for adb/fastboot and type in these commands:
1) adb devices ( this will show your device ID Number). If it shows it please continue, if not there is an issue with adb/fastboot set up on you're computer, or you typed that command in wrong. Once u get the issue resolved try the command again.​
2) adb reboot bootloader (this will reboot your device to bootloader mode)​
3) fastboot devices ( again this will show you're device ID number as from before)​
4) fastboot oem lock; once you click enter go to your phone, and use your volume up or down buttons to click on lock bootloader. Let finish. This will reset your device again. Once this is all completed and reboot you have gotten rid of all the warning screens, and your device is like it was when you first got it. Set up device with your accounts and you will get a notification of a update. Download and install.​
Congrats your phone is back to stock. If anyone has questions please pm me.
Again these steps are longer than what most of you may do. A few others including myself have done this multiple times to confirm. None of us had issues. It works
**Special Thanks**
The guys that tested this with me to confirm my steps are accurate
Google for well google
Oneplus for yet another awesome device and software.
***UPDATE***
Thanks to @ashokmor007 he made the video below on the steps.
https://www.youtube.com/shared?ci=xDFI-287K-Q
If there is anything else that someone may want a guide on how to do and there isn't one currently on xda. let me know and i can get a guide out. We are currently figuring out if this will work on the oneplus 3.
Very helpful tutorial
if anyone here has tried this please comment, and if u need help please pm me.
the_rooter said:
Thanks to @ashokmor007 he made the video below on the steps.
https://www.youtube.com/shared?ci=xDFI-287K-Q
Click to expand...
Click to collapse
If possible add to the main thread
ashokmor007 said:
If possible add to the main thread
Click to expand...
Click to collapse
done and finished thanks again for the video
TWRP - Mount Decrypt Data?
Good afternoon, the_rooter... Thanks for posting this. I'm trying to get back to stock and found this. I'll explain from the beginning...
My 3T will not boot now. Stuck on “Powered by Android” Screen. Here’s the sequence of events that led to this:
1. Flashed TWRP 3.1.0-1
2. Did a backup of phone (Orig OS… Just got phone a few days ago)
2. Flashed Sultan’s ROM
3. Installed Xposed.
At this point… Everything was working just fine… This morning I decided to install the Xprivacy Module and then I rebooted phone. When I did that, the phone just hung at the “blue android” start screen. I then did the following:
1. Held power button until shutdown
1. It took a while, but I was finally able to boot into TWRP.
2. Did a Wipe – The regular one
3. Restored my backup and rebooted. (Would not boot into the OS)
This is where I think I screwed it up even further… … Here’s what I did… I grabbed a shotgun and… LOL… No… but I was thinkin’ it… LOL… I did this:
1. Booted into TWRP
2. Did the Advanced Wipe and just wiped Everything(Internal Storage as well) except USB OTG
Also getting "Mount Decrypt Data" message when I boot to TWRP... Not sure why that's happening...
Now I can’t copy any files to the phone… Tried with Linux(Ubuntu) and a Windows system... Before all of this I could copy to the phone just fine. I tried disabling MTP in TWRP but that didn't work either. So I'm stuck on copying things to the phone at this point...
Can you set me straight?
Edit: Crisis over... Was able to load ADB drivers on a Windows Box and copy ROM back to phone... I'm back and smiling again.
Just use these tutorial for return 100% stock,it worked very good but the last dm verity message only dissappeard for me after step 9 updating to last 7.1.1 using adb sideload.
Thank You very much!!!!!
Is there a reason why you have to swipe to allow modifications? Can't you just keep TWRP read only and then the stock recovery will automatically be flashed so you don't have to do it manually? Also there will be no dm-verity warning.
Thanks for this guide, it worked great.
When you flash the downloaded 4.0.3, the ota of 4.1.0 will fail because somehow a partial ota is for some reason not possible. Anyway this is no problem because the phone will perform an automatic retry and downloads the full ota which worked for me and let the dm-verity warning disappear. I imagine future partial otas will work.
Therefore I think it is important to start with a version that is not the newest version (but e.g. with newest version - 1) or otherwise use some other way to get rid of the dm-verity warning.
Took the 4.0.3 update OTA but other than that followed exactly. Worked beautifully!
I didn't relock bootloader.
I also removed the default encryption.
I've followed all the steps, but dm-verity warning is still showing. I'm still on OOS 4.0.2 though. Someone with simmilar experience? How to get rid of that dm-verity warning?
Edit:
Manually upgraded to OOS 4.0.3 and dm-verity warning gone! Not sure why I was not receiving OTA update though.
What about returning to stock for 4.1.1??
I was coming from the beta channel, and after the initial wipe I was unable to boot into either recovery or the software. I had to reflash TWRP, and then I was able to install 4.02.
After unlocking, I was still getting the dm verity warning. The software attempted an OTA, but it failed. After this it downloaded the complete 4.1.3 via OTA, which worked and got rid of the dm verity warning.
Thanks for the guide!
Followed Tutorial 100% :/, Didn't get any error doing Flashing, Worked perfectly but still the DM-Verity warning.
That official TWRP 3.x is prone to cause dm-verify error and due to that I even has many files in /data lost! Better use TWRP 3.1 bluspark version. Though it's Unofficial its work best.. I also upgraded from 3.0 to 3.1 TWRP without getting the dm-verify error back..
arvindgr said:
That official TWRP 3.x is prone to cause dm-verify error and due to that I even has many files in /data lost! Better use TWRP 3.1 bluspark version. Though it's Unofficial its work best.. I also upgraded from 3.0 to 3.1 TWRP without getting the dm-verify error back..
Click to expand...
Click to collapse
How can I upgrade to the 3.1 version?
To return it to stock I just
1.flash the oneplus's Oxygen Recovery
2. full wipe in Oxygen Recovery
3. ADB sideload 4.0.3
4. lock oem in fastboot
and all the warning would disappear and every return to stock
diego97yey said:
How can I upgrade to the 3.1 version?
Click to expand...
Click to collapse
Just flash latest TWRP from recovery by clicking Install Image file or flash from fastboot...
x10000 said:
To return it to stock I just
1.flash the oneplus's Oxygen Recovery
2. full wipe in Oxygen Recovery
3. ADB sideload 4.0.3
4. lock oem in fastboot
and all the warning would disappear and every return to stock
Click to expand...
Click to collapse
Thanks bro ,, working Fine :good::good:

PIN to boot TWRP ask for password - encrypted phone?

Need help with this one:
Flash the latest RR Rom yesterday, with the latest OpenGapps, all fine. In the setup I decide to put a PIN on start, so to boot the phone I need to enter a PIN. When reboot the phone a window come up and ask for the code but... theres no keyboard or way to insert the code to boot the phone.
Decide then to reflasg the rom, so reboot the phone to recovery and in TWRP a window come up and ask for a password. Insert the PIN to boot the phone but says that the password was invalid. Hit cancel and go to the recovery but I can't acess to any internal storage, when try to Wipe anything an error apear: unable to mount storage".
I think the phone is encrypted. To solved this a need to format userdata and I will be allright?
I cant use the phone now. Sorry for my english.
_Drifter_ said:
Need help with this one:
Flash the latest RR Rom yesterday, with the latest OpenGapps, all fine. In the setup I decide to put a PIN on start, so to boot the phone I need to enter a PIN. When reboot the phone a window come up and ask for the code but... theres no keyboard or way to insert the code to boot the phone.
Decide then to reflasg the rom, so reboot the phone to recovery and in TWRP a window come up and ask for a password. Insert the PIN to boot the phone but says that the password was invalid. Hit cancel and go to the recovery but I can't acess to any internal storage, when try to Wipe anything an error apear: unable to mount storage".
I think the phone is encrypted. To solved this a need to format userdata and I will be allright?
I cant use the phone now. Sorry for my english.
Click to expand...
Click to collapse
Yeah it would appear that your phone has encrypted your internal storage. If you can still boot into the ROM, try setting another PIN, password or pattern and also check in Settings > Security > Encryption to see if it is indeed encrypted. If you changed the lockscreen security, try booting into TWRP again and try out your new password.
Otherwise, yes you will need to format userdata to remove encryption and make sure the ROM does not have it set to encrypt by default. (I thought that RR doesn't do that).
Problem solved, format userdata and reflash the all rom.

TWRP encrypt password???

I wanted to flash a ROM, so I wiped system etc, then flashed a TWRP img and after I reboot to TWRP it asks me to enter a encrpytion password , but I haven't set any!!! please help
The password is your PIN/password on Android.
If you have a pattern, you can switch to a PIN or password to decrypt the storage on TWRP, or you can type the password in this order:
-1 2 3-
-4 5 6-
-7 8 9-
For example, if my pattern is a "L", I would type on TWRP: 14789
EvilHowl said:
The password is your PIN/password on Android.
If you have a pattern, you can switch to a PIN or password to decrypt the storage on TWRP, or you can type the password in this order:
-1 2 3-
-4 5 6-
-7 8 9-
For example, if my pattern is a "L", I would type on TWRP: 14789
Click to expand...
Click to collapse
I tried this without success but thanks for the help.
I fixed it by flashing fulmics ROM. I got some errors while flashing but it booted and my files are still there
Hi, i have the same problem, i've just unlocked bootloader, (forgot to remove screen lock pin+imprint), installed TWRP. and keeps ask about password. The partition is encrypted in recovery.
I've tried to erase userdata from fastboot, wipe data and format data from twrp.
Any help how can i get rid of the encryption?
Should i lock and unlock the bootloader again?
After i've unlocked the bootloader i didn't boot normally in android and wanted to install twrp.
i come from Nexus devices and it's way more easier there!
erasing partition from fastboot make it have no filesystem or whatsoever and twrp sees that as encrypted filesystem . just press cancel or skip button at twrp encryption screen and it should show up twrp main menu. from there format data partition with ext4 and reboot. at least that's how I solved the problem. I highly recommend doing backup of your data first like photos , music etc. before messing with anything

[WAS-LX2JC719B210] I need some guidance for returning to stock

Hi everyone,
I tried installing LineageOS and all I can see is a black screen. The phone vibrates a few times, then restarts, vibrates again a few times and then the system tells me that the data partition has serious problem and that I should format it....
I would be fine with any OS right now, as long as I can start using my phone again.
I do have a backup, except of the recovery and data partition. Starting TWRP with "fastboot boot twrp.img" gave me a "remote: command not allowed" or something similar. The phone was unlocked at that time.
Either way, If I rollback my backup the phone starts, no problem. But, I don't have a keyboard to access wifi or any accounts. Clicking on "set up as new" will throw me back to the same view (just like crashing).
My idea is to use dload to restore my system, but if there is any other way, please tell me.
I extracted the recovery.img and recovery2.img from the update.app and flashed them, but still no success.
Could someone please tell me exactly how I have to create the dload folder and or rename files?
Some talk about just renaming the zips, some just place the Update.app in the dload folder and some say that I have to create some sort of folder structure, which I don't really understand...
By the way, the only firmwares I could find are for "WAS-LX2JC900B180". (also with the firmwarefinder) Should be fine, I hope?
I'd be very glad if there was any solution. Just being able to use my phone again would be very helpful.
Any suggestions?
All the trouble got mysteriously fixed when I installed SuperSUv2.82-EMUI5-dm-verity-Permissive.zip.
Now my Stock is working again.

Categories

Resources