TWRP and Decrypt? - Nexus 6P Q&A, Help & Troubleshooting

Hi.
I am new to the Nexus 6p.
I want to install Magisk and backup my ROM via TWRP.
I am running stock Oreo 8.1.0 with a password and fingerprint.
I have just unlocked and installed TWRP 3.3.3-1. When I first loaded TWRP it asked me to decrypt data, but I just cancelled it as I thought it wasn't needed. I take it this is wrong?
I have now tried to go back into twrp but I get the Android on its back saying 'no data'. So the twrp flash never stuck.
I am under some confusion whether I need to format userdata or not. The guides I am following are old and don't mention Oreo only Developer preview N. I would prefer not to but if it needs doing it needs doing.
Would removing my fingerprint before flashing twrp help?
Thanks.

Warren_Orange said:
Hi.
I am new to the Nexus 6p.
I want to install Magisk and backup my ROM via TWRP.
I am running stock Oreo 8.1.0 with a password and fingerprint.
I have just unlocked and installed TWRP 3.3.3-1. When I first loaded TWRP it asked me to decrypt data, but I just cancelled it as I thought it wasn't needed. I take it this is wrong?
I have now tried to go back into twrp but I get the Android on its back saying 'no data'. So the twrp flash never stuck.
I am under some confusion whether I need to format userdata or not. The guides I am following are old and don't mention Oreo only Developer preview N. I would prefer not to but if it needs doing it needs doing.
Would removing my fingerprint before flashing twrp help?
Thanks.
Click to expand...
Click to collapse
You need to boot back into twrp and format data the reboot back to recovery again and advanced wipe system data cache dalvik/art and internal storage if necessary, then flash a custom ROM .

Related

How can I install Oxygen OS 5.0.1 with an unlocked bootloader?

