[Guide] How to decrypt data partition, and re-encrypt data partition on OnePlus 5

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
@snowwolf725 hi mate

Could you purpose a update no_verity_op5_v3.zip for the new OpenBeta 13 with Treble support (Vendor partition). Actualy v2 don't work and a dmverity v3 is available here

but i prefer your file because of that :
Are you willing to do some testing? If so, could you try the attached zip and see if it works for you (on OB13, of course)? I've modified the existing v2 to work with treble (hopefully :fingers-crossed:) but since I don't run OOS and use a custom ROM myself, I can't test. Make sure you're using a treble compatible TWRP before flashing! :)

EDIT: Removed zip as it wasn't working, sorry!
 
Last edited:
  • Like
Reactions: Pho3nX

Pho3nX

Senior Member
Jun 13, 2013
2,238
1,654
193
Are you willing to do some testing? If so, could you try the attached zip and see if it works for you (on OB13, of course)? I've modified the existing v2 to work with treble (hopefully :fingers-crossed:) but since I don't run OOS and use a custom ROM myself, I can't test. Make sure you're using a treble compatible TWRP before flashing! :)
Thanks mate, i will test this evening after the World Cup matchs ;):D
 

Pho3nX

Senior Member
Jun 13, 2013
2,238
1,654
193
Are you willing to do some testing? If so, could you try the attached zip and see if it works for you (on OB13, of course)? I've modified the existing v2 to work with treble (hopefully :fingers-crossed:) but since I don't run OOS and use a custom ROM myself, I can't test. Make sure you're using a treble compatible TWRP before flashing! :)
Don't work for me, the no_verity_op5_treble.zip work fine
 

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
Don't work for me, the no_verity_op5_treble.zip work fine
Yeah, I figured. I've removed the zip from my post. Thanks for testing!

Also, just for your information, a little background on the zip you used (which works fine) and then one I (tried to) modify: the one that I tried to modify is the actual no-verity-optional-encryption zip which dynamically find the boot image, patches the required file (fstab.qcom) on-the-go, then rewrites the boot image with the updated boot image. Hence, it's more universal and multi-device compatible as it uses the existing boot image and makes modifications to it. The zip that you used, on the other hand, is nothing but a patched version fstab.qcom file which is being replaced in the /vendor partition. Meaning it's not universal and can only be used with people running OxygenOS only on the OnePlus 5. :)
 
  • Like
Reactions: kimikim0 and Pho3nX

ReyTheBoss

Senior Member
Jan 2, 2017
192
50
0

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
Steps to decrypt with this zip please ? i tried it and many others but couldn't decrypt my data
what i did :
reboot recovery
wipe all partitions for clean flash
format data
reboot recovery
flash rom
reboot recovery
flash no verity
reboot

and always end up encrypted
please help
I recently clean flashed OB13 and here's what I did:
  • Booted to bootloader
  • Fastboot flashed the latest blu_spark TWRP
  • Reboot to recovery
  • Wipe everything (selected everything for wiping except USB-OTG, obviously)
  • Once the wipe process finished, I formatted the data partition as well
  • Reboot to recovery again
  • Copied all the zips to my interna storage
  • Flashed the zips in the following order: OOS OB13 Full Zip --> Magisk 15.4 Zip (Note that Magisk 16.x doesn't work and will error out, so use this one and then later update Magisk from Magisk Manager) --> No Verity Zip (the one by @daxiaamu worked absolutely fine)
  • Cleared cache and dalvik-cache
  • Rebooted & profit!
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,061
6,618
263
zackptg5.com
I recently clean flashed OB13 and here's what I did:
Booted to bootloader
Fastboot flashed the latest blu_spark TWRP
Reboot to recovery
Wipe everything (selected everything for wiping except USB-OTG, obviously)
Once the wipe process finished, I formatted the data partition as well
Reboot to recovery again
Copied all the zips to my interna storage
Flashed the zips in the following order: OOS OB13 Full Zip --> Magisk 15.4 Zip (Note that Magisk 16.x doesn't work and will error out, so use this one and then later update Magisk from Magisk Manager) --> No Verity Zip (the one by @daxiaamu worked absolutely fine)
Cleared cache and dalvik-cache
Rebooted & profit!
I've been working on and off the last couple months on making a more universal verity and force encrypt remover zip. Finally got it figured out. Works great for me on ob11 and liquid remix on my op5t. You won't need magisk or anything else, just this zip :)

I still want to tweak it slightly but it's complete and works flawlessly if you want to use it instead (I'll be making a thread for it this week).

