My lock screen won't unlock even after entering the correct PIN

Greetings, my phone hasn’t received updates for about 1 year, since v0.18q(?) if I’m not mistaken, and interestingly I had accepted it. When I checked the website I noticed that the OS version had progressed to v1.3q. I immediately downloaded the latest version to my phone and updated the OS via TWRP.

Unfortunately I am now struggling with a problem. When I restart my phone I enter the storage password, when the OS starts I enter the PIN for the SIM, finally I enter the screen lock PIN BUT the screen never unlocks. The screen goes black and goes back to the lock screen. So now I can only answer incoming calls and make emergency calls.

When I try to access the files on the phone with TWRP, it strangely assumes that the storage password was entered incorrectly and decryption fails.

I wonder if downgrading the OS version to v0.18q(?) will fix this problem? If you think this method might work, where can I download the v0.18q(?) version of the OS?

Or do you have any other solution?

Phone: Samsung Galaxy S7 Herolte (Info about Samsung Galaxy S7 - herolte)

Hi @anordinaryperson welcome to the /e/ forum.

The things you describe sound similar to having inadvertently done an Android version Upgrade.

Some time ago the device was expected to receive the OTA OS version Upgrade (which we see in this post is marked as "completed "Week 37, 2022 : Development and Testing Updates.

It has seemed that in Android 10 the phone is encrypted by default.

Even with the OTA Upgrade it seems some /e/ users had similar issues to you in reports tagged #ota-upgrade

If you thought your case was a match – the advice was to wipe the data partition. This is expected to liberate the encryption. Your apps and data in apps would be lost, but if you are careful not to delete the “internal storage”, that is /sdcard (so named, but not the external SD card) there is a chance that your photos will still exist in “internal storage”.

In general I believe /e/ does not hold on to ROM images for any length of time after the build is passed. (Maybe someone would have the image backed up? I am not sure if this would be a fix though.)

1 Like

Thank you very much for responding. It is bad news for me that old OS versions are not archived somewhere. I will prefer to do some research to find the old OS version before wiping the “data” partition.

Finally, why is it that TWRP can’t decrypt the storage encryption? When I turn my phone off and on normally, the password I enter decrypts the storage encryption without any problem.

I do not have the exact technical reason but it anecdotally it is rather seen as a weakness in TWRP + Android 10. This is a 2019 article gives an earlier perspective TWRP lead explains why it’ll take time for the custom recovery to support Android 10.

It may be partly that the encryption system evolved with Android versions becoming more secure but without leaving a backwards compatible opening outside the Google ecosystem.

Speculation. The encryption system used by Google / Android may try to meet Google commercial objectives in producing “Secure Android devices” while being more hidden than is strictly essential.

1 Like

@aibd Oh you have enlightened me on this subject.

I did some research and found an old unofficial “herolte” ROM. Would you recommend installing this unofficial ROM to remove the screen lock password before deleting the “data” partition?

It may be something of a calculated risk. Is it the case that what has happened is that you know you have done a double Android version upgrade (from Oreo to Q) as if it was an ordinary update? :slight_smile:

From memory your device was upgraded direct fro Oreo to Q. If you were proposing to switch back to an Oreo ROM (if I have understood that right) you might find your data partition “just how you left it”. If that was successful you might have the old system back in order to backup under control. The risk might be that the data partition is now already “Android 10 encrypted” so going back becomes a problem, idk.

The upgrade from Oreo to Q is generally thought to require delete Format data partition. This is not necessarily the case with say LineageOS + Gapps, or within the full Google system.
I have never read what magic is performed by /e/ in the OTA Upgrade which attempts to preserve your data partition and restore it. I do not know how to do that.

If you found yourself back in Oreo, I would expect you to be able to upgrade to 1.3-q as long as you wipe Format data along the way. I am guessing that your issue is “failure to wipe Format data on Android version upgrade”.

Edited later, see subsequent posts first, but the low impact approach of just wiping data with data loss might work from your current state. Boot into TWRP, wipe data, reboot to system. Probably this should not be relied on to provide a stable device long term.

However users in this group #ota-upgrade seemed to be given more complicated advice which I do not fully remember – of course they were already dealing with a failed OTA Upgrade (different from your situation).

I certainly think it worth doing further research to see if you can avoid data loss. Maybe the screen lock password is the issue, idk.

What is this obsession with wiping data before upgrading? I don’t recall that wiping was ever required for upgrades.

For some upgrades, maybe pie to q, and definitely q to r, formatting data partition was required, but it was usually straightforward to keep your data by backing up before the upgrade, formatting, upgrading, going through first-time setup and setting teh same screen lock as before, then restoring data.

It is correct that our documentation Install /e/OS on a Samsung Galaxy S7 - “herolte” and /e/OS Version Upgrade recommends Format data. In TWRP we find this in Wipe > Format Data.@anordinaryperson if you have an encryption problem it is almost certainly preferable in this case (as it is probably more rigorous than Wipe), thanks @petefoth.

My suggestion must be based on my practice which I have found easy, convenient and sufficient to

Wipe > Advanced Wipe > Select Partitions to Wipe >

  • Dalvic / Art Cache
  • Cache
  • Data

I guess I have done this to ensure the contents of /sdcard is undamaged. I would be interested to know if the contents of “internal storage” is fully preserved if one uses Format data.

It won’t be. Formatting data will remove the contents of internal storage. But it is sometimes needed when manually upgrading to a higher Android version, which is why a backup is needed.


I guess there is no other solution for me except wiping the data partition. Unfortunately, doing so means deleting all personal files from the encrypted storage.
@aibd @petefoth

Did you try re-installing the old unofficial v0.18 ROM you linked to in your earlier post? If you can do so, and enable rooted debugging, you could back up your apps and data using either of the two methods mentioned in this post. (Even better, try both methods, in case restoring from TWRP doesn’t work)

It may not work, but ot gives you a chance of still having your apps and data after the update?