Good day!
Our country just received the Oxygen OS 5.0.1 update.
How can I install it with an unlocked bootloader?
I was going to relock it but I found out that if I did, my data will be gone.
The only difference in the set-up of my phone from a stock OP5 is the unlocked bootloader.
Flash through stock recovery
Hitman478™ said:
Flash through stock recovery
Click to expand...
Click to collapse
I haven't done this kind of thing yet.
If I do this, will my data be wiped out or not?
What about using the OTA notification ?
quick05 said:
What about using the OTA notification ?
Click to expand...
Click to collapse
What do you mean?
I tried to update my phone using the normal way but after downloading and tried to install it, it failed because my bootloader is unlocked.
I just made a backup of data using codeworkx recovery. Copied the backup (Along with the files on userdata I wanted to keep) to my PC.
Wiped all and formatted data. Then installed Oreo and copied back the files and data backup from the pc to the phone and restored data with codeworkx recovery again.
Then flashed magisk 15.2 and rebooted.
Everything working fine now.
shriekyphantom said:
Good day!
Our country just received the Oxygen OS 5.0.1 update.
How can I install it with an unlocked bootloader?
I was going to relock it but I found out that if I did, my data will be gone.
The only difference in the set-up of my phone from a stock OP5 is the unlocked bootloader.
Click to expand...
Click to collapse
I managed to flash Nougat without locking my bootloader. But I also had to Format the Data partition to make it work. I used Titanium Backup to backup the data of the Apps and Myapplist to make a list of the apps. After installing Oreo I only needed to spent 1 hour to restoring the app data.
pleomaxell said:
I managed to flash Nougat without locking my bootloader. But I also had to Format the Data partition to make it work. I used Titanium Backup to backup the data of the Apps and Myapplist to make a list of the apps. After installing Oreo I only needed to spent 1 hour to restoring the app data.
Click to expand...
Click to collapse
Hello, I'm interested in the same thing.. I have oxygen osv4.5.x received notice for is 5.0.1 and want to install. I have an unlocked bootloader and am also rooted w/magisk. I want to keep my unlocked bootloader and root after upgrading. I also want to do a "clean" install.
Can anyone provide detail instructions, including best back up method of data and links to any files needed (twrp, magisk, etc) thanks
jmoricone said:
Hello, I'm interested in the same thing.. I have oxygen osv4.5.x received notice for is 5.0.1 and want to install. I have an unlocked bootloader and am also rooted w/magisk. I want to keep my unlocked bootloader and root after upgrading. I also want to do a "clean" install.
Can anyone provide detail instructions, including best back up method of data and links to any files needed (twrp, magisk, etc) thanks
Click to expand...
Click to collapse
This is what I did:
Downloaded OnePlus5Oxygen_23_OTA_028_all_1801031502_04d7cc5. zip, twrp-3.2.1-0-universal-codeworkx-cheeseburger.img and Magisk-v15.3.zip.
Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP.
Rebooted to TWRP again to make sure that my TWRP was updated.
Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
This deleted my Internal Storage so I had to backup everything beforehand.
Then used advanced wipe to wipe Cache and Dalvik.
Mounted the internal storage by using the Mount option from TWRP main menu.
I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
Copied the OnePlus full update and Magisk zip file.
Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots.
Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
Booted into TWRP and flashed Magisk.
I am now on Oreo and I hate the way Ambient Display looks right now.
pleomaxell said:
This is what I did:
Downloaded OnePlus5Oxygen_23_OTA_028_all_1801031502_04d7cc5. zip, twrp-3.2.1-0-universal-codeworkx-cheeseburger.img and Magisk-v15.3.zip.
Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP.
Rebooted to TWRP again to make sure that my TWRP was updated.
Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
This deleted my Internal Storage so I had to backup everything beforehand.
Then used advanced wipe to wipe Cache and Dalvik.
Mounted the internal storage by using the Mount option from TWRP main menu.
I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
Copied the OnePlus full update and Magisk zip file.
Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots.
Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
Booted into TWRP and flashed Magisk.
I am now on Oreo and I hate the way Ambient Display looks right now.
Click to expand...
Click to collapse
Thank you... I like everything about my current build..should I wait to upgrade... Any other issues with Oreo?
jmoricone said:
Thank you... I like everything about my current build..should I wait to upgrade... Any other issues with Oreo?
Click to expand...
Click to collapse
I honestly dont see a big difference yet, but only had it for two days. Feels a bit snappier, my signal a bit stronger, and probably an improvement with battery life. I had issues upgrading but then again I flashed the wrong version of magisk. I think the most important thing is the latest android security update.
SysAdmNj said:
I honestly dont see a big difference yet, but only had it for two days. Feels a bit snappier, my signal a bit stronger, and probably an improvement with battery life. I had issues upgrading but then again I flashed the wrong version of magisk. I think the most important thing is the latest android security update.
Click to expand...
Click to collapse
Hey, thanks.. I will update later today. I see you provided which version of twrp (twrp-3.2.1-0-universal-codeworkx-cheeseburger.img). But what is the difference between the version you noted and the one I found (twrp-3.2.1-0-oreo-8.0-codeworkx-cheeseburger.img)
I want to make sure I have the correct version.
Thanks again
jmoricone said:
Hey, thanks.. I will update later today. I see you provided which version of twrp (twrp-3.2.1-0-universal-codeworkx-cheeseburger.img). But what is the difference between the version you noted and the one I found (twrp-3.2.1-0-oreo-8.0-codeworkx-cheeseburger.img)
I want to make sure I have the correct version.
Thanks again
Click to expand...
Click to collapse
You can ask that question on the TWRP thread. May be they can answer it correctly. I guessed that twrp-3.2.1-0-universal-codeworkx-cheeseburger.img was for both Nougat and Oreo and that is why I used it. So, if you want to be sure you should ask that on a TWRP thread.
pleomaxell said:
This is what I did:
Downloaded OnePlus5Oxygen_23_OTA_028_all_1801031502_04d7cc5. zip, twrp-3.2.1-0-universal-codeworkx-cheeseburger.img and Magisk-v15.3.zip.
Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP.
Rebooted to TWRP again to make sure that my TWRP was updated.
Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
This deleted my Internal Storage so I had to backup everything beforehand.
Then used advanced wipe to wipe Cache and Dalvik.
Mounted the internal storage by using the Mount option from TWRP main menu.
I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
Copied the OnePlus full update and Magisk zip file.
Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots.
Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
Booted into TWRP and flashed Magisk.
I am now on Oreo and I hate the way Ambient Display looks right now.
Click to expand...
Click to collapse
Hello, I was reviewing the process and just downloaded everything onto my computer and transferred onto my phone but have a few questions regarding some of the steps.
* Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP
** Can I update TWRP via the official app and is that version of TWRP okay to use over the "twrp-3.2.1-0-universal-codeworkx-cheeseburger.img"
* Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes' / This deleted my Internal Storage so I had to backup everything beforehand.
** How, what and where did you back up your data? Because later you mentioned "deleted my Internal Storage". I am guessing that because the OP5 does not have an external SD card everything is wiped and the new OS 5.0.1 needs to be saved onto a computer and then re-transferred back onto the phone. I am also guessing that the backup will need to be saved onto a computer as after wiping the phone it would also delete that file too, correct?
* Mounted the internal storage by using the Mount option from TWRP main menu.
** I am assuming that this option after the data wipe is self explanatory?
* I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
** This is what makes be believe all the files should be on a computer. How did you reboot and when you did, does it go directly / back to TWRP?
* Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots. / Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
** I am guessing here that once OS v8 is installed the TWRP img is no longer on the phone. I would need to transfer the TWRP back onto the phone then re-flash? Could I just install the TWRP official app and flash that way?
Thanks
jmoricone said:
Hello, I was reviewing the process and just downloaded everything onto my computer and transferred onto my phone but have a few questions regarding some of the steps.
* Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP
** Can I update TWRP via the official app and is that version of TWRP okay to use over the "twrp-3.2.1-0-universal-codeworkx-cheeseburger.img"
* Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes' / This deleted my Internal Storage so I had to backup everything beforehand.
** How, what and where did you back up your data? Because later you mentioned "deleted my Internal Storage". I am guessing that because the OP5 does not have an external SD card everything is wiped and the new OS 5.0.1 needs to be saved onto a computer and then re-transferred back onto the phone. I am also guessing that the backup will need to be saved onto a computer as after wiping the phone it would also delete that file too, correct?
* Mounted the internal storage by using the Mount option from TWRP main menu.
** I am assuming that this option after the data wipe is self explanatory?
* I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
** This is what makes be believe all the files should be on a computer. How did you reboot and when you did, does it go directly / back to TWRP?
* Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots. / Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
** I am guessing here that once OS v8 is installed the TWRP img is no longer on the phone. I would need to transfer the TWRP back onto the phone then re-flash? Could I just install the TWRP official app and flash that way?
Thanks
Click to expand...
Click to collapse
You have to flash TWRP by going to fastboot mode .
If you are rooted only then the TWRP app works
Aarju said:
You have to flash TWRP by going to fastboot mode .
If you are rooted only then the TWRP app works
Click to expand...
Click to collapse
Yes I am currently rooted. Once I flash the new OS will I still have root access to use the TWRP official app? Is that why after flashing new OS you need to flash TWRP via fastboot?
What about the backing up? I also have full titanium, thanks.
jmoricone said:
Yes I am currently rooted. Once I flash the new OS will I still have root access to use the TWRP official app? Is that why after flashing new OS you need to flash TWRP via fastboot?
What about the backing up? I also have full titanium, thanks.
Click to expand...
Click to collapse
After flashing the new rom you will be flashed stock recovery and you have to flash it through fastboot and flash magisk again.
Aarju said:
After flashing the new rom you will be flashed stock recovery and you have to flash it through fastboot and flash magisk again.
Click to expand...
Click to collapse
Hello, I followed the following instructions:
4. Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
6. Then used advanced wipe to wipe Cache and Dalvik.
7. Mounted the internal storage by using the Mount option from TWRP main menu.
8. I (also) was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
9. Copied the OnePlus full update and Magisk zip file.
I went to install the update w/in twrp and now I get an error message:
Updater process ended with ERROR: 7
Error installing zip file '/sdcard/oneplus5oxygen_23_OTA_028.....
What happened? Anyone please help...
jmoricone said:
Hello, I followed the following instructions:
4. Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
6. Then used advanced wipe to wipe Cache and Dalvik.
7. Mounted the internal storage by using the Mount option from TWRP main menu.
8. I (also) was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
9. Copied the OnePlus full update and Magisk zip file.
I went to install the update w/in twrp and now I get an error message:
Updater process ended with ERROR: 7
Error installing zip file '/sdcard/oneplus5oxygen_23_OTA_028.....
What happened? Anyone please help...
Click to expand...
Click to collapse
Wipe data and then copy the rom full zip flash it boot it to the starting screen then boot to recovery and then flash magisk ,you will see no errors.
Hello, I followed the following instructions:
4. Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
6. Then used advanced wipe to wipe Cache and Dalvik.
7. Mounted the internal storage by using the Mount option from TWRP main menu.
8. I (also) was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
9. Copied the OnePlus full update and Magisk zip file.
I went to install the update w/in twrp and now I get an error message:
Updater process ended with ERROR: 7
Error installing zip file '/sdcard/oneplus5oxygen_23_OTA_028.....
What happened? Anyone please help...
I received the following tip
"Wipe data and then copy the rom full zip flash it boot it to the starting screen then boot to recovery and then flash magisk ,you will see no errors."
But this makes no sense to me.
I have formatted my phone / wiped data / have the full rom & magisk on my "/sdcard" / went to install zip via TWRP, selected the rom and received the error message.
I decided to just go and upgrade via OTA and that failed. My phone has rebooted back to stock
what am i doing wrong?

