yashsingh1/xdaforums huggingface dataset:
[Android Software Development] topet2k12001:
Response

Hello [MENTION=1751428]HippoMan[/MENTION],

Just for you, I replicated the process in its entirety but this time, I'm coming from OOS 10.0.3 installed on Slot A. And having repeated the entire procedure, I can confirm the process still works. By the way, the only thing I didn't do (versus your set-up) is a custom kernel (Smurf, correct?). It's a matter of preference. I prefer the stock kernel. Perhaps in the future.

To answer your questions (to the best of my knowledge and based on the experience):

1. Essentially, the process involves a lot of "wiping" or "deleting" the "Data" partition. This alone means that you are actually wiping out the Operating System currently installed. Therefore, the process is independent of whatever OOS version you have. Having said that, please make sure to back up all your files first!

Yes, in lieu of 9.3.4. and 9.3.5, all I used was 10.0.2. I know I said I was on 10.0.3 when I started the process...that's only because I just updated my phone before I read your reply, and the only available zip that can be downloaded currently is 10.0.2.

No need to "backtrack" or "downgrade" just to follow the procedure I shared to you.

2. None except the version of the OOS that you want as an end-result, as well as the latest TWRP as of this writing, and the latest "DM-Verity_ForceEncrypt" zip file (as of this writing it's 10.20.2019 version). Follow the steps I shared to the "T!" This is my second (re) attempt and I can verify that the process works. I will repeat it one more time and will attempt to even take a video of it, if I get to borrow my wife's phone (OnePlus 6T that I handed over to her).

3. It SHOULD say "Phone not encrypted" and that is your only guarantee that you were able to follow the process correctly.

BONUS: I found this in the OnePlus 6T section. It's basically the procedure for maintaining the "decrypted" state of the device when there's a new update. :) Click Me!

ADDENDUM: I know the instructions in this thread says "flash everything first and then the DM-Verity_ForcedEncrypt Disabler last!" but...the instructions in the process I shared to you (from the other thread) showed that after you flashed this disabler and booted to Android, you can later on reboot to TWRP and flash root (Magisk)...which is what I did. The device remained in the "Phone Not Encrypted" state.

So I guess the explanation in the first post is correct: it prevents the "forced encryption at the first boot." So once you are able to prevent that (via this disabler zip file), subsequent reboots will have the device remain "not encrypted." You can flash other zips like Magisk later on.

I guess the instruction to "flash your other stuff first and then this zip last!" pertains to other things that are normally flashed along with a fresh installation of a custom ROM (most frequently that would be GApps).

Screen recording as proof: Click Me!
[Android Software Development] HippoMan:
Wow! Thank you for all of this. It's everything I wanted to know.

I now feel confident that I can unencrypt my device. I'll do it when I have enough spare time ... maybe as long as a week from now, but when I do it, I'll report back with my results.

I just have one more question. It's not a procedural question, but a question simply to help me gain some knowledge and understanding ...

I now understand that my phone is indeed currently encrypted even though I never am asked to enter a password when booting or going into TWRP or the bootloader. So is there some default password that gets used for this encryption, perhaps? Also, does this mean that if I keep flashing and reflashing ROMs the old-fashioned way (i.e., without this unencryption procedure), that my phone data will always be encrypted identically, or is it always encrypted with a different key each time I do the reflashing, even though I am never prompted for a password?

Again, this is just for my own understanding, and it has nothing to do with the actual dm-verity/unencryption procedure which you have outlined ... which I indeed do understand now after your detailed instructions and all of your explanation.

Thank you again!

.​
[Android Software Development] topet2k12001:
Hello [MENTION=1751428]HippoMan[/MENTION],

If you set a password/security lock on your device when booted to Android (e.g. PIN or Password) then that PIN/Password is the same one you'll use to decrypt the device at the prompt in TWRP upon start-up. Otherwise, TWRP uses a "default" key.

Bootloader does not require a password at all (the black screen with the green "START" text at the top).

