yashsingh1/xdaforums huggingface dataset:
[Android Software Development] kewinhw:
yeah i made a backup in twrp of the boot partition. i thought that boot.img was there, but i just noticed that it is only boot.emmc.win isnt the boot partition the correct way to backup the kernel :eek: ?
[Android Software Development] Zackptg5:
Quick bug fix release - fixes system and vendor not getting mounted as rw. Sorry!
[Android Software Development] madbat99:
That's just what TWRP calls it. You can restore it by using the restore function. In the future, if you want, you can choose to backup boot.img in TWRP. The option is there in the backup menu. But that's only if you want to flash the image some other way (like fastboot) instead of restoring it. Either way is fine.
[Android Software Development] kewinhw:
My device got preserve dm verity checked.

Is there anyway to disable it? Or is the only way to do it a clean flash?
[Android Software Development] firemax13:
Will it work on 8.1 Oreo from Lineage?
[Android Software Development] kewinhw:
Yes
[Android Software Development] blakegriplingph:
Can you guys look into this? For some reason both the Universal DM and Magisk ZIPs flat-out refuse to patch the boot image, i.e. tell me that said image is invalid, on my Nabi SE running off an MT8127, but I can do a Magisk patch through the Magisk Manager UI just fine.

https://www.upload.ee/files/10013899/boot.zip.html
[Android Software Development] firemax13:
I'm Running Lineage 15.1/8.1 Oreo/r52/May 2019 Security Patch/November 2017 Security Patch it's from Lenovo K6 Note (Karatep). Would it work from my Karatep?

Can I flash this through Magisk?

I only need to disable ForceEncryt, So I need to rename the zip?

I can't mount data in TWRP because of the ForceEncrypt, even the TWRP already decrypt the data through password, still can't mount data. So Can I flash this through Magisk?

I'm worried if this will not work from my Devices because I can't access data from TWRP.

If this will cause bootloop nor anything will fail, is there another way to revert back without using TWRP?
[Android Software Development] ZeroKool76:
Has anybody figured out how to decrypt the 6T, without breaking security?
[Android Software Development] reaper000:
I'm sorry, the answer to that is unfortunately NO, to the best of my knowledge.

However, I can report that the 7 Pro has no such issue. Running decrypted with intact lockscreen security right now. Go figure.
[Android Software Development] mipirakas:
What are the steps you took to decrypt your 7 pro? And sidequestion, what is the 6t issue? Thanks
[Android Software Development] reaper000:
On a OnePlus 7Pro that already has TWRP and Magisk, this is what I did:

To decrypt:

- downloaded dm_verity disable zip, magisk 19.2, and copied them to USB drive. Also, backed up internal storage.

- rebooted to recovery

- formatted internal storage (type yes, completely formatted the data partition and lost all media, photos, downloads, etc)

- twrp factory reset

- flashed dm-verity disabler zip and magisk 19.2 from otg USB drive

- reboot to system, performed initial setup.

The issue with decrypting the OnePlus 6T was that decrypting broke lockscreen security. You could set a PIN, but subsequently the decrypted 6T would NEVER recognize that PIN again, no matter if it was correctly entered. So if the screen went off, or you rebooted, you would never be able to get into the OS again. To fix this, you had to manually delete the system files in TWRP file manager that set up the lockscreen, thereby disabling it. Pain is the you know what.
[Android Software Development] Gh0styy:
Using this on my OP5 and after booting back to system it seems that its encrypted again.

So below is the order I have tried this in. (Assume I've already backed up. I've been trying to get my phone to stay un-encrypted for more than 6 hours now...)

Format Data (woo we have access.)

