How do I change the encryption key? - OnePlus 3 Questions & Answers

Whenever I flash a new rom after a fullwipe, I still have to type in a pin to boot the phone. I think this is called "verified boot". This is also the pin I need in TWRP to decrypt data. So obviously this pin has been stored outside of data or system partitions and is used upon every new install/boot of a new rom to encrypt it immediately upon first boot.
So where is this encryption key stored and how do I delete it?

Lownita said:
Whenever I flash a new rom after a fullwipe, I still have to type in a pin to boot the phone. I think this is called "verified boot". This is also the pin I need in TWRP to decrypt data. So obviously this pin has been stored outside of data or system partitions and is used upon every new install/boot of a new rom to encrypt it immediately upon first boot.
So where is this encryption key stored and how do I delete it?
Click to expand...
Click to collapse
If this link helps you ?
https://source.android.com/security/encryption/index.html

I have this exact problem, not sure how to resolve this issue but it seems my phone needs my pin even after wiping the phone.
I would love to fix this, if anybody has any tips that would be great, I am running a OnePlus 3 with root and twrp.
-thanks.

DonaldKerabatsos said:
I have this exact problem, not sure how to resolve this issue but it seems my phone needs my pin even after wiping the phone.
I would love to fix this, if anybody has any tips that would be great, I am running a OnePlus 3 with root and twrp.
-thanks.
Click to expand...
Click to collapse
Go to fastboot, type fastboot format userdata. Or go to twrp, wipe, wipe data via the button. This should do the same. Beware that data and your internal storage will get wiped.

to disable the pin you have to do this:
setting>security>screen lock> type PIN> PIN
then you will see Secure start-up ( Require PIN to start device/ No Thank you)

Related

Phone still encrypted after reflash/factory reset?

