yashsingh1/xdaforums huggingface dataset:
[Android Software Development] an-_-dro:
after i made some modification (i.e deleting apps, and even deleting ringtone),my phone become unstable..some app become forceclose. this is happen if system and vendor partition modified. is that dm verity triggered? and id its true, whats the solution?

i flashed Universal dm verity, then i tried another dm verity flashable (dm verity v6..) but still no luck..

any help appreciated and thanks in advance
[Android Software Development] Zackptg5:
Updated zips to magisk 18 tools! Other than that, nothing changed
[Android Software Development] ktmom:
Once this is flashed, the forced encryption flag should be disabled. It shouldn't matter that the partition is currently encrypted, it will keep whichever state exists on boot. I would think that once FlashFire restarts the device, you should be able to shutdown, format user data and then on the next boot it should stay decrypted. Magisk should also be able to prevent forced encryption.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Software Development] alecthenice:
Thats some very valuable insight. Thank you. Unfortunately flashfire doesnt recognise my partitions
[Android Software Development] radz_:
Since 5 got Pie, will this zip still work?

I have 5T no update yet, might take a couple hours
[Android Software Development] clemenza011:
I read the OP, and before I do act I have one nOObish question ... as I am currently encrypted, and cannot access from twrp internal storage, how and where from should I 'format data' before flashing zip? Else, when I format data, and flash the zip, do I need to reflash ROM (as stated in OP), or reboot to system would be just enough to get into my old system, but just with encryption disabled?
[Android Software Development] sh0w 0f:
You can do adb sideload in twrp to flash the zip file

After flashing the zip do a factory reset and wipe cache partition then you can try to boot to your old system
[Android Software Development] clemenza011:
thanks, so in the meantime I found out that in recovery there is separate 'format data' option which should do the thing as I understood. As my twrp can access sd card, I could flash 'force encrypt disabler' zip out from twrp directly, and then I guess factory reset and wiping cache should be enough for me to get fresh system with unencrypted partitions. And of course, before doing anything, I should uninstall magisk from magisk manager, and flash it after the main procedure is done.
[Android Software Development] Zackptg5:
It should. I'm on pie on my 5t. only pie rom it didn't work on was liquid remix - it didn't patch the vendor fstab, haven't had the chance to look into why
[Android Software Development] machotecba:
[MENTION=6037748]Zackptg5[/MENTION] Awsome job, and thks for sharing. I had an issue... I lost my imei numbers, after flashing this script. I flased both, I mean, one at the time and never together.. And It takes time to boot at least 30 second.. It booted, but with invalid imei in both sims. My phono is trebelized, Oreo 8.1- Helio P23 (Mtk 6763t), with custom TWRP. Doogee S70... Thks.-
[Android Software Development] Zackptg5:
Some roms will do that if your decrypted. Nothing I can do about that unfortunately. Best bet is to flash a custom rom if available with this zip or just stay encrypted
[Android Software Development] Zackptg5:
So I looked into why vendor fstabs weren't patching on some roms and made an interesting discovery: for some reason, vendor wasn't getting properly unmounted by whatever previous zip was flashed and so vendor fstabs were never patched due to some mounting shenanigans. Easy 1 line fix (unmount vendor if previously mounted, then mount normally) fixed the problem. All zips updated with this :)
[Android Software Development] alecthenice:
Hi,

I have magisk already installed, I needed to patch the boot because my devices stock recovery had never been backed up before.

How do I go about using this .zip now? I want to make sure systemless xposed and signature spoofing module won't trigger dm verity. If this is a known issue?

Is this a concern since I unchecked the options for magisk patch for both verity and encryption?

Thank you for understanding the very small amount of support the moverio bt300 has
[Android Software Development] Zackptg5:
Magisk disables dm verity when you flash it automatically unless you have a device with system_root (which you probably don't). So verity is likely already disabled. Changing the check boxes in magisk manager doesn't do anything unless you flash magisk from the magisk manager app. So you're probably fine :)
[Android Software Development] Zackptg5:
Different users have come forward with different needs (every combination of fec, verity, and disk quota there could be) so I decided to combine them all for ease of use and ease of maintenance. Just change the zipname with whatever you want to be DISABLED. See the OP for usage :)
[Android Software Development] alecthenice:
I patched it with the magisk manager app? Is that what you mean?
[Android Software Development] Zackptg5:
Ya. Regardless, when you flashed magisk initially, it disabled verity so you don't need to flash this zip
[Android Software Development] Gary90210:
Hi! I found yesterday that current version of your script Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip won't remove device encryption from Essential phone PH-1 (codename mata) from API 27 (build Oreo 8.1 - OPM1.180104.234). I did it manually by removing "fileencryption=ice" from /vendor/etc/fstab.mata at the userdata row.