Also, magisk 16.6 works fine. There's just a bug with it where you can't put your .magisk file in /data or it'll throw an error so put it somewhere else like /cache (although you won't need magisk for verity/fec removal thanks to this zip)
 

Attachments

Zackptg5

Recognized Developer
Sep 18, 2014
4,061
6,618
263
zackptg5.com
Steps to decrypt with this zip please ? i tried it and many others but couldn't decrypt my data
what i did :
reboot recovery
wipe all partitions for clean flash
format data
reboot recovery
flash rom
reboot recovery
flash no verity
reboot

and always end up encrypted
please help
Wipe all partitions (and format data), reboot to recovery, flash rom, if using oos - you may need to reboot to recovery once more, flash attached zip in my previous post on this thread
 

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
I've been working on and off the last couple months on making a more universal verity and force encrypt remover zip. Finally got it figured out. Works great for me on ob11 and liquid remix on my op5t. You won't need magisk or anything else, just this zip :)

I still want to tweak it slightly but it's complete and works flawlessly if you want to use it instead (I'll be making a thread for it this week).

Also, magisk 16.6 works fine. There's just a bug with it where you can't put your .magisk file in /data or it'll throw an error so put it somewhere else like /cache (although you won't need magisk for verity/fec removal thanks to this zip)
Thanks! This will be very useful -- one zip, instead of two separate ones for Treble and non-Treble ROMs. :) I'll test this the next time I clean flash. Also, yes, you should definitely make a new thread for this. Please also tag/mention me in the new thread (whenever you create it) so that I can update my index post and add a link to your thread in it.

On a separate note, good work on the website! I just saw it (from your signature). It's nice to have all of your mods at one place for convenience and completeness. I've bookmarked it. :good: Oh and also, I see that under the other mods section, you have the native call recording enabler sub-section as well (in Android mods). In the description, I see "..it'll run at the proper time each boot unlike the other buggy methods..". I hope you weren't referring to the other methods which I've mentioned in my thread when you said that. :p
 
  • Like
Reactions: Zackptg5

Zackptg5

Recognized Developer
Sep 18, 2014
4,061
6,618
263
zackptg5.com
Thanks! This will be very useful -- one zip, instead of two separate ones for Treble and non-Treble ROMs. :) I'll test this the next time I clean flash. Also, yes, you should definitely make a new thread for this. Please also tag/mention me in the new thread (whenever you create it) so that I can update my index post and add a link to your thread in it.

On a separate note, good work on the website! I just saw it (from your signature). It's nice to have all of your mods at one place for convenience and completeness. I've bookmarked it. :good: Oh and also, I see that under the other mods section, you have the native call recording enabler sub-section as well (in Android mods). In the description, I see "..it'll run at the proper time each boot unlike the other buggy methods..". I hope you weren't referring to the other methods which I've mentioned in my thread when you said that. :p
Thanks! This is what happens when I make last second edits late at night, I use the wrong words :(
For timing, I meant the magisk module since you can't really have it run exactly when boot completes with any boot scripts and for "buggy", that was more referring to the build prop method although buggy was definitely the wrong word to be used. Sorry about that, I just edited the description of it on the site to get rid of that (I need to proofread it in general)
 

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
Thanks! This is what happens when I make last second edits late at night, I use the wrong words :(
For timing, I meant the magisk module since you can't really have it run exactly when boot completes with any boot scripts and for "buggy", that was more referring to the build prop method although buggy was definitely the wrong word to be used. Sorry about that, I just edited the description of it on the site to get rid of that (I need to proofread it in general)
Don't worry about it. I appreciate you making the changes that you did, thanks. :) You've made some great contributions to the community, keep up the good work! :)
 
  • Like
Reactions: Zackptg5

legolas06

Member
Mar 16, 2015
25
5
0
Hi, I'm on OOS 5.1.5. Can anyone please tell me if the script linked in the OP works for that version?

I've read the above posts, but I couldn't get any clear answer as to what the correct flashing order is if I want to flash magisk too.
It would be really great if someone could post the steps to start from scratch and which version of the script to use.
TIA

Nevermind, I followed the above new thread again and it worked:
Format -> Reboot -> Flash Rom -> Script -> Magisk-> Reboot
 
Last edited:

rmroot

Member
Sep 20, 2018
42
2
0
Sorry if my questions are mainstream, I cannot find a good explanation about dm verity and no verity:
-What is exactly dm verity? What is no verity? Can you link me a complete explanation?
-Is this thread valid for one plus 5t too? Can you link me the op5t no verity thread?

Thank you !
 

strongst

Forum Moderator
Staff member
Sep 18, 2007
11,592
8,425
253
prolific location
prolific-page.com