Hello,
I hope someone will be able to help with this, although it is very much a case of user error! I upgraded my G3 to Marshmallow using the steps detailed here:
http://forum.xda-developers.com/lg-g3/development/stock-d855-30b-images-kdz-flashables-t3282012
It all worked perfectly until I decided to encrypt the handset. The encryption process worked as expected, but as I always did on previous Android versions, I used the CryptFS Password app to change the encryption password. The app advised that it was unable to change the password and that I should run the command via shell, which I did and it seemed to work. The problem is, I changed it to an alphanumeric password and my lock screen is just a numeric PIN, so upon reboot it prompts me to enter the password to decrypt but only allows me to enter numbers.
So, I kicked myself for not changing the lockscreen from PIN to password before rebooting, but figured I could just wipe/reflash and start again. However, when I reflash, I still get prompted for the encryption password at boot. So I figured I'd just enter the password wrong 30 times and factory reset the device that way, except that doesn't work either. It says it's going to reset, reboots to recovery (TWRP 2.8.7.0) and says it has reset, but then boots back to the encryption screen again (which now advises that I am -5 of 30 attempts!!).
Flashing CM13 or 12 works fine. I have settled on CM12 at the moment because it seems to be a bit more stable, but I'd ideally like to get back to stock Marshmallow. Is this possible?
I have tried wiping all partitions and data from within TWRP, and formatting partitions, all to no avail.
Is there any way I can reinstall stock Marshmallow?
Trying flashing marshmellow KDZ and it should reset everything
Let me know how things go
TTib said:
Hello,
I hope someone will be able to help with this, although it is very much a case of user error! I upgraded my G3 to Marshmallow using the steps detailed here:
http://forum.xda-developers.com/lg-g3/development/stock-d855-30b-images-kdz-flashables-t3282012
It all worked perfectly until I decided to encrypt the handset. The encryption process worked as expected, but as I always did on previous Android versions, I used the CryptFS Password app to change the encryption password. The app advised that it was unable to change the password and that I should run the command via shell, which I did and it seemed to work. The problem is, I changed it to an alphanumeric password and my lock screen is just a numeric PIN, so upon reboot it prompts me to enter the password to decrypt but only allows me to enter numbers.
So, I kicked myself for not changing the lockscreen from PIN to password before rebooting, but figured I could just wipe/reflash and start again. However, when I reflash, I still get prompted for the encryption password at boot. So I figured I'd just enter the password wrong 30 times and factory reset the device that way, except that doesn't work either. It says it's going to reset, reboots to recovery (TWRP 2.8.7.0) and says it has reset, but then boots back to the encryption screen again (which now advises that I am -5 of 30 attempts!!).
Flashing CM13 or 12 works fine. I have settled on CM12 at the moment because it seems to be a bit more stable, but I'd ideally like to get back to stock Marshmallow. Is this possible?
I have tried wiping all partitions and data from within TWRP, and formatting partitions, all to no avail.
Is there any way I can reinstall stock Marshmallow?
Click to expand...
Click to collapse
try booting into twrp, go into command terminal, manually format data partition using command line, then reflash cm12 and wipe cache and dalvik (you may not need to reflash it but why not if you are going back to mm)
if your partitions are the same as mine this is the command you want to run.
mke2fs -T ext4 /dev/block/mmcblk0p44
make sure you don't format the wrong partition check that your variant has the same partition (grab an app called diskinfo and click on data partition then alter the last parameter to w/e ur data partition is)
mmcblk0p44 is the paramater you want to change if yours isn't identical. this should reset encryption as data is the partition that gets encrypted.
after all of this use a guide to install marshmallow (kdz or something)
(when i encrypted my data partition twrp could no longer mount the partition to format it, but if you use command land format it formats the partition without mounting it.)
i'm assuming this is your issue as well.
KronicSkillz said:
try booting into twrp, go into command terminal, manually format data partition using command line, then reflash cm12 and wipe cache and dalvik (you may not need to reflash it but why not if you are going back to mm)
if your partitions are the same as mine this is the command you want to run.
mke2fs -T ext4 /dev/block/mmcblk0p44
make sure you don't format the wrong partition check that your variant has the same partition (grab an app called diskinfo and click on data partition then alter the last parameter to w/e ur data partition is)
mmcblk0p44 is the paramater you want to change if yours isn't identical. this should reset encryption as data is the partition that gets encrypted.
after all of this use a guide to install marshmallow (kdz or something)
(when i encrypted my data partition twrp could no longer mount the partition to format it, but if you use command land format it formats the partition without mounting it.)
i'm assuming this is your issue as well.
Click to expand...
Click to collapse
Hi, thanks for the advice, I gave it a try last night. My /data partition was named /dev/block/mmcblk0p43 according to DiskInfo, so I made sure the partition was unmounted in TWRP and formatted it via the terminal following your instructions and then reflashed the MM zip from the original link and... still encrypted.
I haven't tried flashing the kdz yet, as I use Linux and I don't believe there is a way to flash kdz files using *nix. I'll have to wait until the weekend and I'll try and do it via a VM.
I don't understand how this encrypted partition is still even there. I have CM12 installed and working, it's showing the full amount of disk space available, I've done multiple wipes, formats and resets, yet the minute I put MM on it, the phone thinks it's encrypted again.
I do actually know the encryption key, is there any way I can unlock the phone via ADB or something similar?
Not sure if it's relevant, but my phone model is D855. I don't think I mentioned that before.
Thanks for the help, I really appreciate it!
TTib said:
Hi, thanks for the advice, I gave it a try last night. My /data partition was named /dev/block/mmcblk0p43 according to DiskInfo, so I made sure the partition was unmounted in TWRP and formatted it via the terminal following your instructions and then reflashed the MM zip from the original link and... still encrypted.
I haven't tried flashing the kdz yet, as I use Linux and I don't believe there is a way to flash kdz files using *nix. I'll have to wait until the weekend and I'll try and do it via a VM.
I don't understand how this encrypted partition is still even there. I have CM12 installed and working, it's showing the full amount of disk space available, I've done multiple wipes, formats and resets, yet the minute I put MM on it, the phone thinks it's encrypted again.
I do actually know the encryption key, is there any way I can unlock the phone via ADB or something similar?
Not sure if it's relevant, but my phone model is D855. I don't think I mentioned that before.
Thanks for the help, I really appreciate it!
Click to expand...
Click to collapse
very strange when i did that it got rid of my encrypted partition... i'm not sure what else to say except maybe see if someone will lend you a windows pc to do kdz flash.
KronicSkillz said:
very strange when i did that it got rid of my encrypted partition... i'm not sure what else to say except maybe see if someone will lend you a windows pc to do kdz flash.
Click to expand...
Click to collapse
I flashed the kdz via LGUP and... now the phone won't boot to anything except TWRP. Have tried restoring two previous nandroid backups, installing CM12 and MM, all install without reporting errors. LGUP detects it as an unknown device, so can't flash kdz again. Might have bricked this one. :crying:
Phew. Okay, solved! I followed the following guide to flash an old version of the stock firmware: http://www.androidrootz.com/2014/07/how-to-unroot-lg-g3-all-variants.html.
Then, I upgraded, rooted, flash TWRP and finally installed MM again and it seems to be back to normal ("Android is starting" screen as we speak. Fingers crossed!). Thanks to everyone who helped me out with this one!