For those using magisk, was the upgrade to Oreo worth it?

Seems, I need to lock bootloader to take official update. Is it worth the hassle of backing up all data, and upgrading to oreo?
SysAdmNj said:
Seems, I need to lock bootloader to take official update. Is it worth the hassle of backing up all data, and upgrading to oreo?
Click to expand...
Click to collapse
Just flash the full zips from TWRP and reflash Magisk to maintain root.
SysAdmNj said:
Seems, I need to lock bootloader to take official update. Is it worth the hassle of backing up all data, and upgrading to oreo?
Click to expand...
Click to collapse
I didn't need to lock the bootloader again to update to Oreo from rooted and encrypted Nougat. This is what I did:
Downloaded OnePlus5Oxygen_23_OTA_028_all_1801031502_04d7cc5. zip, twrp-3.2.1-0-universal-codeworkx-cheeseburger.img and Magisk-v15.3.zip.
Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP.
Rebooted to TWRP again to make sure that my TWRP was updated.
Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
This deleted my Internal Storage so I had to backup everything beforehand.
Then used advanced wipe to wipe Cache and Dalvik.
Mounted the internal storage by using the Mount option from TWRP main menu.
I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
Copied the OnePlus full update and Magisk zip file.
Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots.
Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
Booted into TWRP and flashed Magisk.
I am now on Oreo and I hate the way Ambient Display looks right now.
pleomaxell said:
I didn't need to lock the bootloader again to update to Oreo from rooted and encrypted Nougat. This is what I did:
Downloaded OnePlus5Oxygen_23_OTA_028_all_1801031502_04d7cc5. zip, twrp-3.2.1-0-universal-codeworkx-cheeseburger.img and Magisk-v15.3.zip.
Rebooted to TWRP and installed the Codeworkx TWRP using the Install->Image option inside TWRP.
Rebooted to TWRP again to make sure that my TWRP was updated.
Entered WIPE from TWRP main menu and used the 'Format' option to Format the Data and typed 'Yes'
This deleted my Internal Storage so I had to backup everything beforehand.
Then used advanced wipe to wipe Cache and Dalvik.
Mounted the internal storage by using the Mount option from TWRP main menu.
I was having problem copying files to the internal storage so I rebooted TWRP and the problem was fixed.
Copied the OnePlus full update and Magisk zip file.
Installed the OnePlus full update and Wiped Cache and Dalvik and rebooted the device to make sure that the OS boots.
Then rebooted the device to fastboot to flash Codeworkx TWRP again because it was unavailable.
Booted into TWRP and flashed Magisk.
I am now on Oreo and I hate the way Ambient Display looks right now.
Click to expand...
Click to collapse
beningodfrey4 said:
Just flash the full zips from TWRP and reflash Magisk to maintain root.
Click to expand...
Click to collapse
Yes but is there a way to dirty flash so you don't have to wipe your data?
Yes, obviously a lot more steps to remain encrypted, but worth it if you want to keep your data intact. Do try it out and reply the outcome on that thread.
https://forum.xda-developers.com/oneplus-5/how-to/guide-upgrade-nougat-rooted-encrypted-t3734779
You guys don't understand. Any tutorial that includes "format data" means EVERYTHING gets wiped - even internal storage.
The OP is asking for a way to avoid it, and I think there isn't any. So you either bite the bullet or stay where you are.
Also, I had trouble flashing Magisk 15.3 with codeworkx recovery. Worked fine with bluspark.
Rhoban said:
You guys don't understand. Any tutorial that includes "format data" means EVERYTHING gets wiped - even internal storage.
The OP is asking for a way to avoid it, and I think there isn't any. So you either bite the bullet or stay where you are.
Also, I had trouble flashing Magisk 15.3 with codeworkx recovery. Worked fine with bluspark.
Click to expand...
Click to collapse
Do you think its worth the jump? Are you seeing better battery life or any other improvements?
SysAdmNj said:
Do you think its worth the jump? Are you seeing better battery life or any other improvements?
Click to expand...
Click to collapse
It feels a bit faster, but I used to run Boeffla Kernel with battery optimized interactive governor on Nougat. So that's probably why.
As for battery, I don't really see a big improvement.
The biggest benefit was a clean system and internal storage. Don't even have face unlock, so can't comment on that.
I am happy with oreo!
Magisk
xposed framework sdk26 v90beta1
greenify + boost