I don't know if the encryption is done identically between reflashes, sorry. Maybe someone more knowledgeable can answer. I would like to think that the answer should be a "no," because if the answer to this question is a "yes" then that's a pretty un-secure way of doing it, in my opinion. Then again, "flash/reflash" can contextually mean different things to many members here, because "flash" can be "dirty" or "clean." Contextually when we say "clean flash" it means "fully reformatting/wiping out everything" similar to the procedure I shared to you, and "dirty flash" is, in simple terms (I'm over-simplifying this by the way) similar to when you apply an OTA update. :)

Also, while colloquially we are saying "unencrypt," it was already explained in one of the previous posts that this isn't what really happens, technically speaking. Instead, what happens is that we are "preventing the encryption from happening in the first place." It's contextually different from "decrypting the encrypted device hence unencrypt" terminology.

Sorry I didn't want to sound as if I'm nit-picking (and I apologize in advance if it comes across that way - that wasn't my intention), but just for enrichment/knowledge purposes. :)
[Android Software Development] HippoMan:
I don't take any of this as nitpicking, and I appreciate the detail in which you are explaining everything ... and it has indeed helped to increase my understanding even more.

And yes, I do know that there is no "unencryption" going on here, but rather, that encryption is just not being done in the first place. My language was imprecise when I referred to "unencrypting", and I understand what's actually going on ... i.e., that "encryption is being prevented" instead of "unencryption is being performed".

Anyway, thank you again!

.​
[Android Software Development] jjamanijjamani:
Hi all,

I'm trying to disable dm-verity on Xiaomi MI 9 and Redmi Note 8 Pro by installing Disable_Dm-Verity_ForceEncrypt_10.20.2019.zip in TWRP, however, the installation is failed. By looking at the recovery.log, I can see these messages:

ash: /system/vendor/etc/fstab.qcom: unknown operand

- Patching fstabs:

/system_root/system/etc/vold.fstab

anykernel.sh: line 145: /system/bin/toybox: not found

CANNOT LINK EXECUTABLE "chcon": cannot locate symbol "get_sched_policy" referenced by "/sbin/toybox"...

/system/vendor/etc/fstab.qcom

anykernel.sh: line 145: /system/bin/toybox: not found

CANNOT LINK EXECUTABLE "chcon": cannot locate symbol "get_sched_policy" referenced by "/sbin/toybox"...

Could somebody help me on this? I'm trying to disable the dm-verity and force encryption only and doesn't want to root my phones. 1000 thanks if somebody could help.

---------- Post added at 05:30 PM ---------- Previous post was at 05:20 PM ----------

To supplement, I can see the toybox under the folder /system_root/system/bin, through the built-in file manager in TWRP.
[Android Software Development] alecxs:
looks like a bug in Disable_Dm-Verity_ForceEncrypt_10.20.2019.zip for system-as-root devices, wait for new version
[Android Software Development] ghiri:
My OnePlus 7 running the latest Pie (OOS 9.5.8) is not encrypted at the moment and is rooted (Magisk 20.1).

I want to flash a custom kernel and keep it non-encrypted and rooted . What are the exact steps?

I would imagine flash kernel, flash Magisk and flash dm-verity. Is it correct or flashing the kernel is enough and the phone will stay as it is?

Thanks!
[Android Software Development] Zackptg5:
I actually just bought an op7pro so I'll be able to look into slot stuff now. Are you on android q by chance and still on twrp not yet updated for Q? If so, try flashing this zip first - it applies a patch to magisk util_functions to workaround the issue. To uninstall this fix, just reflash it

Quick edit here. This doesn't work for the op7pro, has different Apex setup, I'm looking into it
[Android Software Development] Vanmanman:
How do I disable/uninstall whatever this did after flashing Disable_ForceEncrypt.zip in twrp? My phone is stuck on powered by android loading screen when trying a system start up but can get to twrp recovery

I uninstalled Magisk but still stuck on powered by android boot screen with system boot... trying to avoid a wipe...

Just formatted and wiped. Hopfully this work for magisk install without bootloop miui 11. Be good to know if there was an uninstall for Disable_ForceEncrypt.zip... Maybe I was to impatient and it would have booted eventually... seemed very long though
[Android Software Development] Zackptg5:
Dropped an update! Main changes are:

Updated binaries and AK3

Attempted fixes for Android Q shenanigans (Works on my new OP7Pro on Q so I'm hoping there will be no other issues)
[Android Software Development] Zackptg5:
That's why the first step is to make a backup - there is no uninstall. It permanently patches files in boot, system, vendor, and data (and occasionally cache). If you followed the instructions in the OP and still got stuck at boot, then the zip may not have worked - either it borked the install or more likely, the rom is doing the first boot encryption which is why it's taking so long. Interrupting the initial encryption usually corrupts data
[Android Software Development] Vanmanman:
I was being a cowboy and doing it without formatting first. Don't be like me people! However did it following instructions right and now I have magisk installed properly! Very happy. Thank you! Now I just need to work out how to get my apartment fob saved to my phone :) This stuff is so fun and cool
[Android Software Development] koyo:
So is there something about this that just doesn't work in Motorola phones? I'm looking through the thread and theres not a single person who got this to work for a Moto phone
[Android Software Development] jjamanijjamani:
Thank you for your quick response. I am using android pie, not Q
[Android Software Development] Zackptg5:
Dropped another update. Did some more research and testing and have a real solution now for Q by actually mounting all of the apex stuff so it should be good to go for Q now
[Android Software Development] Zackptg5:
Can you try new build I uploaded today and let me know how it works?
[Android Software Development] koyo:
I would if I needed it. But I used an older build and now everything is working fine. I'll keep this new version on my phone though when I ROM hop in the future
[Android Software Development] adrianogoes:
Hi!

Does this new version works fine with Magisk 20.1?

I'm asking because when I last used version 10.20 with Magisk 20.1 did not go well: bootloop (Moto G6 XT1925-3).

Had to use Magisk 19.4 instead that worked fine with your great software version 10.20.

Thanks!
[Android Software Development] Zackptg5:
Magisk version doesn't affect this zip, it'll work the same regardless
[Android Software Development] str8str:
This new version is the one in download in op? Wondering cause there is no option
[Android Software Development] Zackptg5:
It's the download link in the very bottom of the OP. The URL never changes: https://zackptg5.com/android.php#disverfe
[Android Software Development] the_wall_eater:
Verity problem

Hi! I have a problem installing the latest version. Here's how it compares to the May 21st version:

After installing 18.12.2019 version:

walleye:/ # getprop | grep verified
[partition.vendor.verified]: [2]
[ro.boot.verifiedbootstate]: [orange]
walleye:/ # mount -o rw,remount /vendor
walleye:/ # cp /vendor/lib64/libgcs.so /vendor/lib64/libgcs.so.123
walleye:/ # ls -al /vendor/lib64/ | grep libgcs
-rw-r--r-- 1 root root 14952 2009-01-01 11:00 libgcs-calwrapper.so
-rw-r--r-- 1 root root 23608 2009-01-01 11:00 libgcs-ipc.so
-rw-r--r-- 1 root root 14896 2009-01-01 11:00 libgcs-osal.so
-rw-r--r-- 1 root root 35672 2009-01-01 11:00 libgcs.so

After installing 21.05.2019 version:

walleye:/ # getprop | grep verified
[ro.boot.verifiedbootstate]: [orange]

Pixel 2, Android 8.1.0, TWRP 3.3.0-0

The presence of Magisk 20.1 doesn't affect the result.

[MENTION=6037748]Zackptg5[/MENTION], could you help out with this? I can send detailed installation logs if needed
[Android Software Development] Zackptg5:
Could you send full recovery log after flashing old and new one? Here's what I have with latest (and works fine)
[Android Software Development] the_wall_eater:
Old:

pastebin.com/11csZNGx

New:

pastebin.com/Ai7KT6gL
[Android Software Development] Zackptg5:
So what is the exact issue? Is verity still enabled? Magisk manager check boxes usually tell you.

Regardless though, looks like I forgot bout dtbo patching when I migrated this to AK3 :eek:

I'll fix that and post a test build here some time tomorrow

Scratch that, I do have it in there. Logs are definitely different but I'm not sure if that's because things didn't run or because magiskboot behaves differently now. I'll post a debug version tomorrow
[Android Software Development] Mervingio:
No for OP6T right?
[Android Software Development] Zackptg5:
Don't have an OP6T to test it on. Give it a go and see what happens
[Android Software Development] the_wall_eater:
Verity is enabled (after the installation), and I can't write to the protected /vendor partition, that's the issue. Check my first post for details: the cp command works fine, but the file is not actually copied.
[Android Software Development] Zackptg5:
Ok, so I looked it over more in depth and found some bugs with DTBO patching so hopefully that's the issue. Also looks like magiskboot isn't fully working either. Once I get home later today I'll fix those and drop a new build
[Android Software Development] Zackptg5:
Can you try this build and post the recovery log (added debug stuff)? Fixed bug in dtbo patching (should only affect non-magisk users), fixed a bug in my modded magiskboot binary (this could be the culprit), and fixed bug with slot devices
[Android Software Development] the_wall_eater:
recovery.log: paste.omnirom.org/view/97f32d17

walleye:/ $ su
walleye:/ # getprop | grep verified
[ro.boot.verifiedbootstate]: [orange]
walleye:/ # mount -o rw,remount /vendor
walleye:/ # cp /vendor/lib64/libgcs.so /vendor/lib64/libgcs.so.123
walleye:/ # ls -al /vendor/lib64/ | grep libgcs
-rw-r--r-- 1 root root 14952 2009-01-01 11:00 libgcs-calwrapper.so
-rw-r--r-- 1 root root 23608 2009-01-01 11:00 libgcs-ipc.so
-rw-r--r-- 1 root root 14896 2009-01-01 11:00 libgcs-osal.so
-rw-r--r-- 1 root root 35672 2009-01-01 11:00 libgcs.so
-rw-r--r-- 1 root root 35672 2019-12-23 13:41 libgcs.so.123

Screenshots: imgur.com/a/NA0qtSc

---------- Post added at 01:09 PM ---------- Previous post was at 01:05 PM ----------

There is also a minor issue with the installation. This pops up right after installing:

imgur.com/a/zWNmT0y

Probably you could help out with that as well
[Android Software Development] Zackptg5:
Could you post the twrp recovery log after flashing it? What rom are you on?
[Android Software Development] the_wall_eater:
Is this log what you were asking for?

https://paste.omnirom.org/view/97f32d17

Not sure about rom. If you mean device image, then it's https://developers.google.com/android/images#walleye 8.1.0 (OPM2.171026.006.G1, Jul 2018). Last official factory image for 8.1.0
[Android Software Development] clsA:
Just posting to say thanks

I'm working with an Lenovo P10 Tablet and your Disable_Dm-Verity_ForceEncrypt_12.18.2019.zip worked like a charm

The tablet is on Pie and we have been unable to get Decryption/Encryption working in TWRP but using this solves the problem for now.
[Android Software Development] Zackptg5:
Ya, that log was the kind I was asking for. It showed that there was still a segfault happening from magiskboot in the logs. Think I found the error so can you give this a shot and post recovery log like before?
[Android Software Development] Zackptg5:
Merry Christmas everybody! Posted another build - lots of bug fixes - think I got everything ironed out. Here's the changelog:

Added vol key selection method for adb sideloading

Fixed dtbo patching bugs

Fixed magiskboot bug

Ignore twrp fstabs if installed in boot img (system as root devices)

Add x86 chromeos support

Fix apex mounting

Misc bug fixes/improvements
[Android Software Development] the_wall_eater:
It's working fine!

Test version log: https://pastebin.com/yuSq0KPt

Christmas version log: https://pastebin.com/JvWkvGbL

Magisk screenshot: https://imgur.com/a/6bC7mEB

Internal problem popup still appears though: https://imgur.com/a/HyKknIV
[Android Software Development] Zackptg5:
Great! Not sure about the error though. Sometimes vendor and system version mismatch can cause that
[Android Software Development] CMBoii:
Does the android version matter?
[Android Software Development] Zackptg5:
Nope (It does for how this mod works but it works with all of them that have it)
[Android Software Development] Zackptg5:
Pushed one last update today - changelog:

Made apex minor devices dynamic - thanks to [MENTION=4544860]osm0sis[/MENTION]
[Android Software Development] CMBoii:
Ok gonnna install it after flashing los16 (android 9) thank you.
[Android Software Development] thaolegend:
Does anyone like me after flashing dm-verity version 12.27.2019 reboot it will security functions such as fingerprints or screen locks unusable?

my device redmi note 7
[Android Software Development] shahzeb khattak:
Hello , the only reason i wanted to flash this zip was to mount data partition after booting the Rom and restarting to recovery. But i cant still mount Data partition however i can now see "Encrypt Device" option in Lockscreen Settings which means Device is not encrypted now, then why woult it not let me mount Data Partition in TWRP? Please Help!
[Android Software Development] Zackptg5:
You mean there's a passcode to data and so twrp can't mount it? In that case, you need to format internal storage (backup everything from it to your PC first). Otherwise I'm not sure what you mean
[Android Software Development] shahzeb khattak:
No! Whenever i do Format Data , I can Mount Data Partition in TWRP if i dont boot to System. But when i finally boot to System and Restart to recovery then i can no longer boot Data in TWRP. So i thought that is because of the encryption. And there is no "Encrypt Device" option in settings. So i Flashed your Zip as mentioned in instructions. Now i can see "Encrypt Device" in settings but still i can not Mount Data Partition in TWRP. :(:(:crying:
[Android Software Development] JonathanFreeze:
Can i install this then install magisk? So my data is not gonna be encrypted anymore or should i only flash the magisk?
[Android Software Development] saiz0313:
Help!

My redmi note 8 pro had some issues.

I flashed AOSP 10.0 v209 of phhusson,disabler 2019-12-27,magisk v20.2

but both failed of SafetyNet.

My steps:

1.Boot to TWRP,wipe data,2cache,system,and format /data

2.Reboot to TWRP,flash AOSP 10.0 v209

3.flash magisk v20.2

4.flash disabler 2019-12-27

5.boot to system

which error ?

sorry for my poor English.

Thanks for your reading.
[Android Software Development] ktmom:
https://www.didgeridoohan.com/magisk/MagiskHide#hn_Passing_SafetyNet_1
[Android Software Development] saiz0313:
error after flashed disabler.

TWRP:

update partiton-list...

mount /nvdata failed:no such file or directory.

it's serious?
[Android Software Development] Zackptg5:
Updated the zip to latest AK3 and magisk logic
[Android Software Development] Zackptg5:
Updated zip with ak3 hotfix
[Android Software Development] enetec:
Bootloop issue!!!

Hi, [MENTION=6037748]Zackptg5[/MENTION], I've a bootloop issue with your patch I'am not able to solve. :rolleyes:

My phone is a Moto Z2 Force with Android Pie installed.

I wanted to use your script to remove "forced encryption".

I downloaded your latest Disable_Dm-Verity_ForceEncrypt_01.14.2020.zip, gone to TWRP, formatted /data and installed your zip.

First boot all ok.

As soon as I enter in Magisk Manager (v.7.5.1 with Magisk v.20.3) it says it will need to download some more files to Magisk to work, I press OK and it fastly downloads something and reboot. Since then I got an early stage bootloop.

If I wipe /data it works for first boot, but as soon as I reenter in Magisk Manager it happens again.

If in TWRP I reflash your zip the bootloop issue doesn't solve. If I reflash Magisk neither.

I've even tried to "unistall" your patch by reflashing stock boot.img (and TWRP...), but it seems to remain active anyway (I'm no more encrypted...) and the bootloop issue return as soon as I reactive Magisk.

How can I solve this?

What I need to reflash to eventually remove your patch at all?!?

Please let me know ASAP because now I'm stopped in my installation.... :rolleyes:
[Android Software Development] Zackptg5:
Sounds like an issue with magisk, not this zip. As to why you're still unencrypted with stock boot img, it may be because your fstabs are in vendor/etc (this zip patches them too)
[Android Software Development] Er. Aditya:
i have kind of same issue my device bootloops , what can be try to avoid bootloop ?
[Android Software Development] enetec:
Ok, so what I need to reflash to revert to stock?

(read: what partitions are affected by this mod? boot.img & ??? :confused: )
[Android Software Development] Zackptg5:
Boot and sometimes system and vendor

Edit: forgot that it can also edit odm and nvdata if there are fstabs there
[Android Software Development] enetec:
Just FYI... I (quite...) fully reflashed the phone and now Magisk is working with no bootloops (on encrypted /data obviously...).

So there is some type of uncompatibility between your script & Magisk (or between Magisk and unencrypted /data, but I think this less probable... :confused: )

Hope this can help development...
[Android Software Development] APC73:
Hi all just flashed the latest version on a moto e5 play. Everything seems to work great rebooted phone checked and phone is decrypted :)

only problem is when i reboot back into TWRP internal storage is at 0MB?
[Android Software Development] vtec303:
I am still using the one from 5/21/2019 and is working perfect, oneplus 7 pro, decrypted, OOS 10,
[Android Software Development] aaanonymous:
I use the 2019-08-20 build on my Motorola Moto G6 XT1925-6 (ali) phones to flash the latest RETAIL firmware builds when it comes out. I found out by trial and error:

1. Flashing 2019-08-20 build first then flash Magisk (without erasing Data or Cache), results with a successfully updated phone ready to use with all apps working.

2. Flashing Magisk first then the 2019-08-20 build results in a boot loop. Phones never boot to system.

3. Flashing any of the newer builds, whether Magisk or the DM-Verify_ForceEncrypt Disable is flashed first, results in a boot loop. Phones never boot to system.

Has anyone else experience this?? Thanks in advance
[Android Software Development] Er. Aditya:
Any way to get this on devices without twrp
[Android Software Development] AshhRED:
1. Patch your boot.img with MAGISK

2. Unlock BOOTLOADER

3. flash patched_boot.img via FASTBOOT

4. use RASHR app to flash (.zip) files with RECOVERY-SCRIPT-MANAGER

---------- Post added at 08:09 PM ---------- Previous post was at 08:01 PM ----------

Had the same problem

1. BACKUP your DATA

2. boot into TWRP

3. select

WIPE=>FORMAT=>type YES=>ENTER

4. Should fix the INTERNAL OMB issue..
[Android Software Development] Zackptg5:
Updated the zip to latest AK3 and changed fstab patching so it only searches vendor/etc now - only place they'll be other then boot img. No longer remounts system as rw unless it contains vendor (no vendor partition)
[Android Software Development] Er. Aditya:
I dnt think the app supports android 10 and new samsung devices