[SCRIPT] (Depreciated) Wipe Encrypted Data Without Wiping Internal Storage

Update: The latest TWRP is already capable of decrypting data. This method is now unnecessary and depreciated. Use factory reset in TWRP menu instead
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
topjohnwu said:
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Click to expand...
Click to collapse
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
stonew5082 said:
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
Click to expand...
Click to collapse
It functions the same as "Factory Reset" in TWRP, which means it will wipe all data, but your personal files stored in internal storage will remain on the device.
StickyEyez said:
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
Click to expand...
Click to collapse
Actually you can use the original version. But I suggest you to use my patched one, in case you accidentally wiped your whole data partition (this mod will not do this), you will stay encrypted, and your data signal will be fine
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
topjohnwu said:
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
Click to expand...
Click to collapse
I have tried unlocking boot loader again. The log shows oem needs to be unlocked.
When a RUU comes out, would that help recover the phone?
Sent from my ONE A2003 using XDA-Developers mobile app
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
LeeDroid said:
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
Click to expand...
Click to collapse
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
tailor999 said:
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
Click to expand...
Click to collapse
Oh dear....
topjohnwu said:
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
Click to expand...
Click to collapse
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
SacredDeviL666 said:
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
Click to expand...
Click to collapse
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
jollywhitefoot said:
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
Click to expand...
Click to collapse
cool thank you...
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
+1
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
topjohnwu said:
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
Click to expand...
Click to collapse
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Ndaoud360 said:
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Click to expand...
Click to collapse
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
LeeDroid said:
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
Click to expand...
Click to collapse
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Ndaoud360 said:
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Click to expand...
Click to collapse
Ah, a full wipe is only applicable to data buddy, if a rom dev doesn't wipe system before their installation, they need a good slap with a frozen kipper.
Cache is entirely optional

Encryption password