Need help Axon 7 encryption stopping from flashing

Ok have a ZTE Axon 7 can't flash any thing because of it instantly encryption and I get recovery and then game over any one have a Cure for this......... thanks in advance.
You have to do a factory wipe, to remove encryption. Then when setting up the phone again when it prompts you to set a security pin or finger sprints skip that part.
chairmanmarv said:
You have to do a factory wipe, to remove encryption. Then when setting up the phone again when it prompts you to set a security pin or finger sprints skip that part.
Click to expand...
Click to collapse
Tried that and it didn't work.....it doesn't matter what I flash stock ROMs tell me my password is correct but memory is corrupt and need to be wiped and when I flash a custom ROM it doesn't boot just two flashes of the led and that's it.
Which TWRP recovery are you on?
What I mean by Factory reset is a full Factory wipe your whole internal is erased. It is like a clean slate new phone.
You should have all the necessary files for your flash on your sd card there is an option to select storage to flash from there.
So when I first swapped from Stock Nougat to AEX I was encrypted on 5/4 ROM my internal was locked by encryption and could only dirty flash roms. it was annoying so I factory wiped and flashed latest AEX from there and didn't set up security right away so no encryption.
I realised my TIBU back ups were all on internal so had to basically start from scratch oops lol.
It is a little outdated now with the official Oreo roms but user @Oki 's guide helped me a lot and has clear steps and guides to get you all rooted and sorted on custom roms.
https://forum.xda-developers.com/axon-7/how-to/guide-axon-7-custom-oreo-roms-newbies-t3786693
chairmanmarv said:
Which TWRP recovery are you on?
What I mean by Factory reset is a full Factory wipe your whole internal is erased. It is like a clean slate new phone.
You should have all the necessary files for your flash on your sd card there is an option to select storage to flash from there.
So when I first swapped from Stock Nougat to AEX I was encrypted on 5/4 ROM my internal was locked by encryption and could only dirty flash roms. it was annoying so I factory wiped and flashed latest AEX from there and didn't set up security right away so no encryption.
I realised my TIBU back ups were all on internal so had to basically start from scratch oops lol.
It is a little outdated now with the official Oreo roms but user @Oki 's guide helped me a lot and has clear steps and guides to get you all rooted and sorted on custom roms.
https://forum.xda-developers.com/axon-7/how-to/guide-axon-7-custom-oreo-roms-newbies-t3786693
Click to expand...
Click to collapse
Just found out that the phone has bricked itself it would play any video or sound so did a hard reset now just getting a constant boot loop trying to get it in to EDL as we speak.....got EDL flashed stock ROM in miflasher now stuck on splash screen.......been on the splash screen for 10 minutes now.......
chairmanmarv said:
Which TWRP recovery are you on?
What I mean by Factory reset is a full Factory wipe your whole internal is erased. It is like a clean slate new phone.
You should have all the necessary files for your flash on your sd card there is an option to select storage to flash from there.
So when I first swapped from Stock Nougat to AEX I was encrypted on 5/4 ROM my internal was locked by encryption and could only dirty flash roms. it was annoying so I factory wiped and flashed latest AEX from there and didn't set up security right away so no encryption.
I realised my TIBU back ups were all on internal so had to basically start from scratch oops lol.
It is a little outdated now with the official Oreo roms but user @Oki 's guide helped me a lot and has clear steps and guides to get you all rooted and sorted on custom roms.
https://forum.xda-developers.com/axon-7/how-to/guide-axon-7-custom-oreo-roms-newbies-t3786693
Click to expand...
Click to collapse
Ok now got the thing back was able to reunlock the bootloader and installed recovery flashed candy rom with one issue could not mount system so now just flashed Oreo stock rom so all good again....... thanks for the help
The stock ROM encrypts by default, and formatting data partition in twrp is the only way to remove it. But to prevent the encryption before it happens, you have a few options:
1. If you dont plan to root, flash @jcadduono's no verity opt encrypt zip (Google it)
2. Magisk and SuperSU can optionally disable encryption before it happens. Magisk Manager has a config option if you're installing from the app. You can use Aroma SuperSU config if SuperSU is your root method of choice.
Hope that helped!
I would like to note that AOSP/Lineage/CM-based ROMs dont encrypt by default. though Im sure it could be enabled if you wanted to. This seems to be unique to the stock ROMs, mainly because Google insists that phone OEMs should go for higher security by enabling encryption as the default.
AnonVendetta said:
The stock ROM encrypts by default, and formatting data partition in twrp is the only way to remove it. But to prevent the encryption before it happens, you have a few options:
1. If you dont plan to root, flash @jcadduono's no verity opt encrypt zip (Google it)
2. Magisk and SuperSU can optionally disable encryption before it happens. Magisk Manager has a config option if you're installing from the app. You can use Aroma SuperSU config if SuperSU is your root method of choice.
Hope that helped!
I would like to note that AOSP/Lineage/CM-based ROMs dont encrypt by default. though Im sure it could be enabled if you wanted to. This seems to be unique to the stock ROMs, mainly because Google insists that phone OEMs should go for higher security by enabling encryption as the default.
Click to expand...
Click to collapse
Yep this is the problem I am having now....... can't find much info about it.

Just a little question about upgrade

