encryption problem when downgrading - Omni Q&A

Hi,
I installed a recent nightly and everything is fine, however, when restoring my TWRP backup (CM10.2), my encryption password is no longer recognised and system won't boot.
The password is accepted by TWRP and also by restoring the OMNI password, but when I restore the CM10.2 image, the password is not accepted.
Has anything major changed in dm-crypt?
Thanks.

Yes, 4.4 changed the encryption algorithm to use scrypt. It was converted when you upgraded, so you won't be able to switch between without removing the encryption
Sent from my Nexus 5

Mevordel said:
Yes, 4.4 changed the encryption algorithm to use scrypt. It was converted when you upgraded, so you won't be able to switch between without removing the encryption
Click to expand...
Click to collapse
Thanks, I had to remove encryption, restore and encrypt it again.
Looks like I have to wait a while until all features are added into omnirom (quiet hours, battery percentage (!) etc).

Related

Encryption doesn't work?

One Plus Two (chinese version), oxygen os 2.0.2, twrp recovery & supersu.
If I try to encrypt the phone storage (settings -> security), accepting all the warning, the android robot appears a few seconds, then the phone reboots itself, but the device is not encrypted.
Any ideas?
Thanks!
I've tried also to do it in safe mode, but the same result, reboots and the device is not encrypted
I wiped the device and started from scratch and now it works
I think that it was my mistake because I was trying to encrypt it using PIN protection instead password... so maybe I didn't need to wipe it but...
Same problem on OneA2001
e-Minguez said:
I wiped the device and started from scratch and now it works
I think that it was my mistake because I was trying to encrypt it using PIN protection instead password... so maybe I didn't need to wipe it but...
Click to expand...
Click to collapse
Can anybody provide more details on this issue? Im having the exact same problem; Phone is 100% charged, Click encrypt and the phone briefly reboots but doesnt encrypt. Ive tried both PIN and Password as options but neither seems to work....
If you are using twrp I don't think it works. They don't support encryption on the OPT yet.
Sent from my ONE A2003 using Tapatalk
da_anton said:
If you are using twrp I don't think it works. They don't support encryption on the OPT yet.
Sent from my ONE A2003 using Tapatalk
Click to expand...
Click to collapse
Twrp cannot read your internal storage, but you can sideload otas, zips,...
Try a full wipe and encrypt it before starting to install apps... (it worked for me...)
if you encrypt while in OxyOS 2 you can keep the encryption and move forward with OxyOS 3 and onto other custom ROMs.
OS 3.1.0 | TWRP 3.0.2 - 2: encryption ?
Hello Team,
I have similar problem with encryption.
device configuration:
- Latest stock os 3.1.0
- TWRP 3.0.2-2
- root
- fully wiped
when I choise encrypt, phone reboots to bootanimation (spinig wheels) and do not go futher. Device left c.a 12h at this state and afer reboot no encryption.
As 3.1.0 is quite fresh compilation, there is not much at net about. Do you have any possibile solutions?
thnx
Encrypt for corporate e-mail and calendar access
Hi Guys, I have the same issue (Cannot encrypt my One Plus 2) , my settings:
Model - ONE A2011
OxygenOS - 3.5.8
Tried with pin and password, it justs reboots the device and doesn't encrypt.
I need the to encrypt in order to have access to corporate e-mail and calendar.
Thanks for the help.

TWRP Restore Problem with Fingerprint security