I would really appreciate if you'll add this fix to your next build. Thank you so much!! ^_^ N.b. I can test it for you if you wish =)
[Android Software Development] Zackptg5:
Can you post your recovery log after flashing the zip? It should've patched that
[Android Software Development] Gary90210:
Sure thing! Here is a screenshot of sideloading "Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip"

Right after I'm trying to check the /vendor/etc/fstab.mata, to do so I have to mount again the vendor, as it was unmounted by your script:

$ adb shell

~ # mount vendor/

~ # cd /vendor/etc/

/vendor/etc # cat fstab.mata

and in that file I still can see the "fileencryption=ice" which will trigger data encryption on every boot. Which is weared because in the script's logs it says "Patching: /system/vendor/etc/fstab.mata". May be it should patch another path like "/vendor/etc/fstab.mata" instead ?

# Android fstab file.

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/soc/1da4000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify
/dev/block/platform/soc/1da4000.ufshc/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check,formattable,fileencryption=ice,quota
/dev/block/platform/soc/1da4000.ufshc/by-name/misc /misc emmc defaults defaults
/dev/block/platform/soc/1da4000.ufshc/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait,slotselect
/dev/block/platform/soc/1da4000.ufshc/by-name/dsp /dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect
/devices/*/xhci-hcd.0.auto* auto auto defaults voldmanaged=usb:auto
/devices/*/0000:01:00.0* auto auto defaults voldmanaged=usb:auto
/dev/block/platform/soc/1da4000.ufshc/by-name/persist /persist ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/zram0 none swap defaults zramsize=536870912,max_comp_streams=8
/vendor/etc #
[Android Software Development] madbat99:
That's just recovery output in your screenshot. He wants the log. After you flash in TWRP, select advanced---> save log

What recovery are you using? Just curious why you're sideloading instead of installing.
[Android Software Development] 1aladdin1:
I intend to get rid of userdata-encryption on my phone (Xiaomi Poco F1, LineageOS 16.0, Magisk 18.0) following the OP instructions as quoted above.

Do I need to start from scratch i.e. destroy the (encrypted) content of userdata-partition or is it possible to preserve it?
[Android Software Development] mipirakas:
You will need to format your data so all your data will be lost. You can however make a backup to a pc for all your files and if you are rooted i think you can backup apps data and also copy the files over to your pc.
[Android Software Development] alecxs:
you should backup /data from twrp to preserve ownership permissions and secontext. If twrp is not able to decrypt, you can use busybox cp -ac (ext4 partition required) or tar --selinux -p from terminal emulator or adb shell. send me pm
[Android Software Development] 1aladdin1:
I am aware of the backup possibilities as you outlined (TWRP decryption works)

But what about the restore process - after userdata has been formatted? I suspect simple TWRP (nandroid) restore wouldn't work.
[Android Software Development] alecxs:
TWRP backup is fine. It stores data decrypted. Of course, you have to save twrp backup elsewhere. copy data.ext4.win* and all your pictures etc from internal storage to PC or Micro SD Card.
[Android Software Development] willcall:
I was able to restore the data with TWRP but it just got re-encrypted on the boot. I have an ASUS ZenFone 4 (2017)
[Android Software Development] alecxs:
after formatting and installing zip, restore data only. If you restore a full backup, this overwrites the previous patched boot.img (with force encryption)
[Android Software Development] 1aladdin1:
unsuccessful decryption attempt

my steps were:

nandroid backup of data partition (to internal storage)

copy whole internal storage (includes nandroid backup) to PC

format data partition

reboot to recovery

flash Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip

restore (filecopy) internal storage from PC

restore nandroid backup of data partition