hi,
i have recently encrypted my moto g5 and i use TWRP recovery, which now asks me for a password. it doesnt seem to be my pin code and also when i cancel, i cant get to the data directory within TWRP.
is there a default password?
ehmdjii said:
hi,
i have recently encrypted my moto g5 and i use TWRP recovery, which now asks me for a password. it doesnt seem to be my pin code and also when i cancel, i cant get to the data directory within TWRP.
is there a default password?
Click to expand...
Click to collapse
1.Boot into recovery
2.advanced
3.file manager
4.data
5.system
6. Delete the following files:
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
7.reboot to system.
TheArtistSpud said:
1.Boot into recovery
2.advanced
3.file manager
4.data
5.system
6. Delete the following files:
password.key
pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
7.reboot to system.
Click to expand...
Click to collapse
thanks, but the problem is that i dont even see the contents of data in recovery since TWRP asks me for a password when it starts. this password doesnt seem to be something i picked nor the pin or pattern code.
ehmdjii said:
thanks, but the problem is that i dont even see the contents of data in recovery since TWRP asks me for a password when it starts. this password doesnt seem to be something i picked nor the pin or pattern code.
Click to expand...
Click to collapse
https://www.reddit.com/r/Nexus5/comments/2mskzu/twrp_is_asking_for_a_password
This could help you.
TheArtistSpud said:
https://www.reddit.com/r/Nexus5/comments/2mskzu/twrp_is_asking_for_a_password
This could help you.
Click to expand...
Click to collapse
thanks again, tried all those tips with various combinations of my pin, but none worked.
it really seems, that the official motog5 rom uses some modified version as the password for disk encryption.
ehmdjii said:
hi,
i have recently encrypted my moto g5 and i use TWRP recovery, which now asks me for a password. it doesnt seem to be my pin code and also when i cancel, i cant get to the data directory within TWRP.
is there a default password?
Click to expand...
Click to collapse
TWRP decryption for G5 is broken, and it's a pretty known issue. If you are rooted you can use a workaround:
1) Completely disable the lockscreen from settings.
2) Use flashfire (it's in the play store) to create a data backup on an memory stick connected through OTG. Don't use internal memory, because you will not see the backup in TWRP. The new backup in the memory stick will be decrypted.
3) Boot into TWRP, format data partition and restore the backup flashing the auto generated zip located in the Flashfire folder from the memory stick.
After that your restored data will be temporally
decrypted.
4) Do whatever you want to do in TWRP before reboot.
5) Disconnect your OTG and your external memory stick before to reboot onto system. Your device will not boot correctly if you don't do that.
After rebooting the data will be encrypted again automatically.
WARNING: Remember If you boot onto system it will encrypt data again automatically it can't be avoided. The first boot-up after this procedure will take some time because of the re-encryption process. Be patient and don't freak out, the device will stay 5-10 mins on the boot logo without a progress bar. Don't interrupt it, or your data will get corrupted and you will need to restore the backup and start over again.
WARNING 2: Your password will not work after restoring the backup. If you skipped the step 1) delete the .key And locksettings.db files in data/system before restarting onto system.
I strongly recommend disabling the password/pin/pattern before booting onto TWRP. It will prevent that your password gets corrupted (it happens easily).
By example if you format data from recovery without doing that, your password will not work anymore. If it happens, the only way back is format your data and restore your Flashfire backup if you have one.
Enviado desde mi Moto G (5) mediante Tapatalk

boot up pin