I have a nexus 6P running rooted stock rom and I wanted to try out a new rom. Before flashing the new rom, I made a nandroid backup via TWRP. Now, the rom that I was backing up had fingerprint security setup with backup passcode for unlocking the phone.
So I tried new rom and it didn't work (read-too many issues and too many crashes). Decided to revert back to my original setup. Went back into TWRP and restored the backup.
After booting the phone up, I can't log in to my phone anymore. As you know after every reboot, fingerprint sensor doesn't work unless you enter the backup passcode. So I am entering my passcode and its not accepted. I have tried entering passcode many times but to no avail. I know my passcode so possibility of me forgetting it is not valid.
Has anybody else seen or ran into this issue yet?
The step folks are missing is Prior to installing a backup you Must Change security to None before you even start a backup This clears password, pin and saved finger prints. I believe once security is changed it is safe to backup and then install backup. You will need to reenter Pin and Fingerprints.
Born<ICs said:
The step folks ...
... is changed it is safe to install backup.
Click to expand...
Click to collapse
You mean clear the security before making a backup ... right?
if not, how would I change security on a backup file of rom that had security enabled.
I have never used lock screen security before so never ran into this issue.
No, dig through this forum for tech details. But my understanding is anytime you make/install a backup or reflash rom or go back to stock you must reset you Security options in settings to None. You have security now, probably Fingerprints, and the required Lockscreen Pin.
If you try to install backup or Rom or whatever without doing so you get what you experienced. There is a path out of it if you read further.
Pin or Pattern on boot after restoring Nandroid
Born<ICs said:
No, dig through this forum for tech details. But my understanding is anytime you make/install a backup or reflash rom or go back to stock you must reset you Security options in settings to None. You have security now, probably Fingerprints, and the required Lockscreen Pin.
If you try to install backup or Rom or whatever without doing so you get what you experienced. There is a path out of it if you read further.
Click to expand...
Click to collapse
The interesting thing is, I intentionally chose to enter pattern/pin on rebooting. The strange (actually may not be strange .....but strange to me) thing is that even when I move on to different Roms, that initial choice is remembered and embedded since even after choosing not to require pin/pattern when rebooting, I get prompted. Also the pin/pattern works during recovery, it also works on the initial startup after restoring a backup but then fails after successful fingerprint use (it will actually say "wrong pin" or "wrong pattern") at the end of the booting process. The thing is, I have only used one pin and at other times one password ever with this device. Eventually I had to do a factory reset to solve this issue (thank goodness I was able to back up my internal storage to my computer in TWRP recovery mode).

Cannot encrypt Nexus 6P with Marshmallow 6.0.1 after TWRP root and Xposed

I recently bought a Nexus 6P and I just rooted it a few days ago. I have been reading about how it is less safe now that the bootloader is unlocked, so I figured I could encrypt my phone for more securities! I don't want ro re-lock since unlocking will wipe my data all over again.
So I went into Settings->Encrypt phone and started the encryption process. It first showed a green outline of an Android, then it started the boot animation. It stayed there for about half an hour and it was clearly not encrypting (not getting hot or anything) so I just rebooted (I have a backup, that's why I'm so bold ) and it just normally rebooted to a working phone with nothing encrypted. Tried it again, same result.
I'm running Marshmallow 6.0.1 MMB29M with TWRP, SuperSU (I'm pretty sure it's systemless) and Xposed. I'm not sure what kernel I flashed when I rooted (that is the boot.img, right?).
Is this a bug? Is it a feature? I would like to be able to encrypt my phone; does anyone have any ideas on how to achieve this, now that TWRP can decrypt stuff?
Thanks!
I have the same issue with a HTC One M8 running Marshmallow 6.0 and systemless root. I've had this phone encrypted in the past but that was with standard root. Seems like systemless root and something to do with the modification of the boot image has something to do with encryption breaking.
Glad I made a nandroid before starting also, just incase.
I got it to work
So I just flashed the latest 6.0.1 (MMB29P) system, boot, etc. partitions because of the January security update. I folllowed Heisenberg's guide, point 10. I then had to reflash TWRP and then install SuperSU and Xposed again, because they were gone.
What this did was re-encrypt the phone, but with the default password. This basically offers no protection, with the added benefit of processor overhead. Yay I noticed this because it said the phone is encrypted, in Settings->Security even though it did not ask for a password at boot-time or in TWRP.
What you need to do is to remove any security you set up (just set the lockscreen unlock to "None") and then re-add it. When the phone asks if you want it to require the password at startup, say yes. It will then change the encryption password to your custom one and voila, your phone is now encrypted and uses your password/pin/pattern/whatev.
tudy77 said:
What this did was re-encrypt the phone, but with the default password. This basically offers no protection, with the added benefit of processor overhead. Yay I noticed this because it said the phone is encrypted, in Settings->Security even though it did not ask for a password at boot-time or in TWRP.
Click to expand...
Click to collapse
Question, is the default password: "default_password" lowercase and all? Im on the same boat you were, about to do this just to get encryption back but i want to be 100% sure of the steps lol
Well that's what I read here, but I never actually typed it anywhere because, from what I understand, it gets completed automatically by TWRP or Android of it is the default one.
Sent from my Nexus 6P using Tapatalk
tudy77 said:
Well that's what I read here, but I never actually typed it anywhere because, from what I understand, it gets completed automatically by TWRP or Android of it is the default one.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
so i dont type anything just hit enter?
I was not prompted to type anything
Sent from my Nexus 6P using Tapatalk