reboot to system - unfortunately causes encryption again :(

what am I doing wrong?

recovery-log attached
[Android Software Development] Zackptg5:
You restored your encrypted data backup. Follow the steps on the OP
[Android Software Development] 1aladdin1:
deleted
[Android Software Development] alecxs:
[MENTION=1338566]1aladdin1[/MENTION] looking into recovery.log says, nothing is patched. This is because you have sideloaded the zip, instead of installing zip. when sideloaded the package is automatically renamed to package.zip - but new version scans filename for keywords.

edit: please note this phone has also /system_image and /vendor_image in fstab, maybe kind of protection? (not sure what it is)

[MENTION=6037748]Zackptg5[/MENTION] TWRP stores files in tar(.gz) archive, it is always decrypted before backup. even if you encrypt your backup files, this has nothing todo with android encryption, and backups will be decrypted before restoring.
[Android Software Development] 1aladdin1:
'flash Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip' must NOT be done using SIDELOAD since this would change zip-filename - credits go to @alecxs
[Android Software Development] dubblecup:
Help!

Hi guys I have been going at it now for the past 2 days trying to root my s8 plus with Novembee security patch. I have managed to get the OEM unlock option in developed settings. Installed TWRP based on several tutorials. Boot with magisk installed but whenever I try to reboot I get this message

"only original blah blah can be flashed"

Does anyone know how to remedy this?Please really wanna root. If just for Viper for android. Thanks
[Android Software Development] droidzer1:
When trying to install Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip with TWRP I repeatedly get "error initializing zip file" . This is on a Unihertz Atom with Magisk 18.0 , Oreo 8.1 and no external SD card do unless I can disable the forced encryption there is no way to do backups or much of anything with TWRP. I formatted data before attempting the install, tried the disable encrypt zip file and then tried to install magisk but it also fails with the same error so I just have to start the phone setup all over and install magisk again and restore with Titanium... Please help
[Android Software Development] 1aladdin1:
posting the recovery-log could be helpful
[Android Software Development] MMN:
I understand the purpose of this tool to remove or remove dm-varity and remove encryption.

Is it possible to enable encryption also?

Because after the installation of various custom ROMs (Jasmine - aka Mi A2) I have no chance to turn on the encryption.

I removed DM-Verity- and FEC-Postfix and used "12.16.2018.zip", but nothing changed. Do I have to install Magisk after that?
[Android Software Development] Drzhivagolikesandroid:
I'm also looking for a similar solution. But I was not able to find one. Let's hope that there is a way of encrypting a rooted phone. Please let me know if you find anything.
[Android Software Development] madbat99:
Just go into your device's settings, security, and select encrypt device.

This mod, and others like it, don't remove the ability to encrypt. They just remove the "forced" part, giving the option to encrypt or not.

Also [MENTION=284950]MMN[/MENTION]
[Android Software Development] Drzhivagolikesandroid:
Doesn't work for Samsung phones. Causes bootloop.
[Android Software Development] _Masked_:
Can I use these steps?
[Android Software Development] 1aladdin1:
of course you can, but beforehand you should explain the purpose of these steps
[Android Software Development] _Masked_:
Flash the custom ROM with no force encryption and dm-verity
[Android Software Development] _Masked_:
This sent my phone into a bootloop :(

Never mind, got it working (had to format data).
[Android Software Development] 1aladdin1:
your question is difficult to answer because the right procedure might/will be hardware-specific. Search in a device-specific thread.

A remark: TWRP is flashed in fastboot, not recovery
[Android Software Development] Livi-Tech:
Hi, is there a way to do this without causing root?

Huawei'd ID service mentions that device is rooted after using the zip file to remove encryption
[Android Software Development] madbat99:
Because you modified the boot.img
[Android Software Development] Livi-Tech:
But I flashed a decrypted data partition after revering back to 100% stock software and it still said my device was rooted, stock system, stock boot, only thing flashed was a data partition which was previously decrypted
[Android Software Development] madbat99:
If you had a stock boot.img, your device would have encrypted upon first boot
[Android Software Development] Livi-Tech:
It did encrypt on first boot but I still had the "device is rooted" message
[Android Software Development] madbat99:
I see, Huawei may have some other method of detecting root. Maybe the fstab or something is still modified.

This zip also creates .magisk and .su files in proper locations for it to do it's job. You have to remove these as well. Restoring a /data partition after flashing this would certainly leave some files. Perhaps in /adb or /data/adb. I haven't examined the whole thing.

But if you're relying on removing encryption with no traces of modified device, you may be out of luck.

You may need magisk and magisk hide fully installed.

Newer devices are not designed to run decrypted with a level of modifications
[Android Software Development] daitalos:
I use it on many devices but not on pie9 yet...will work on pie9? I want to use it on MiA2 - pie9

Thanks!
[Android Software Development] bigkfred116:
My prepaid Moto G6 play from Verizon is encrypted. Can I turn this feature off..?
[Android Software Development] madbat99:
Isn't the bootloader locked on Verizon versions? I don't think you can unlock it to even flash TWRP.
[Android Software Development] StanLeY Sd:
How to flash this on stock miui 10 ?

I would like to know how to flash this on stock miui 10.

-Rebooting into twrp.

-Format data.

-And Flashing this zip.

Is this the correct procedure?

Please correct me if im wrong. Newbie to this stuff.

Thank you
[Android Software Development] madbat99:
I think it's recommended (on some devices) to reboot recovery after data format, then flash the zip.

From OP:

If you're currently encrypted: BACKUP YOUR INTERNAL STORAGE TO YOUR PC. Then format data. Reboot back into recovery

After doing that or if you're not encrypted: Flash your rom, custom kernel (if applicable), then this zip, the magisk/supersu/other root, then anything else like gapps

This zip should be flashed after anything that modifies your boot img (like a custom kernel) but before magisk/supersu since this zip creates the files that tells magisk/supersu to not encrypt
[Android Software Development] Needpeace:
I'm trying to fix my phone back someone release tamper and fabricated information that wasn't true they also open up a public privacy share app they where breaking in to my phone for a year and a half now everywhere I go I can here back ground noise my privacy has been compromised I need help
[Android Software Development] Austcool:
[MENTION=6037748]Zackptg5[/MENTION] Does this work on Samsung devices with fused bootloaders?
[Android Software Development] Zackptg5:
No idea. If magisk works via normal flashing, this should work
[Android Software Development] StanLeY Sd:
First of all Thanks for your response.

Im not installing anything like magisk/custom kernals.

The reason i wanna install it is my twrp being replaced by stock recovery everytime...Thats why i wanna disable encryption and dm-verity to keep my twrp forever.

So, Can i flash it right installing twrp and data format?????

i may flash magisk in the future but not now.

All i want is, keeping the twrp forever.
[Android Software Development] Zackptg5:
This won't help with that. You need to delete /system/bin/install-recovery.sh script (or whatever it's called)
[Android Software Development] StanLeY Sd:
Yeah that file is is there in that path. What happens if I delete that???
[Android Software Development] Zackptg5:
That script runs a service at boot that reinstalls stock recovery so if you delete it, that won't happen
[Android Software Development] bigkfred116:
Is there any way you could check it out for me. I am new on here and I am very interested.
[Android Software Development] StanLeY Sd:
I successfully flashed this and my twrp not getting removed (Happy now).

But Su binaries still there in system and vendor.

I tried to remove them from twrp file manager but I can't get to know which files are related to Su.

I'm attaching the pic, please let me what are file I should delete to remove su binaries.
[Android Software Development] amg314:
Quote from the Opening Post:

'This zip should be flashed after anything that modifies your boot img (like a custom kernel) but before magisk/supersu since this zip creates the files that tells magisk/supersu to not encrypt'

IMO, you should unroot your device (uninstall SU) before flashintng the scrtipt.
[Android Software Development] jahidinbedod:
[MENTION=6037748]Zackptg5[/MENTION]

magisk 18.1 is out

wait for update zip :)
[Android Software Development] Zackptg5:
Updated to magisk 18.1 tools. As expected, no other changes are here so if it worked for you before, no need to change anything . Here's the relevant changes from magisk 18.1 that may apply to this mod:

- [General] Support EMUI 9.0

- [General] Support Kirin 960 devices

- [General] Support down to Android 4.2
[Android Software Development] langithitam:
Hy [MENTION=6037748]Zackptg5[/MENTION],

i;ve tried remove magisk and flash you zip, but my phone still bootlopp

i'm using mi a1 stock Noughat, no problem using magisk.

i'm using u'r zip on other device worj flawless, but can't wotk using andorid one mi a1
[Android Software Development] abdoh01:
is this work on lg k10 (lgk430dsy) encrypted ??

cause this device is fully security

i hope it works
[Android Software Development] Camomillo:
Hello, after having flashed the zip I'm now able to replace the hosts file in the system partition and it isn't automatically corrected with the original one as before.

But if I try to change larger system files (like for example a system app), my Redmi Note 5 goes to bootloop.

It's like if the dm-verity has been disabled only if you modify a little portion of system bytes? o.O

(official MIUI v9 Global Stable - unlocked bootloader - zip installed through TWRP temporarily booted without installing it permanently)
[Android Software Development] culiacanazo:
Ok, i guess the day is here. I thought it would never come, as I'm of the type to read and search and let stuff sink in and soak stuff up, try this, maybe it's that, what the hell!

But I've given up, so here it goes!

Is it a known, common, obvious, expected side effect LOSING THE SCREEN LOCK's usefulness, effectively transforming it in burden once decrypted? I'm not new to flashing and tinkering, but this is beyond me, as this partitioning certainly is (6t), for i have successfully decrypted most of my previous devices no problemo.