Rebooted recovery (cannot access storage until this has been done. can copy files but TWRP can't see them)

Copied dm-verity_forceencrypt AND Magisk 19.2 to phone

Installed dm-verity_forceencrypt

Installed Magisk 19.2

Rebooted into System.

I have also tried installing dm-verity_forceencrypt after magisk and still nothing.

Any help would be appreciated, currently going a little stircrazy.

---------- Post added at 04:01 PM ---------- Previous post was at 03:37 PM ----------

Update - I got it to work finally after god knows how many hours... Followed the same process, instead I Installed dm-verity_forceencrypt a 2nd time but after Magisk aswell. Seems to be holding now.

Now I'm going to go scream in the corner whilst I figure out how to get adb to restore the backup I took using twrp.... (adb backup --twrp) :eek:
[Android Software Development] alecxs:
only in recovery, not a regular adb! there is just one command. So, if you did a full adb backup, make a new backup before, then restore old backup from adb, then finally restore the partitions from new backup you wanted to exclude from old backup (boot.emmc.win for example)

adb restore <host>/backup.ab
[Android Software Development] initguru:
I have exactly same situation as [MENTION=9699550]Gh0styy[/MENTION].

OnePlus 5T 9.0.5 with blu_spart twrp 3.3.0.x.. No avail to decrypt my phone.

Flashing Disable dm_verity and force-encryption zip on the stock kernel then magisk 19.2 does not work!
[Android Software Development] firemax13:
Can I flash this trough magisk in 8.1 lineage 15.1?
[Android Software Development] alecxs:
you must format data to get rid of encryption, this zip does not decrypt data
[Android Software Development] initguru:
Hi [MENTION=9699550]Gh0styy[/MENTION],

Would you please tell me the whole process you have done?

I'm having the same problem as you experienced...

Update: Successfully decrypted my phone using your procedure... dm-verity > magisk > dm-verity script again! (but I don't know why)
[Android Software Development] Gh0styy:
Looking at the terminal printout that pops up when you flash dm-verity and magisk it appears that magisk sees the modified file but may actually write over it.. so by flashing dm-verity again it fixes the issue..

Only thing that would make sense tbh

Would me not being in the dir of my backup not do the same thing? (Was running backup from recovery, didn't think it would work otherwise)

cd D:\OP5\Backups
adb restore backup.ab

Didn't realise that it would also backup partitions though thought it would only backup my appdata..

Anyways, Kind of glad i didn't get it to work.. Now have 70% of 64GB free rather than 10GB free all the time lmao
[Android Software Development] alecxs:
if adb.exe is in %path% of course every syntax will work. i just wanted to clarify that you can select partitions for creating, but not for restoring adb twrp backups. anyway this is off-topic here
[Android Software Development] ew:
Has anybody been successful in using this with a Moto G6 Plus. I tried and had trouble booting afterwards, but it may have been due to a phone issue. Just wanted to see if anybody has been successful with my device (or if it is know that this wouldn't work on a Mogo G6 Plus).

Thank you in advance for your assistance.
[Android Software Development] ParadoxLogic:
I just flashed this and i get a warning saying:

"Unable to mount /odm, partition does not exist"

But odm does exist, i can see it as an option to backup using TWRP

is this a problem? I am using Galaxy A7 2018

Thanks
[Android Software Development] StanLeY Sd:
I own a Xiaomi Device running on pie 9.0.

I haven't installed twrp yet. Can i just just install twrp and flash this zip?
[Android Software Development] tomhtg90:
u need to format the data first.
[Android Software Development] mipirakas:
No changes needed for magisk 19.3?
[Android Software Development] Zackptg5:
Nah, only thing I'm really interested in is magiskboot binary and nothing much changed for it
[Android Software Development] mipirakas:
Ok ty. And to make these zips you put all the files and folders from your git repo in a zip right? (Except the .git* files)
[Android Software Development] Zackptg5:
Ya but you could always just grab the zip from the OP and save yourself the effort
[Android Software Development] mipirakas:
Yes i know thanks. Just curious XD
[Android Software Development] ervanr:
what about a320y a3 2017, ihave problem the same
[Android Software Development] jeffreymor:
This really help a lot, thanks so much
[Android Software Development] P.Rabbit:
In post 1, in No. 4 the information is somewhat vague. What is it supposed to flash?

This step I ignored and moved on. But I was decrypted, but when I set up the fingerprint sensor and the Pin, it tells me that the Pin is wrong.

What's going on here?

The LOG:

https://is.gd/BTFOwy
[Android Software Development] archraziel:
I am using op5 with oss openbeta34 rom, when I try to flash dm-verity I get error 1

This is my installation step:

Installed openbeta OOS last version

Boot

Set up google account

Find out custom twrp is gone

Fastboot, flash blu twrp

Format Data

Transfer dm verity zip to phone

Flash

Error 1

Reboot phone

Encrypted

How can I fix this?
[Android Software Development] jahidinbedod:
after format data on twrp reboot to twrp again (don't reboot to system)

Mount system and vendor then install this file for decrypt data
[Android Software Development] reaper000:
The OP installation instructions clearly include a rooting step (Magisk), but I don't see that step anywhere in your process.

I'm afraid you'll have to do it all again. But before you format data, make sure you have both twrp and magisk on a functional, booting oos. Once you have that, then reboot to TWRP and factory reset, format data, install dm_verity zip, magisk, and reboot.
[Android Software Development] archraziel:
I forgot it, but Iam rooted with lastest magisk
[Android Software Development] brmbjn:
If you're currently encrypted:

BACKUP YOUR INTERNAL STORAGE TO YOUR PC

Format data (this is NOT the same as Wipe data)

Reboot back into recovery

what different format data and wipe data ?
[Android Software Development] reaper000:
This is admittedly confusing.

I wish that TWRP's developers had used consistent and non-confounding terminology in their product, but it's not what we have to work with, so this is roughly what's meant:

"Format Data" refers to the erasure of your internal storage -- your built-in SD card, as it were -- that includes your documents , such as photos, music, downloads, etc.

"Wipe data" refers to the erasure of the working memory of the apps installed on your device. It does NOT include your documents.
[Android Software Development] mac796:
Thanks for this. Really works good on op7pro
[Android Software Development] djdelarosa25:
How do I undo the changes that this made?
[Android Software Development] mipirakas:
Dirty flash rom and all your zips except this one. 1st boot will take long as it will encrypt your internal storage again.
[Android Software Development] djdelarosa25:
Thanks! My storage was already encrypted beforehand even after flashing this (was that normal?) and nothing seemed to change. Even after reflashing all zips, Magisk still shows the 'Preserve force encryption' box as unticked.
[Android Software Development] abeloman:
This doesn't decrypt, you must format data in order to remove encryption. After that, you can flash this, to avoid being encrypted again.
[Android Software Development] djdelarosa25:
What's the correct flashing sequence for this, vendor-firmware, and ROM?
[Android Software Development] abeloman:
1. Backup internal

2. Format data and reboot recovery

3. Flash vendor, ROM, gapps, and then Universal DM-Verity

4. Profit
[Android Software Development] alecxs:
this zip cannot remove encryption, it just remove instruction for forceencrypt (force encryption on first boot)

Magisk default behavior is to remove instruction for forceencrypt
[Android Software Development] djdelarosa25:
Thanks! So everything's fine with my setup?
[Android Software Development] alecxs:
As long as TWRP is able to mount /data, there is no need to remove encryption. As long as android booting, there is no need to remove dm-verity. It's on your opinion which settings are fine. I don't use Magisk but i would recommend to use default settings
[Android Software Development] btvolta:
I'm on havoc and want to flash back to oos and decrypt. Could I flash the stock image zip in twrp with the dm verity?
[Android Software Development] reaper000:
I would do this:

- Download the latest versions of Magisk, the dm_verity zip, twrp installer, and the most recent full OTA zip of OOS.

- Put those zips onto a USB otg drive, because you will have to format internal storage soon, and you gotta flash those files from somewhere.

- Backup whatever you want from internal storage, because you MUST format internal storage.

- Reboot to TWRP

- factory reset and wipe internal storage (you have to type "yes") I personally do this twice, but that's my OCD kicking in.

- plug in your USB otg drive, select USB as the location to flash from

- flash oos and TWRP installer

- reboot to TWRP

- flash oos and TWRP installer again (you want both slots to have the same oos base)

- reboot to TWRP

- flash Magisk and dm_verity (and I would flash Magisk again right after, but that's my choice)

- remove your USB drive

- reboot system

At this point, I've seen it reboot again by itself, seen it take quite a while. I've even seen it loop once, which made me do the exact same steps again, and the second time it took. Not to dissuade you, but I've even seen it stuck on bootloader, a soft brick from an improper flashing - it happens - that i had to use a fastboot rom to recover.

Good luck!
[Android Software Development] btvolta:
Thanks. I don't have a USB otg drive, so I've backed up my files to my pc. Couldn't I

-factory reset, then flash the full stock rom and twrp installer,

-then format data, reboot to system

- then boot back to twrp

- copy my files from pc

- flash the dm verity and majisk

- boot to system

I'm not sure if my way would work
[Android Software Development] reaper000:
What you described does not ensure OOS is identical in both slots, which is highly recommended because you want the same firmware base (oos flashes other partitions that custom ROMs don't touch) at all times.

The other thing that is absolutely mandatory is that you must format internal storage AND immediately flash the dm_verity zip before any kind of reboot out of twrp.

So without a USB drive:

-factory reset, then flash the full stock rom and twrp installer and magisk

-then format data, reboot to TWRP

- copy my 4 zips (oos, twrp, dm_verity, magisk) from computer to phone then flash them

- boot to system

I can foresee some potential issues, so I would download the fastboot oos rom to your computer just in case this loops.

Without the USB, it might be more efficient to simply use the fastboot oos rom (which flashes both slots and partitions, wipes internal storage) anyway. But you'll need to reinstall twrp from bootloader, still adb push 4 files, flash them. Huh, not much of a shortcut...
[Android Software Development] nostradomis:
ADB sideload may be a easy method.
[Android Software Development] reaper000:
Fully agree.

(I suggested copying because I'd want a copy of those 4 zips on my freshly-wiped internal storage anyways, and I don't believe sideload leaves copies of those zips when it flashes them...I could be wrong about that.. But ADB sideload is available from TWRP directly)

Edit: what the heck, I'm confused, thinking that I need to use an adb push command -- that's bootloader mode -- when I can directly copy files from the computer in TWRP....
[Android Software Development] btvolta:
That's what I was going to do.
[Android Software Development] nostradomis:
since the start was havoc unencrypted and formatted, the system has not yet created the internal file structure. mtp probably wont work at this point. install no-Verity using sideload or USB and Boot system.

system first boot creates the file structure and since you flashed no Verity you have an fstab with no Force encrypt. the structure is now created without encryption and you can go from there. at this point, I run through setup and Skip everything I can. as soon as setup finishes, I reboot recovery and copy the files from my PC back on with MTP. factory reset and reboot system and go through setup. reboot recovery and make oOS backup. you should now be able to restore Havoc provided you backed up first time.
[Android Software Development] btvolta:
Ok. I followed all the steps exactly and I've booted to system. But when I check in settings, it still says I'm encrypted?
[Android Software Development] nostradomis:
please explain it to your steps in order and I will try to help you. the order is quite important. also, which no Verity were you using and what model and oos version where you installing.

Also, check settings in twrp. 'rm -rf instead of format' has. to be unchecked.
[Android Software Development] btvolta:
I followed Reapers steps.

- First, I factory reset.

- Then I flashed oos (OnePlus7ProOxygen_21.O.11_OTA_011_all_1906160627_b59b4dfc6d8c9a.zip - ZIP archive, unpacked size 2,139,429,575 bytes), twrp installer, majisk, and disable_dm-verity_forceencrypt_05.21.2019.zip

- Then I formatted data, typed yes

- I then rebooted twrp and once again flashed oos, twrp installer, majisk, then booted system

Was I supposed to flash no verity again at that point?

---------- Post added at 07:18 PM ---------- Previous post was at 06:46 PM ----------

Yea, I just tried again, it just doesn't decrypt. Oh well, the rom booted well anyway. Thanks for the help.
[Android Software Development] nostradomis:
if you are encrypted, you have to format again. Verity will not remove encryption.

boot recovery and factory reset

install OOS

install TWRP installer and reboot recovery to change slot

format internal storage (check settings in twrp. 'rm -rf instead of format' has. to be unchecked.)

install no Verity

boot into system to create file structure on internal storage

after setup, boot to recovery and install magisk.

if you want flash no Verity again you can it won't hurt anything but it's not necessary as magic doesn't change boot

you should boot system and be was not encrypted storage
[Android Software Development] btvolta:
Thanks buddy, this worked perfectly!!

---------- Post added at 02:26 AM ---------- Previous post was at 01:35 AM ----------

Now that I'm decrypted, can I backup and restore roms even though they have a different security vendor?
[Android Software Development] nostradomis:
yes. the different patch security problem with TWRP is only do to encryption. I do some integration with Linux kernel and do restores often. in fact, I currently have four different systems back up. to back up, click data, boot, and system/vendor images.

to restore, just factory reset and restore.
[Android Software Development] btvolta:
One last question since you've been so helpful. So now to flash aosp, like Havoc, all I do is factory reset, then flash rom, twrp installer, gapps, majisk, and the no verity zip? Or, should I flash rom, and twrp installer, then reboot recovery, then flash gapps, majisk, and no verity? Does it matter what order I flash no verity? On the 5t, I always flashed it last.
[Android Software Development] nostradomis:
be careful, i think aosp uses the stock vendor image. when creating a restore point, start a with base of OOS.

flash rom, and twrp installer, then reboot recovery. it is very important to reboot recovery. this seems to be where people getting a lot of trouble. allow the A/B partitioning system take care of slots by itself. the way you used to do it on a 5T is probably okay just make sure to flash no Verity prior to booting system and you have reliable backups.
[Android Software Development] btvolta:
Please delete.
[Android Software Development] Cougar16:
Downloading zip file !

Hi all ,

The link is not working , it say bad request 404 error , please can you provide a new link to download it , thank you very much !?
[Android Software Development] Spannaa:
The download link works fine for me.
[Android Software Development] mlock420:
I've just been gathering as much info as I can before doing this nandroid back up last time I did this was on the 6t what a noobish nightmare that was.... So do we still need to get rid of any passwords and pins/fingerprint before backing up? What about getting rid of security when I wanna restore?.....
[Android Software Development] nostradomis:
I also had a bad experience with 6t, but my 5t was nice. 7 pro is very good: on unencrypted Storage security works well.

I haven't tried to do backups with security on. some say it works okay, but I don't want to have errors. I remove all security and perform the backups boot, data, system image, and vendor image. after I create backups, I copy external storage to tar archive on my Linux box with a script.

to restore, I just factory reset and restore.
[Android Software Development] Zackptg5:
Hey everyone! It's been a while thanks to life and such but I have a test build out that I'll make the next release if all goes well. Let me know if it works for you, I'm especially interested in system as root devices.

I completely revamped the zip to now use AK3 by [MENTION=4544860]osm0sis[/MENTION] and have a modified version of magiskboot in it that'll do some extra stuff for ramdisk patching :)
[Android Software Development] ZeroKool76:
Thank you. Long time and grateful user of your work [emoji869][emoji12]
[Android Software Development] :
Everything works well here.

- System-as-root
[Android Software Development] radz_:
Latest version works well for me, but I would love to have a system root again. This means flashing this zip converts magisk to system root?
[Android Software Development] amg314:
You should flash magisk_uninstaller.zip for your Magisk version in TWRP to remove all Magisk components.
[Android Software Development] Zackptg5:
Nope. It does the same stuff it always has but now should be compatible with system as root devices
[Android Software Development] str8str:
Pardon my ignorance but what do you mean by system as root
[Android Software Development] alecxs:
if you don't know it, you probably don't have it ;)

https://source.android.com/devices/bootloader/system-as-root
[Android Software Development] :
One day I'll know what it feels like to be a millionaire... ?
[Android Software Development] Arcaea:
Well, after flashing this zip, my custom rom (xiaomi.eu 10.3.1 redmi 5 plus) still encrypts my internal storage; therefore, TWRP is still unable to mount data partition when returned after the first system boot.
[Android Software Development] nostradomis:
did you start with the decrypted internal storage? if not, you will have to format internal storage before to First boot.
[Android Software Development] sga999:
I am using the zip with both dm-verity and forceencrypt in the zip filename. With this new version, it seems like the /cache/.magisk file is not being read by Magisk. Maybe it's because anykernel.sh, line 53, is removing the file right after it creates it, i.e. echo is followed by rm. But in the old version (which seemed to work well), boot_patch.sh had the rm command followed by echo. Maybe I'm missing something.

With the new version, the result is that checkmarks are both checked when I bring up Magisk Manager. For the old version, both were unchecked. I don't see any difference in the behavior, i.e. I stay decrypted either way (and I guess dm-verity is disabled either way). [MENTION=6037748]Zackptg5[/MENTION], can you tell me why these checkmarks on or off don't make any difference? I've never paid any attention to them until getting this Essential PH-1 with A/B slots.
[Android Software Development] Arcaea:
The first thing i did is go to twrp and wipe => format data => type yes, after that twrp can access internal storage so i thought internal storage had been decrypted. Then i flashed rom, this zip, rebooted to system and went back to twrp, twrp was still unable to mount data partition.
[Android Software Development] amg314:
After you reflashed the ROM, your data region will remain encrypted. You need format data and flash "this zip"))
[Android Software Development] alecxs:
i don't think so. Why should flashing a ROM encrypt data? recovery.log would be helpful