I successfully installed the LineageOS nightly from the 7th and the 8th on my OnePlus 3T. Blank OS, no gapps. Everything works flawless and smooth. BUT:
As soon as I let TWRP decrypt the fs (use the pattern) and reboot into system (without performing a wipe or doing anything else), LineageOS is reset. The initial setup starts again and all settings and previously installed apps are lost.
I'm a bit helpless. What could be the matter? And how can I update LineageOS to the new nightly without decrypting the fs in TWRP?
Edit: Tried the same with OxygenOS. No issues there. All settings and apps survive the TWRP decrypt.
I have this same bug on the OnePlus 3 using opengapps pico.
When I reboot to recovery and enter my encryption password it prints that the decryption was successful, creates a dm device, and then resets. I lose all of my data in the process.
Are you still experiencing this issue? If so I will create a bug report on Jira on our behalves.
There is a fix in some unofficial builds of TWRP. You can find them in the thread below.
https://forum.xda-developers.com/on.../recovery-official-twrp-oneplus-3-3t-t3543391
Dear all:
I would like to open this Q&A thread as I am experiencing the same behaviour described in this post.
When I select the menu option "Encrypt phone" in the Security menu, confirm the device pin, and confirm that the encryption should start (in all tests, the battery was at 95+ % at this point), the device restarts, briefly displays the twisted Android logo, then the LineageOS boot animation for less than one minute, and then restarts again.
This second restart leads to a boot loop where only the white HTC/powered by Android screen (including the red warning text) is displayed for a few seconds before the device briefly vibrates and restarts. I can break this boot loop only by holding the volume up, volume down, and power buttons until the device enters the bootloader. I can then boot to recovery and restore the backup I had created before attempting to encrypt the device.
This issue has only occurred since I changed from the last available CyanogenMod 13.0 nightly (cm-13.0-20161218-NIGHTLY-himaul) to the first LineageOS 14.1 nightly (lineage-14.1-20170411-nightly-himaul-signed). It also occurs using the latest LineageOS 14.1 nightly (lineage-14.1-20170418-nightly-himaul-signed).
My configuration is as follows:
HTC One M9 (himaul), bootloader unlocked, S-ON
Recovery: TWRP 3.1.0.0 (twrp-3.1.0-0-hima.img)
LineageOS versions affected: lineage-14.1-20170411-nightly-himaul-signed and lineage-14.1-20170418-nightly-himaul-signed
Device PIN: 8 digits, digits only, no other characters
External SD card: present
Prior to upgrading from CyanogenMod 13.0 to LineageOS 14.1, my device was on HTC firmware 3.35.401.32. The recovery was also TWRP 3.1.0.0. TWRP was able to decrypt my data partition.
In preparation for the upgrade from CyanogenMod 13.0 to LineageOS 14.1, I prepared my device as follows:
Full device wipe, including formatting of data partition.
Installation of HTC firmware 4.14.401.7 (through 0PJAIMG.zip, not RUU).
Completion of HTC device setup using HTC firmware.
Successful OTA update to HTC firmware 4.28.401.3.
Installation of TWRP 3.1.0.0.
Full device wipe, including formatting of data partition.
Installation of LineageOS Nightly of 11 April.
Installation of OpenGApps Nano of 11 April.
In order to potentially exclude various factors that I thought might possibly contribute to the error, I tried the following:
Not selecting a lock screen PIN at all.
Using a simple 4-digit lockscreen PIN (1234).
Removing the external SD card prior to encryption.
Trying encryption with and without LineageOS SU addon.
Encrypting the device directly after the first LineageOS boot without any further setup or app installation.
Enabling and not enabling the developer options.
Removing the USB cable during first restart after encryption had begun.
I'm afraid I don't quite know what I could try next. Does anyone have any ideas, or is there some kind of troubleshooting I could attempt to help locate the cause of this behaviour?
I have converted several other devices (not owned by me) to LineageOS 14.1, mostly Samsung Galaxy SIII (GT-I9300) and Samsung Ace 3 LTE (GT-7275R), and none of them have exhibited a similar error.
Since reverting to CynogenMod 13.0 is not a real option, and I am quite uncomfortable leaving the device unencrypted, I would greatly appreciate any help or hint you may have. If you need any further information on my device or setup, please let me know. Thanks very much in advance.
Best regards,
Markus
Have you tried reflashing the rom?. Might be a bug or something.. Have you checked the bugs list?
Beamed in by telepathy.
shivadow said:
Have you tried reflashing the rom?. Might be a bug or something.. Have you checked the bugs list?
Click to expand...
Click to collapse
Yes, I tried reflashing twice. On the bugs list, I could not find an entry that could match this behaviour.
pleuhockle said:
Yes, I tried reflashing twice. On the bugs list, I could not find an entry that could match this behaviour.
Click to expand...
Click to collapse
Would it perhaps be better to open a bug report in jira.lineageos.org? I assume in in this case, it would be a bug report rather than a regression report as the encryption never worked for me in LineageOS 14.1.
pleuhockle said:
Yes, I tried reflashing twice. On the bugs list, I could not find an entry that could match this behaviour.
Click to expand...
Click to collapse
Today, I also tried the following:
I directly flashed the latest HTC firmware and encrypted the phone storage in the HTC firmware using the same PIN I also use in LineageOS. This encryption was successful. I then installed TWRP (TWRP was able to decrypt with the PIN) and restored my latest LineageOS 14.1 backup, using the rm -rf option in TWRP so the partition contents would be removed, but the partitions would not be reformatted. LineageOS then booted to the "Enter PIN to start Android" screen but was unable to decrypt using the PIN I had previously successfully used in TWRP. After this boot attempt, TWRP was also unable to decrypt using the PIN.
I then tried flashing the latest HTC firmware and booting only into the firmware without encrypting the phone. I then restored the backup in TWRP again using the option rm -rf. When I then tried to encrypt my device from LineageOS, the same boot loop resulted.
I will try to gather logcat data next but am concerned that, during the boot loop, the device may not boot far enough to allow for logcat data collection via adb.
pleuhockle said:
I will try to gather logcat data next but am concerned that, during the boot loop, the device may not boot far enough to allow for logcat data collection via adb.
Click to expand...
Click to collapse
I have been able to gather logcat data, however, as I suspected, I cannot gather any data during the boot loop. I was able to copy kernel and recovery log data to the external SD card from TWRP after breaking the boot loop and before restoring the backup. I'm attaching the (redacted) log files - due to the size limitation, I had to ZIP the logcat data.
As soon as the weekly/nightly bug reports open for new submissions again, I will file a bug report, but perhaps there is something in the logs that would give any of you an indication as to what may be the issue?
pleuhockle said:
As soon as the weekly/nightly bug reports open for new submissions again, I will file a bug report, but perhaps there is something in the logs that would give any of you an indication as to what may be the issue?
Click to expand...
Click to collapse
I have now created the bug report.
Have you seen this: https://forums.oneplus.net/threads/twrp-encryption-password.432114/
Beamed in by telepathy.
shivadow said:
Have you seen this: https://forums.oneplus.net/threads/twrp-encryption-password.432114/
Click to expand...
Click to collapse
Yes, I was familiar with these types of issues, and I am aware that earlier versions of TWRP sometimes had issues decrypting the data partition on himaul devices even if the correct password was used. The issue described in this other thread is different from mine, though. Before migrating to LOS 14.1, I was using the last available nightly build of CM 13.0 (18 December 2016) with TWRP 3.1.0. as the recovery. This combination did not cause any encryption issues. I reinstalled CM 13.0 in early January, and after this reinstallation (which involved formatting the data partition as well), I could encrypt the device without any issues, and TWRP was also able to decrypt the data partition using the correct pin.
The encryption issue only occurred after the first installation of the first nightly build of LOS 14.1 (11 April). I do hope the log data will contain some information that could help identify the issue - I'm at a loss as to what else I could try.
building for test
I checked with lukl33t and this issue was eventually resolved by removing hardware cryptography capability entirely. Ive set up a test environment and have a new build of 14.x nightly (unofficial) if anyone wants it.
Im also trying to test adding HW crypto again to see if the issue has been resolved. I believe it may have been caused by protected drivers and firmware on the device between version 6 and 7 of android, as this is when Google began their move from LUKS full disk encryption to a more staged file-based crypto model. For users experiencing this issue, is the phone S-OFF or S-ON?
RUU upgrades to 7 on this phone include a bundle of signed drivers specific to the SOC that may be the key to resolving HW crypto issues.
nimbius said:
I checked with lukl33t and this issue was eventually resolved by removing hardware cryptography capability entirely. Ive set up a test environment and have a new build of 14.x nightly (unofficial) if anyone wants it.
Im also trying to test adding HW crypto again to see if the issue has been resolved. I believe it may have been caused by protected drivers and firmware on the device between version 6 and 7 of android, as this is when Google began their move from LUKS full disk encryption to a more staged file-based crypto model. For users experiencing this issue, is the phone S-OFF or S-ON?
RUU upgrades to 7 on this phone include a bundle of signed drivers specific to the SOC that may be the key to resolving HW crypto issues.
Click to expand...
Click to collapse
Thanks @nimbius for working on this issue. Did you make progress with trying out hardware encryption yet?
And in the meantime, maybe you should ask for re-adding himaul to the list of officially built devices in LineageOS, now that disk encryption (at least software-based) works again? The current situation is a bit unfortunate, with no LinageOS updates for the phone at all.
comolik said:
Thanks @nimbius for working on this issue. Did you make progress with trying out hardware encryption yet?
And in the meantime, maybe you should ask for re-adding himaul to the list of officially built devices in LineageOS, now that disk encryption (at least software-based) works again? The current situation is a bit unfortunate, with no LinageOS updates for the phone at all.
Click to expand...
Click to collapse
HW encryption seems to work on my LOS 15.1 builds, so maybe get it a try. But you'll need to update to TWRP 3.2.2.
Today I finally wanted to update a Sony XA2 installation that had been running LineageOS 15.1 for quite a while to 17.1. But of course I wanted to make a backup first. Then I realized that to back up the SMS database I needed root, so I tried to sideload addonsu 15.1. For some reason that failed, and I tried to boot into TWRP to try sideload from there. But now the device only boots TWRP.
Does this mean that the LineageOS installation is gone now? Or is there some way that I can get access to /data/data/com.android.providers.telephony/databases/mmssms.db on the Lineage installation?
0
Hello
I'm currently in a very tricky situation.
I've decided that I want to update my oneplus 3 (non t) to the newest lineageos 17.1 nightly build. I've been running lineageos 15.x before (I havent updated in a very, very long time).
These are the steps I took as best as I remember:
from a working state: boot into TWRP 3.3.0.1 , backup system & boot onto interal storage
then flash stable9.0.6 firmware + modem, flash lineage-17.1-20200615-nightly, flash gapps
then I wiped dalvik cache and cache and booted into system.
The boot process itself went fine, however I was greeted with a "decryption failed" screen which claimed that the decryption password was correct, but the data was corrupt. TWRP also claims that the default decryption password does not work (it has not asked me for any decryption password before) and entering my screen lock pattern according to the /faq/openrecoveryscript.html page on twrp(dot)me does not yield any different result either.
Since I've neglected to copy the backup to any other place other than internal storage, thinking that just a firmware and system flash would be no risk to it, I now have no way of restoring the previous state.
First I tried updating TWRP to the newest version (3.3.1.1) which yielded no difference, I attempted to flash both the old firmware (I know that it was 5.0.x, so I went with 5.0.8) and an old version of lineageos (some unofficial release of lineageos 15.1 from 2017 that I found on xda, since the official releases arent available that long) which resulted in a successful boot, but unsuccessful decryption just as with lineageos 17.
I have also attempted to follow the steps at /r/LineageOS/comments/anivml/ , though the backup fails silently (pc says `Now unlock your device and confirm the backup operation...`, nothing happens on my phone)
I would be thankful for any ideas on how I could recover from this without data loss.
I apologize for the weird links, but I am a new user and cant post external links yet
Lotzisty said:
Hello
I'm currently in a very tricky situation.
I've decided that I want to update my oneplus 3 (non t) to the newest lineageos 17.1 nightly build. I've been running lineageos 15.x before (I havent updated in a very, very long time).
These are the steps I took as best as I remember:
from a working state: boot into TWRP 3.3.0.1 , backup system & boot onto interal storage
then flash stable9.0.6 firmware + modem, flash lineage-17.1-20200615-nightly, flash gapps
then I wiped dalvik cache and cache and booted into system.
The boot process itself went fine, however I was greeted with a "decryption failed" screen which claimed that the decryption password was correct, but the data was corrupt. TWRP also claims that the default decryption password does not work (it has not asked me for any decryption password before) and entering my screen lock pattern according to the /faq/openrecoveryscript.html page on twrp(dot)me does not yield any different result either.
Since I've neglected to copy the backup to any other place other than internal storage, thinking that just a firmware and system flash would be no risk to it, I now have no way of restoring the previous state.
First I tried updating TWRP to the newest version (3.3.1.1) which yielded no difference, I attempted to flash both the old firmware (I know that it was 5.0.x, so I went with 5.0.8) and an old version of lineageos (some unofficial release of lineageos 15.1 from 2017 that I found on xda, since the official releases arent available that long) which resulted in a successful boot, but unsuccessful decryption just as with lineageos 17.
I have also attempted to follow the steps at /r/LineageOS/comments/anivml/ , though the backup fails silently (pc says `Now unlock your device and confirm the backup operation...`, nothing happens on my phone)
I would be thankful for any ideas on how I could recover from this without data loss.
I apologize for the weird links, but I am a new user and cant post external links yet
Click to expand...
Click to collapse
Data on userdata partition is gone (for details see: https://forum.xda-developers.com/oneplus-3t/how-to/guide-cope-9-0-3-5-0-8-firmware-barrier-t3941164 ).
Format (not wipe) the data partition (los recommends ext4).
nvertigo67 said:
Data on userdata partition is gone (for details see: https://forum.xda-developers.com/oneplus-3t/how-to/guide-cope-9-0-3-5-0-8-firmware-barrier-t3941164 ).
Format (not wipe) the data partition (los recommends ext4).
Click to expand...
Click to collapse
Well ****.
Thank you for the information
hello,
f*** i ve done an really mistake.
i was on android 12, crdroid 8.1 and use the fingerprint/pin for device locking.
i boot into latest orangefox and install crdroid 8.4 with gapps, after that the device doesnot boot.
i go back into orangefox and read the errror failed to mount 'data'
i cant encrypt the device with orangefox, my pin isnt working either sim pin or android pin.
i flash crdroid 8.1 back with nikgapps, now the device boots but i get the error from android:
encryption unsuccessful, you have to wipe the device.
=> is there any solution to get an working device back, or recover my data, pictures was on the device, not on the sd card
thanks a lot for the answer