Let me explain in case it's unheard of (amazes me! found NADA similar

any

freaking

where

on the net...)

Decrypt=wipe, wipe=setupwizard, setupwizard=lockscreen (opt.), lockscreen=register&confirm...

So far, so good, issues arise when trying to unlock my device, NO GO!

don't use lockscreen, you say?! Nope, not an option.

What am i doing wrong? Please! I'm just at a loss, as to both what to do and what to make of this.
[Android Software Development] Zackptg5:
If you setup the lockscreen during initial setup, it'll attend at encryption. So just don't set the lockscreen up during initial setup and you're good to go (set it up afterwards)
[Android Software Development] culiacanazo:
Thank you, I'm positive I've done that as well, but yet, I'd like to log it, so what would be the best way to go about that?

As I mentioned, that's how much i try not to bug people, so much that in 8 years of actively rooting diverse devices and messing with them, I've yet to learn to take logs; there just hasn't been a need, this would be the first time...

Edit: You know what, I've done just as you suggested but I've never rebooted in between. Let me give that a go. Be back.
[Android Software Development] culiacanazo:
Nope! Didn't even decrypt! And I've tried it in Open Kirin Omni as well... Nope!

What to do? If I don't decrypt everything's good!

I'm sorry,i meant viper os, apologies... Just a mixup, let it be clear, when relaying, not when conducting. ?
[Android Software Development] getsumhax:
I use a LOS 16 ROM with Selinux disabled. I voluntarily enabled encryption and I want to go back to using it without encryption because it's causing problems with cellular reception. I have performed a twrp backup of data, system and boot. I formated data partition thus removing encryption however after I restore my backup it starts encrypting again.

I have tried the method in the OP and it didn't work probably because my situation is a little different.

Anyone have any ideas what I could do to prevent it from re-encrypting in my situation?
[Android Software Development] amg314:
IMO, this topic is dedicated to decrypting the data section encrypted by the vendor. In your case, you encrypted your device yourself. Therefore decryption procedure should be different.

I think, you should study the links like 'How to disable encryption in Android'

For example,

How to decrypt an encrypted phone and restore as is?

https://xdaforums.com/galaxy-nexus/help/how-to-decrypt-encrypted-phone-restore-t1964358
[Android Software Development] brunori:
Is there a way of disable the DM-verity and not losing my encrypted /data? Here I´m having a "verification fail" message after instaling magisk through TWRP.
[Android Software Development] Zackptg5:
OP says how
[Android Software Development] m.dam:
Need some explanation

Hi Zack,

thanks for your work. I've managed to root my phone with your system. :)

Umidigi F1 Android 9.0 patch level 20190125

Twrp

Magisk 17.3

Now i'm looking for some detail. Why did i have to decrypt the partition to get root ? Data partition should have nothing to do with this.

What's going to happen if i re-ecrypt my phone ?

Thanks