Hello,
Whenever i encrypt my phone on DU, when i set the lock screen Password it asks me if i want the phone to ask it to be able to boot, but then, the phone refuses to boot and says that the Password is wrong.
But when i boot into twrp the Password works and i can decrypt the data partition.
I already had the issue but with the phone accepting the boot pin but twrp not.
This is on a fresh DU install with previously formated data partition.
DO NOT encrypt via custom roms: it's cause of troubles and compatibility issues, especially when returning to OxygenOS.
So:
1) Put device in bootloader mode, plug it to computer, type fastboot format userdata via ADB terminal.
2) Go in TWRP and wipe all the partitions (be sure to have /cache formatted in ext4, otherwise change its filesystem):
3) Always from TWRP, flash latest OOS firmware (4.1.6 or OB19);
3) Reboot and configure setup with your PIN required at bootup;
4) After completing wizard, reboot in TWRP;
5) Now you can wipe anything and flash your rom.
Now device should require your PIN even at first boot of DU.
Ps until doing another fastboot format userdata, device will keep encryption.
Simone98RC said:
DO NOT encrypt via custom roms: it's cause of troubles and compatibility issues, especially when returning to OxygenOS.
So:
1) Put device in bootloader mode, plug it to computer, type fastboot format userdata via ADB terminal.
2) Go in TWRP and wipe all the partitions (be sure to have /cache formatted in ext4, otherwise change its filesystem):
3) Always from TWRP, flash latest OOS firmware (4.1.6 or OB19);
3) Reboot and configure setup with your PIN required at bootup;
4) After completing wizard, reboot in TWRP;
5) Now you can wipe anything and flash your rom.
Now device should require your PIN even at first boot of DU.
Ps until doing another fastboot format userdata, device will keep encryption.
Click to expand...
Click to collapse
Thanks for the answer, do you know why custom rom encryption doesnt work ? I used to to this on my old s5 and it worked perfectly
nikexv2 said:
Thanks for the answer, do you know why custom rom encryption doesnt work ? I used to to this on my old s5 and it worked perfectly
Click to expand...
Click to collapse
Maybe if you give his post a thumbs up he might continue helping you out , I mean that's the least you could do ......
Xceeder said:
Maybe if you give his post a thumbs up he might continue helping you out , I mean that's the least you could do ......
Click to expand...
Click to collapse
If members had to wait for thumbs up before they answer to someone's post then they wouldn't answer most of them.
What kind of **** philosophy is this, i hope for you that's not your way of thinking everyday.
And even, that's none of your business, maybe i forgot to like his post ?
Come on, do not vent on XDA, do not make useless quarrels ?
@nikexv2 sorry, but technically speaking, I don't know the reason of problematic encryption on custom roms.
Just enable encryption with official firmware and there's no other compatibility issue.
Encryption still remains when you full wipe device via recovery.
Have a good day.
nikexv2 said:
If members had to wait for thumbs up before they answer to someone's post then they wouldn't answer most of them.
What kind of **** philosophy is this, i hope for you that's not your way of thinking everyday.
And even, that's none of your business, maybe i forgot to like his post ?
Click to expand...
Click to collapse
It works like this - you ask for help and if someone gives you good advice or helps you out in any way then a quick thumbs up is appreciated , it's just courtesy but anyway I hope you get your phone sorted out ...
nikexv2 said:
Hello,
Whenever i encrypt my phone on DU, when i set the lock screen Password it asks me if i want the phone to ask it to be able to boot, but then, the phone refuses to boot and says that the Password is wrong.
But when i boot into twrp the Password works and i can decrypt the data partition.
I already had the issue but with the phone accepting the boot pin but twrp not.
This is on a fresh DU install with previously formated data partition.
Click to expand...
Click to collapse
Not sure what's wrong with your set up but I came from OOS OB19 to DU, wiped userdata to switch data to ext4, flashed DU + beans gapps (recommended for DU) then booted up, encrypted my phone via Settings > Security and set ask pin on booting device, same pin has worked on all ROMs, even tried some OOS based ones like Freedom OS CE, now on Omni + open gapps, I'm using blu spark latest recovery.

TWRP pin failed, but cannot remove pin in OS

Sadly my phone is corrupt and cant start anymore ... I want to use Newsflasher to rescue my Phone.
Before I want to use TWRP to make a backup. But I cannot enter TWRP.
As far as I understood TWRP cannot be installed on XZ2 compact, but it can be temporarily flashed (as I of course did to get my LineageOS Android 11).
But now when I flash it TWRP asks for a Password.
I just have my regular Screen Unlock Password - but if I type it in it tells me PASSWORD FAILED.
How can that be? Which other Password could it be? I dont know any ...
Obviously I would just remove the screen lock in Android. But it's corrupt x(
I want to do this before I have to do the wipe with Newflasher
If I ignore data encryption then it tells me when booting system that I have no OS installed ...
So then I will never be able to get my data back because encryption with password is still active and I cannot boot to turn it off?
And TWRP is bugged so it does not accept my real password? (How can that be omg ...)
Nothing can done now u have to flash flash a fastboot rom on your device without backup
That is
the_arxyn said:
Nothing can done now u have to flash flash a fastboot rom on your device without backup
Click to expand...
Click to collapse
That is what I was already thinking but yes let it be :/
I will use the old file that I used 2 years ago and also worked when I had to do the same.
For a strange reason it does not work when executing in the original created folder (by Xperifirm), but only if I push it on a external Hard Drive?
Otherwise it will tell FINISHED but it just took 3 seconds, which it will also do if it is played in any other folder ...
Anyways it asked me for a weird reason if I want to keep my userdata. I was thinking that there is no way to install a new OS but still keep the old data. I did it but then at the end of the Flashing it told the Sync did not work. I still booted up and it tells that it cant load the Android. So I dont know if this happened because I either left the user data intact or because that sync at the end did not work.
I'm just now scared to erase it when trying again, just in case that indeed I could safe my data.
So what is the story behind that *Erase User data Y / N*. Can I indeed keep my files this way?

Categories

Resources