Hey,
My Mi A1 have TWRP, Magisk, and bootloader unlocked on Android 8.1.0, but I want to upgrade to Android 9 and go back to full stock device (bootloader lock and original TWRP), my question is, what i need to do before ? Just flash with miflash latest rom and check clean all and lock or I need to go back to stock on Android 8.1.0 and do ota update to Android 9 ?
Thanks )
You can wipe everything in twrp and then flash this
https://drive.google.com/file/d/1Uh4CR2-MXBYsSQL6BTnv4xpkCjEh7ZFn/view?usp=drivesdk
Then you can lock it.
Just make a twrp backup and save it to your sdcard or computer , just in case.
ccalixtro said:
You can wipe everything in twrp and then flash this
https://drive.google.com/file/d/1Uh4CR2-MXBYsSQL6BTnv4xpkCjEh7ZFn/view?usp=drivesdk
Then you can lock it.
Just make a twrp backup and save it to your sdcard or computer , just in case.
Click to expand...
Click to collapse
Thanks, so in TWRP I check all in wipe (dalvik, data, internal, cache and system)? And after that I mount data and drop the rom with USB and flash it ?
And after that i'll not have TWRP anymore ?
I try this, this monday

(Yet Another) Question on Encryption

So, I've been reading ad nauseum on this topic with regards to flashing new ROMs on my 6t and getting locked out due to decryption.
Among other threads and places across the interweb, I've read all of these:
https://forum.xda-developers.com/search/forum/8259?query=Encryption
During my travels I've discovered that the s**t doesn't really hit the fan until "data" is wiped via TWRP. I see that the recommend process for flashing new ROMs goes like this:
Boot on twrp
Flash ROM
Flash twrp installer
Reboot to twrp
Factory reset
Reboot to system
Am I understanding this correctly that if I transpose steps 4 and 5, then I shall plan on losing all of my data, but if I reboot from TWRP (right back into TWRP) before step 5 (aka data wipe), I shouldn't loose my data?
Assuming that is correct, does it matter if I leave a lock screen password enabled before rebooting to TWRP from the soon-to-be replaced ROM? I ask this because removing the lock screen password did not seem to reduce my chances of encountering permananly encrypted data.
Thanks!
notorious.dds said:
So, I've been reading ad nauseum on this topic with regards to flashing new ROMs on my 6t and getting locked out due to decryption.
Among other threads and places across the interweb, I've read all of these:
https://forum.xda-developers.com/search/forum/8259?query=Encryption
During my travels I've discovered that the s**t doesn't really hit the fan until "data" is wiped via TWRP. I see that the recommend process for flashing new ROMs goes like this:
Boot on twrp
Flash ROM
Flash twrp installer
Reboot to twrp
Factory reset
Reboot to system
Am I understanding this correctly that if I transpose steps 4 and 5, then I shall plan on losing all of my data, but if I reboot from TWRP (right back into TWRP) before step 5 (aka data wipe), I shouldn't loose my data?
Assuming that is correct, does it matter if I leave a lock screen password enabled before rebooting to TWRP from the soon-to-be replaced ROM? I ask this because removing the lock screen password did not seem to reduce my chances of encountering permananly encrypted data.
Thanks!
Click to expand...
Click to collapse
Yes. For the love of god. Someone please clear up how we can flash on the go. I don't always have access to a computer with Adb/fastboot.
Every time I try to switch roms, upon rebooting to TWRP, my folders encrypt. Then I have to format data and voila, no fricking ROM to flash and I'm stuck
idkwhothatis123 said:
Yes. For the love of god. Someone please clear up how we can flash on the go. I don't always have access to a computer with Adb/fastboot.
Every time I try to switch roms, upon rebooting to TWRP, my folders encrypt. Then I have to format data and voila, no fricking ROM to flash and I'm stuck
Click to expand...
Click to collapse
Yeah A/B partition are a nuisance when it comes to flashing. I'd recommend you to do a clean flash of the ROM. Follow these steps.
1. Download the Latest Stable OOS from OnePlus's Website. Download the ROM ZIP of your Choice as well as the latest TWRP Installer. Transfer these to your phone and also copy them to a Laptop as you might have to Format Data.
2. Now Reboot to Recovery and flash OOS ZIP and TWRP Installer. Let it finish. Once it's done Reboot to Recovery from Within TWRP.
3. Again flash OOS and TWRP Installer. If for some reason your folders are messed up (as you posted in the image earlier) just go to Wipe and Format Data. And transfer the OOS and TWRP Installer to Internal and Flash them. Let it finish.
4. Once that's done, now again Reboot to Recovery and now flash ROM and TWRP Installer. After that's done, again Reboot to Recovery.
5. Again, flash ROM and TWRP Installer. Once done, Reboot to Recovery.
6. Now flash Gapps of your Choice. Stock are Recommend while anything above Nano will work. AROMA won't work. Once Gapps are flashed now go to Wipe and do a Factory Reset (Swipe to Factory Reset). Once that's Done, hit Reboot System and wait for the ROM to Load.
7. After the Initial Setup, Reboot to Recovery and flash Magisk and Custom Kernel if you want.
Personally I Format Data after flashing Gapps to get a "clean install". But that's not necessary. Also if you want to flash ROMs often I'd suggest investing in Swift Backup. It's an excellent app for Backups and can Backup almost Anything. Hope this helps.
This is what I do. Occasionally I get the Encrypted Folders but if followed correctly all is smooth. I can flash any ROM without Encryption. Except maybe stock OOS.
Thanks Mannan.
However, what I'm really looking for is someone to explain the following:
1. Which action or actions is it that triggers the phone to be encypted without a way to decrypt when flashing a new rom? My suspicion is that if the phone was encrypted while having been boot from slot A, then wiping data while in slot A results in data loss. By extension, rebooting into slot B and then wiping data allows slot B to now hold the encryption key. I'm sure this theory has got some errors, but it's the best I can come up with having no intrinsic knowledge on the topic.
2. Are there any means of mitigating data loss should the phone become encrypted? I.e. If possible, can I back up data (minus /data/media) and then restore that when I can't get access to /data/media?
With regards to question #1, I developed my "suspicion" after lossing ambition to test it. When I get my ambition back to fight this issue, I'll try again. I'm just getting sick of transfering 25+ gigs of data via adb every time the data gets encrypted and I can't get it decrypted.
notorious.dds said:
Thanks Mannan.
However, what I'm really looking for is someone to explain the following:
1. Which action or actions is it that triggers the phone to be encypted without a way to decrypt when flashing a new rom? My suspicion is that if the phone was encrypted while having been boot from slot A, then wiping data while in slot A results in data loss. By extension, rebooting into slot B and then wiping data allows slot B to now hold the encryption key. I'm sure this theory has got some errors, but it's the best I can come up with having no intrinsic knowledge on the topic.
2. Are there any means of mitigating data loss should the phone become encrypted? I.e. If possible, can I back up data (minus /data/media) and then restore that when I can't get access to /data/media?
With regards to question #1, I developed my "suspicion" after lossing ambition to test it. When I get my ambition back to fight this issue, I'll try again. I'm just getting sick of transfering 25+ gigs of data via adb every time the data encryption kicks in.
Click to expand...
Click to collapse
You're not that far off, actually. And while I'm no developer I suspect that Encryption kicks in when
a). You flash stock OOS. No matter what ROM you are on, when you flash OOS it's possible you can get encrypted. I'm not sure about this but if a developer could confirm that'd be great. This one time, I flashed OOS Stable while on Beta and it Encrypted my Storage. So I had to retransfer with a computer to flash it the required two times. So basically avoid flashing OOS when on a Custom ROM. Even when switching ROMs.
b). Just as you said, when you Wipe Data within TWRP and then Reboot to TWRP it also Encrypts the Device. So I usually Wipe Data after flashing ROM & Gapps. Otherwise if you Wipe Data after flashing ROM it will Encrypt you.
And to answer that last Question the app I personally use is called Swift Backup. It's an amazing app and although it costs $5.49 it can Backup Apps and Data. It can also backup the Files in Android/obb. Give it a go.
Mannan Qamar said:
You're not that far off, actually. And while I'm no developer I suspect that Encryption kicks in when
a). You flash stock OOS. No matter what ROM you are on, when you flash OOS it's possible you can get encrypted. I'm not sure about this but if a developer could confirm that'd be great. This one time, I flashed OOS Stable while on Beta and it Encrypted my Storage. So I had to retransfer with a computer to flash it the required two times. So basically avoid flashing OOS when on a Custom ROM. Even when switching ROMs.
Click to expand...
Click to collapse
I've been fiddling around with OOS and The Pixel Experience (aka TPE) ROM. I've yet to need to flash OOS in order to loose my ability to decrypt. Flashing TPE screws everything up quite nicely as well. That said, I have gotten into the situation where TWRP (booted from either slot) has got everything encrypted. However, in one case, I was able to get the data back by recreating the boot_a partition as it existed before I wiped data. I think there may be something to be learned here. However, subsequent attempts to use this method have not been successful. In other words, I'm not sure what I actually learned.
Mannan Qamar said:
And to answer that last Question the app I personally use is called Swift Backup. It's an amazing app and although it costs $5.49 it can Backup Apps and Data. It can also backup the Files in Android/obb. Give it a go.
Click to expand...
Click to collapse
I'm still using Titanium Backup (paid version as well). It works quite well and I'm happy with it. That said, it's still a much bigger pain in the butt to restore vs performing a nandroid restore of the data. It's apples and oranges though. In order for the nandroid to provide any real value, you pretty much have to do right before need it... unless you never do anything on your phone. It also only works with the ROM from which it was created... obviously. Since my current nandroid backup of /data is > 22 gb, its fairly cumbersome.
notorious.dds said:
I've been fiddling around with OOS and The Pixel Experience (aka TPE) ROM. I've yet to need to flash OOS in order to loose my ability to decrypt. Flashing TPE screws everything up quite nicely as well. That said, I have gotten into the situation where TWRP (booted from either slot) has got everything encrypted. However, in one case, I was able to get the data back by recreating the boot_a partition as it existed before I wiped data. I think there may be something to be learned here. However, subsequent attempts to use this method have not been successful. In other words, I'm not sure what I actually learned.
I'm still using Titanium Backup (paid version as well). It works quite well and I'm happy with it. That said, it's still a much bigger pain in the butt to restore vs performing a nandroid restore of the data. It's apples and oranges though. In order for the nandroid to provide any real value, you pretty much have to do right before need it... unless you never do anything on your phone. It also only works with the ROM from which it was created... obviously. Since my current nandroid backup of /data is > 22 gb, its fairly cumbersome.
Click to expand...
Click to collapse
I dunno if it will work but when you get Encrypted try booting the TWRP image. Maybe that'll work.
Doesn't this problem occur with backups and restore from twrp as well?.... This A/B stuff I'm not used to but I'll keep reading and hopefully something in my brain will kick in lol...
Mannan Qamar said:
I dunno if it will work but when you get Encrypted try booting the TWRP image. Maybe that'll work.
Click to expand...
Click to collapse
Yeah, that I defintitely tried. No dice. However, I just backed up everthing and I'm about to start blowing the thing up with ROM flashes. Consider it a stress test. I'll report back.
What I've got so far...
Coming from OOS 9.0.14 running on slot B with a lock screen pattern enabled, I boot into TWRP on slot B.
I then flashed The Pixel Experiance ROM via it's .zip file. (The flash is then applied to slot A because it goes to the inactive slot).
Flashed the TWRP install .zip
Changed active slot to A
Reboot to recovery (aka TWRP) ... now in slot A.
wiped data (minus storage)
Flashed magisk
Reboot system
This got me into the new ROM with data intact. However, when rebooting to recovery (still slot A), it would ask for a pattern but yet wouldn't accept the pattern to decrypt. Rebooting back into Pixel Experience the data was decrypted. So, even the data would decrypt when booted into system, I could no longer get to the data from within TWRP. I then changed the lock pattern from within Pixel Experience and reboot to TWRP, it still couldn't decrypt the data. Rebooting back to system succeeded in that it actually boot, but I could no longer unlock the phone (stuck on "phone is starting"). My presumption at this point was that Pixel Experience could no longer decrypt the data.
I then:
Reboot to TWRP (slot A still)
Flashed OOS
Flashed TWRP
Set active slot to B
Reboot to recovery (aka TWRP)
wiped data (minus storage)
reboot to system
At this point OOS failed to boot and I was returned to TWRP. Data was still not able to be decrypted. I then did a factory reset plus wiped storage (aka data, dalvik, and internal storage) and tried to boot to system... still failed and sent me back to TWRP. This time, although data was empty, it was decrypted. I tried to reboot system again. It failed again and sent me back to TWRP.
So, at this point , I've wiped data and internal storage but I cannot get stock OOS to boot. So, I reboot to bootloader and executed:
Code:
fastboot -w
My understanding is that this should do the same this as performing a factory reset from within TWRP. However, rebooting to system succeeded this time.
So, the new questions are:
1. How is it that I can decrypt data when booted into Pixel Experience on slot A, but I cannot decrypt the data via TWRP?
2. If I removed the lock screen pattern from OOS before flashing PixelExperience, would I have been able to decrypt the data in both the ROM and within TWRP?
3. Why is factory resetting via fastboot effective when doing so in TWRP is not?
notorious.dds said:
What I've got so far...
Coming from OOS 9.0.14 running on slot B with a lock screen pattern enabled, I boot into TWRP on slot B.
I then flashed The Pixel Experiance ROM via it's .zip file. (The flash is then applied to slot A because it goes to the inactive slot).
Flashed the TWRP install .zip
Changed active slot to A
Reboot to recovery (aka TWRP) ... now in slot A.
wiped data (minus storage)
Flashed magisk
Reboot system
This got me into the new ROM with data intact. However, when rebooting to recovery (still slot A), it would ask for a pattern but yet wouldn't accept the pattern to decrypt. Rebooting back into Pixel Experience the data was decrypted. So, even the data would decrypt when booted into system, I could no longer get to the data from within TWRP. I then changed the lock pattern from within Pixel Experience and reboot to TWRP, it still couldn't decrypt the data. Rebooting back to system succeeded in that it actually boot, but I could no longer unlock the phone (stuck on "phone is starting"). My presumption at this point was that Pixel Experience could no longer decrypt the data.
I then:
Reboot to TWRP (slot A still)
Flashed OOS
Flashed TWRP
Set active slot to B
Reboot to recovery (aka TWRP)
wiped data (minus storage)
reboot to system
At this point OOS failed to boot and I was returned to TWRP. Data was still not able to be decrypted. I then did a factory reset plus wiped storage (aka data, dalvik, and internal storage) and tried to boot to system... still failed and sent me back to TWRP. This time, although data was empty, it was decrypted. I tried to reboot system again. It failed again and sent me back to TWRP.
So, at this point , I've wiped data and internal storage but I cannot get stock OOS to boot. So, I reboot to bootloader and executed:
My understanding is that this should do the same this as performing a factory reset from within TWRP. However, rebooting to system succeeded this time.
So, the new questions are:
1. How is it that I can decrypt data when booted into Pixel Experience on slot A, but I cannot decrypt the data via TWRP?
2. If I removed the lock screen pattern from OOS before flashing PixelExperience, would I have been able to decrypt the data in both the ROM and within TWRP?
3. Why is factory resetting via fastboot effective when doing so in TWRP is not?
Click to expand...
Click to collapse
Well starting from the way you flashed the ROM, the rule of thumb is that you NEVER manually change slots. Now since you are on stock follow the instructions I posted earlier to flash PE or any other ROM for that matter. I think when you manually set the slot it somehow messed up Decryption. Next, after flashing OOS from TWRP when you are on a Custom ROM, you must always Format Data. The command you ran via Fastboot (fastboot -w) does just that.
So I just flashed Bootleggers from Stock OpenBeta 11. These are the steps I followed. I was successfully able to flash and was able to keep my Data intact. These are the steps I followed.
Starting from OpenBeta 11 I flashed ROM (Bootleggers) and then TWRP Installer. Then go to Reboot and Select Recovery. Once in Recovery, again flash ROM and TWRP Installer. Once done, reboot to Recovery. Flash Gapps and then go to Wipe and do a Swipe to Fa Tory Reset. This will Delete all your Data except Internal Storage. This is a necessary step when flashing a ROM. Once done, reboot to System. After this I was able to boot up Successfully with my Internal Storage as it was before flashing. After that I restored my backup. Everything is working and I can enter and Decrypt TWRP without error.
This thread should be pined as a guide because instalation notes in ROM threads are so basic.
A couple of things come to mind reading this thread in reference to encryption
1) if security patches dont match on A/B, it seems to trigger a lockout with encryption. i may be wrong.
2) if internal storage isnt wiped, i.e.-if you use the "factory reset' option in twrp, your data is still there and that in itself post-flash can trigger encryption error as the data is still there.
I think about it like this, despite it being A/B partitions, the data is like a middle layer that isnt individualized to one partition or the other. so a trigger/failure for secure boot encrypts it all.
kitcostantino said:
A couple of things come to mind reading this thread in reference to encryption
1) if security patches dont match on A/B, it seems to trigger a lockout with encryption. i may be wrong.
2) if internal storage isnt wiped, i.e.-if you use the "factory reset' option in twrp, your data is still there and that in itself post-flash can trigger encryption error as the data is still there.
I think about it like this, despite it being A/B partitions, the data is like a middle layer that isnt individualized to one partition or the other. so a trigger/failure for secure boot encrypts it all.
Click to expand...
Click to collapse
I'm pretty sure, that if you flash anything with a security patch earlier than the one you're currently using your data will get encrypted.
Which is why it happens with going back to OOS from custom, because they're always late with security patches compared to custom roms.
The hardest thing for.me coming from an A only device (Axon 7) has been learning order of operations. as long as one flashes rom followed by twrp and then a reboot into recovery, followed by installing magisk, things usually go okay. Going from aosp to aosp went okay, but like you said moving from OOS to AOSP or vice versa always yielded encryption lock. maybe we could make a merged security patch or something of the sort to bridge the gap. im no dev, so im sure someone who knows more than i can tell us why that wouldnt work. it would be really cool for One Plus to gain a better foothold in custom OS before the majority of crack flashers and devs swear off. Dont get me wrong, OOS is amazing and i feel with the inherent features, is superior to any other stock rom, but android is all about choice.
i really and truly wish someone would make a version of TWRP that had a dual boot set up vs A/B. I have had devices (looking at you, Droid Bionic) that never had proper root/bl unlock and had amazing rom communities bc of safestrap/dual boot/etc. i am more than willing to give up internal storage space to duplicate/clone /data and anything else that is on both systems. i also wish recovery had its own partition again, but that one is beyond our control at this point as it resides in boot now.
Maybe its conceivable. Who knows.
I have no issues. I don't lose anything when I flash ROMs. I boot to twrp, factory reset(not wipe storage), flash ROM, flash twrp installer....boot ROM, reboot twrp, flash gapps, custom kernel. Then I factory reset again (not wipe storage) and then install magisk..done....no issues. It will fail boot once and then boot fine because of this process but only after you do this. So if you reboot later you are fine...I keep all my stuff
First off, I want to thank all of you who contributed to this thread. I'm defintely gaining a better understanding of some of the pitfalls associated with A/B devices and encryption. Thanks!
Mannan Qamar said:
Well starting from the way you flashed the ROM, the rule of thumb is that you NEVER manually change slots. Now since you are on stock follow the instructions I posted earlier to flash PE or any other ROM for that matter. I think when you manually set the slot it somehow messed up Decryption.
Click to expand...
Click to collapse
So, my understand is that flashing a new ROM from within TWRP flashes it to the inactive slot. Therefore, my assumptions as to the reasoning behind rebooting from TWRP back into TWRP before wiping data were that:
Any modifiations made to the boot partition intended to affect the new ROM need to be made to the boot partition that shares the same slot as that of the new ROM, and
Wiping data while booted into image of TWRP which shares the same slot as the new ROM has some magical effect on preserving the ability to decrypt data vs wiping data while booted into the image of TWRP that resides in the slot of the ROM to be replaced.
It is these assumptions (combined with my execution of the basic recipe failing to prevent encryption lock-out) which led me to manually changing slots. I will say this... after flashing PE and TWRP.zip from within TWRP on slot B, simply rebooting to recovery brought me right back to TWRP on slot B. If PE is now on slot A, how does installing magisk, etc. do me any good while in slot B? Also, are my assumptions misguided as to the "why" rebooting to TWRP before installing magisk, wiping data, etc is necessary?
Mannan Qamar said:
Next, after flashing OOS from TWRP when you are on a Custom ROM, you must always Format Data. The command you ran via Fastboot (fastboot -w) does just that.
Click to expand...
Click to collapse
Lightbulb status: on
Thanks!
kitcostantino said:
If security patches dont match on A/B, it seems to trigger a lockout with encryption. i may be wrong.
Click to expand...
Click to collapse
Is this why in Mannan Qamar's earlier post he appears to be flashing the new ROM to BOTH slots before trying to boot into system?
ebproject said:
I'm pretty sure, that if you flash anything with a security patch earlier than the one you're currently using your data will get encrypted.
Which is why it happens with going back to OOS from custom, because they're always late with security patches compared to custom roms.
Click to expand...
Click to collapse
I'm assuming that flashing OOS to BOTH slots as is mentioned earlier with regards to flashing a custom ROM won't help when going back to OOS given the old vs new issue. Has anyone verified that yet?
It's my understanding that the sure security patch is applied to the system partition, correct? Is part of that patch included in boot, or no?
jamescable said:
I have no issues. I don't lose anything when I flash ROMs. I boot to twrp, factory reset(not wipe storage), flash ROM, flash twrp installer....boot ROM, reboot twrp, flash gapps, custom kernel. Then I factory reset again (not wipe storage) and then install magisk..done....no issues. It will fail boot once and then boot fine because of this process but only after you do this. So if you reboot later you are fine...I keep all my stuff
Click to expand...
Click to collapse
I notice that the FIRST thing you do is "factory reset". That's definitely not standard with the install threads I've read. Hmmmmm, interesting.
Also, why do you boot the ROM before flashing gapps, and kernel? It seems unnecessary since you're just factory resetting again. I'm sure I'm missing something on this one.
notorious.dds said:
I notice that the FIRST thing you do is "factory reset". That's definitely not standard with the install threads I've read. Hmmmmm, interesting.
Also, why do you boot the ROM before flashing gapps, and kernel? It seems unnecessary since you're just factory resetting again. I'm sure I'm missing something on this one.
Click to expand...
Click to collapse
Booting to ROM solved the encryption issues
idkwhothatis123 said:
Yes. For the love of god. Someone please clear up how we can flash on the go. I don't always have access to a computer with Adb/fastboot.
Every time I try to switch roms, upon rebooting to TWRP, my folders encrypt. Then I have to format data and voila, no fricking ROM to flash and I'm stuck
Click to expand...
Click to collapse
If you stuck on encrypted storage ever, reboot to system and after you see the setup screen, reboot to recovery again. Voila, your storage is decrypted now.
It happened to me all the time when I flash OOS and this way I am able to decrypt my internal storage.

Categories

Resources