Warning: TWRP Restore on 7.0 may not work as intended..

EDIT 10/30/2016:
From some of the replies on this thread, I have reached the conclusion that this is not a widespread problem (duh.)
However, if you are locked out of your Nexus after a restore, I have found that the best solution was given by @toknitup420
Best Solution:
In TWRP (or ADB whatever you prefer) go into Advanced --> File Manager and navigate to /data/system/.
Locate locksettings.db and rename/delete it.
Reboot, unlock device, go to Settings --> Security and set a new screen lock passcode. The best part about this solution is that your previously registered fingerprints still work (mine did.)
Some suggested updating TWRP to the latest unofficial 3.0.2-3.
Flashing this version and restoring using it did not fix the issue for me personally, but if you would like to try then here is the link I found searching XDA.
**************************************************
OP:
Disclaimer: I am an XDA n00b, I've frequented these forums for a long while now, but I have never made an account and actually posted until now.
Also, I am using build NRD90U on my Nexus 6p
Not sure if anyone else has had these issues, but last night I had problems restoring from a nandroid backup on TWRP.
First issue:
TWRP would not restore System + Vendor + Data all in one operation. During the Data portion of the restore, it threw an error and cancelled the operation (for the life of me I wish I wrote it down, it was 3am and I just wanted to sleep.)
The Fix: I had to first restore System + Vendor, then reboot back into TWRP. Upon rebooting, TWRP prompts to allow modification of system. I accepted (by swiping) and proceeded to restore ONLY the Data from the nandroid backup.
Second issue:
Upon booting into my fully restored phone, I got locked out of the lockscreen. My pattern would not work, and no matter how many times I tried, I could not get to the "Forgot Pattern?" prompt so that I could change my password. Great.
The Fix: No option but to factory restore. I just booted into fastboot, followed Heisenberg's Flash Guide for the Nexus 6p Step 9 to flash everything except for my Internal Storage partition. Booted into a fresh version of android Nougat, and restored from a Titanium Backup.
I haven't seen any information or talk of turning off the passcode before backing up android in TWRP, but I suspect you should do this to avoid a fully restored system that you are locked out of . (Note: I am not talking about the passcode to boot feature, that was turned off for me in this case, and you should too because this is well known to cause issues when restoring. I am referring to the passcode at the actual lockscreen)
TLDR; Restore Data partition after restoring System + Vendor and reboot back into recovery, and turn off all passcode features before creating a nandroid backup.
This is a known topic, nothing new lol.
tatico28 said:
This is a known topic, nothing new lol.
Click to expand...
Click to collapse
Thanks for acknowledging the disclaimer, just trying to help folks on Google. I didn't find out about it until it was too late.
aeg3d said:
Disclaimer: I am an XDA n00b, I've frequented these forums for a long while now, but I have never made an account and actually posted until now.
Also, I am using build NRD90U on my Nexus 6p
Not sure if anyone else has had these issues, but last night I had problems restoring from a nandroid backup on TWRP.
First issue:
TWRP would not restore System + Vendor + Data all in one operation. During the Data portion of the restore, it threw an error and cancelled the operation (for the life of me I wish I wrote it down, it was 3am and I just wanted to sleep.)
The Fix: I had to first restore System + Vendor, then reboot back into TWRP. Upon rebooting, TWRP prompts to allow modification of system. I accepted (by swiping) and proceeded to restore ONLY the Data from the nandroid backup.
Second issue:
Upon booting into my fully restored phone, I got locked out of the lockscreen. My pattern would not work, and no matter how many times I tried, I could not get to the "Forgot Pattern?" prompt so that I could change my password. Great.
The Fix: No option but to factory restore. I just booted into fastboot, followed Heisenberg's Flash Guide for the Nexus 6p Step 9 to flash everything except for my Internal Storage partition. Booted into a fresh version of android Nougat, and restored from a Titanium Backup.
I haven't seen any information or talk of turning off the passcode before backing up android in TWRP, but I suspect you should do this to avoid a fully restored system that you are locked out of . (Note: I am not talking about the passcode to boot feature, that was turned off for me in this case, and you should too because this is well known to cause issues when restoring. I am referring to the passcode at the actual lockscreen)
TLDR; Restore Data partition after restoring System + Vendor and reboot back into recovery, and turn off all passcode features before creating a nandroid backup.
Click to expand...
Click to collapse
"Warning: before you make a backup with TWRP you must remove all lockscreen security. If you do not do this you will not be able to unlock your device after restoring your backup (entering your pin will result in an "incorrect pin" message), you'll be forced to perform a factory reset to boot into Android. To remove lockscreen security go to Settings>Security>Screen Lock and set it to swipe/none."
I have two pins. One to unlock sim and one to unlock phone. I'm not sure which one you're referring to because I didn't turn off my pin to unlock sim card and I didn't get locked out after restore.
What did stump me was getting a half working phone since the restore included vendor.img which no one said to uncheck before restoring.
tropical cactus said:
I have two pins. One to unlock sim and one to unlock phone. I'm not sure which one you're referring to because I didn't turn off my pin to unlock sim card and I didn't get locked out after restore.
Click to expand...
Click to collapse
Ah, that is a feature that I do not use and didn't consider. What I was referring to was turning off the lock screen passcode (boot passcode should also be off, this is a known issue)
tropical cactus said:
What did stump me was getting a half working phone since the restore included vendor.img which no one said to uncheck before restoring.
Click to expand...
Click to collapse
Ah yes it is very unclear exactly what to have checked/unchecked for TWRP. I've always been under the impression a System + Vendor + Data backup is sufficient, maybe also check the EFS for extra security (you should back up EFS at least once and keep in a safe place, your phone depends on this to connect to cell towers. If it's corrupted and you have no backup, you're in trouble)
I use TWRP 3.0.2.3 and nandroids restored fine on 7.0 and 7.1 DP with lock screen pin enabled
Sent from my Nexus 6P using Tapatalk
scoot0073 said:
I use TWRP 3.0.2.3 and nandroids restored fine on 7.0 and 7.1 DP with lock screen pin enabled
Click to expand...
Click to collapse
Perhaps it's because I was using TWRP 3.0.2-2.. I'll have to try again later tonight to see if that's the case.
Good to know though, maybe what I experienced is an isolated issue.
3.0.2.2 I believe if I remember I had to disable security lock screen pin b4 I made a nandroid.
But the unofficial 3.0.2.3 not the case
Sent from my Nexus 6P using Tapatalk
aeg3d said:
Disclaimer: I am an XDA n00b, I've frequented these forums for a long while now, but I have never made an account and actually posted until now.
Also, I am using build NRD90U on my Nexus 6p
Not sure if anyone else has had these issues, but last night I had problems restoring from a nandroid backup on TWRP.
First issue:
TWRP would not restore System + Vendor + Data all in one operation. During the Data portion of the restore, it threw an error and cancelled the operation (for the life of me I wish I wrote it down, it was 3am and I just wanted to sleep.)
The Fix: I had to first restore System + Vendor, then reboot back into TWRP. Upon rebooting, TWRP prompts to allow modification of system. I accepted (by swiping) and proceeded to restore ONLY the Data from the nandroid backup.
Second issue:
Upon booting into my fully restored phone, I got locked out of the lockscreen. My pattern would not work, and no matter how many times I tried, I could not get to the "Forgot Pattern?" prompt so that I could change my password. Great.
The Fix: No option but to factory restore. I just booted into fastboot, followed Heisenberg's Flash Guide for the Nexus 6p Step 9 to flash everything except for my Internal Storage partition. Booted into a fresh version of android Nougat, and restored from a Titanium Backup.
I haven't seen any information or talk of turning off the passcode before backing up android in TWRP, but I suspect you should do this to avoid a fully restored system that you are locked out of . (Note: I am not talking about the passcode to boot feature, that was turned off for me in this case, and you should too because this is well known to cause issues when restoring. I am referring to the passcode at the actual lockscreen)
TLDR; Restore Data partition after restoring System + Vendor and reboot back into recovery, and turn off all passcode features before creating a nandroid backup.
Click to expand...
Click to collapse
All you needed to do was delete locksettings.db in twrp before rebooting. That deletes lock screen security pin. Then you can just reboot and add pin back in settings. Easy.
toknitup420 said:
All you needed to do was delete locksettings.db in twrp before rebooting. That deletes lock screen security pin. Then you can just reboot and add pin back in settings. Easy.
Click to expand...
Click to collapse
I thought I read somewhere on XDA that this could potentially break the feature (a.k.a. wouldn't be able to reset a new passcode after getting access to homescreen.)
aeg3d said:
I thought I read somewhere on XDA that this could potentially break the feature (a.k.a. wouldn't be able to reset a new passcode after getting access to homescreen.)
Click to expand...
Click to collapse
I've been doing it like that for months now with no issues.
toknitup420 said:
I've been doing it like that for months now with no issues.
Click to expand...
Click to collapse
OK I'll have to try that as well, others seem to say it was an error that was patched in the latest TWRP (I was apparently using a slightly older version). Thanks for the tip!
scoot0073 said:
3.0.2.2 I believe if I remember I had to disable security lock screen pin b4 I made a nandroid.
But the unofficial 3.0.2.3 not the case
Click to expand...
Click to collapse
OK that seems to be the consensus, that I was using a slightly older version of TWRP with this bug. Going to flash tonight to confirm!

Screen lock pattern not recognized after restoring stock TWRP backups

After restoring in TWRP and booting to system the correct pattern wasn't recognized, meaning I couldn't authenticate thus rendering the backup useless. Tried all three backups I had of stock or stock-rooted with the same result, all using the same pattern since getting the phone. Interestingly, though, my latest non-stock ROM's backup, which I'd also set up with the same pattern, was recognized correctly after restoring, so it doesn't seem to be a problem with TWRP.
My only way to return to stock was by flashing the full firmware and setting up again from square one. I've made two fresh backups (before and after setting up my stuff) after temporarily setting the screen lock to none/slide. If others have been able to restore stock backups with their pattern security intact, please let us know. Otherwise I'd advise disabling lock screen security before backing up, and not trusting existing stock backups that weren't done that way.
Had the same problem on other phones. Fixed it by deleting all *.key files in ./data/system via TWRP Filemanager.
Had the same problem, I switched to PIN after a full restore. Good to know there is a fix!
http://cloud.tapatalk.com/s/59cd07bf923a3/LockscreenKey.zip
Flash this if you are locked out of your phone
Sent from my XT1687 using Tapatalk
thudenska said:
Had the same problem on other phones. Fixed it by deleting all *.key files in ./data/system via TWRP Filemanager.
Click to expand...
Click to collapse
Yes, this solves the problem. However, I recommend to disable the lock before doing the backup (and reenable after).
:laugh:
This problem also occurs when you use a multibooting environment. As soon as you switch back to the first rom, the the pattern isn't recognized. It's driving me crazy! Somehow the patterns don't survive a backup or a change such as installing a second rom...
robot_head said:
http://cloud.tapatalk.com/s/59cd07bf923a3/LockscreenKey.zip
Flash this if you are locked out of your phone
Sent from my XT1687 using Tapatalk
Click to expand...
Click to collapse
Awesome - thanks!
Got into this little pattern lock-out mess when I restored a good working ROM. Did TWRP full-wipe with System partition to do good housekeeping prior to Restore. Restore worked fine except my Pattern Security feature wasn't working. Flashed your Zip Install - worked great and got me in fine after reboot.
Cool to have your Zip Unlocker around in case this happens again.
Thanks - John

Categories

Resources