yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Zackptg5:
[MENTION=9764265]WoKoschekk[/MENTION] just deleting the init.mmi.hab.rc script should be fine correct?

I have a test build here (completely untested by me since I don't have fully working twrp on any of my devices so flash at your own risk). Changelog:

* Updated to latest ak3

* Updated magisk tools to v21 tools

* Added removal of /vendor/etc/init/hw/init.mmi.hab.rc

If people could save the recovery log and post it if there's issues or report that it works, that'd be great

Edit: link removed
[Android Software Development] WoKoschekk:
Yes, this should be fine. I tested it a few weeks ago on my Moto G6+ without any problems. I would like to try your .zip, but unfortunately I'm not able to download it. Link dead?
[Android Software Development] Zackptg5:
Guess xda is still having attachment/server issues. Updated the prior post with different link location
[Android Software Development] WoKoschekk:
Yes, got it. I'll try it out and let you know. ;)
[Android Software Development] WoKoschekk:
Moto crap successfully deleted! :good::laugh:

No problems found. Encryption and dm-verity are disabled, Magisk v20.4 runs.

Thank you very much!!!
[Android Software Development] alexenferman:
Thanks
[Android Software Development] Zackptg5:
Awesome! If some more people can confirm it works, I can call it "stable"

I didn't make too many changes to I'm pretty confident it'll be fine
[Android Software Development] Camerado:
Still not working on devices with dynamic partitions? Only Magisk for them?
[Android Software Development] Zackptg5:
Ya, don't know there. I didn't think twrp fully supported any dynamic partition devices yet? Without fully functioning twrp, this mod won't work
[Android Software Development] Zackptg5:
Edit: double post
[Android Software Development] Zackptg5:
Made the last test build official! Changlog:

* Updated magisk tools to v21 (will likely fix problems with newer roms)

* Added moto workround (removal of /vendor/etc/init/hw/init.mmi.hab.rc) - thanks to [MENTION=9764265]WoKoschekk[/MENTION]

Note that I still don't have a fully working twrp on any of my devices so and this build is UNTESTED by me. Other users report it works fine and I didn't make any earth shattering changes or anything so I feel pretty confident that it's fine
[Android Software Development] loopypalm:
oh ! new release ^^

where can i find the changelog ?

Edit :

nevermind ... i saw it ^.......^
[Android Software Development] H4X0R46:
I have it a try myself to no avail. OnePlus 7 Pro running on Beta 19 with Magisk v21. It's an endless boot animation for me. OnePlus is doing something strange with their newer builds and I have no clue what it is!
[Android Software Development] jahidinbedod:
same as on OnePlus 7T Pro too
[MENTION=6037748]Zackptg5[/MENTION]
[Android Software Development] Zackptg5:
Hard to debug since I don't have the device anymore.

I'll need recovery log after flashing zip, exact steps you took/what you flashed, and logcat (grab it via adb)
[Android Software Development] WoKoschekk:
Attached you'll find a Magisk module which creates a log of dmesg and logcat during boot every time you start the phone. The logs will be stored under /data/local/boot. Flash it via TWRP or Magisk Manager. It's perfect to create logs of any bootloop. ;)
[Android Software Development] H4X0R46:
Dude you rule! Alright Zack, I got a busy day ahead of me today but I'll give this all a go when I get a free minute. Thanks all!
[Android Software Development] H4X0R46:
Question, if I start an adb logcat while in TWRP, will it continue through the boot sequence? The zip [MENTION=9764265]WoKoschekk[/MENTION] gave me always shows a blank file, doesn't work as expected. I'm gonna try to test this today if I can, life's been busy lol
[Android Software Development] Zackptg5:
No, all processes restart on reboot
[Android Software Development] WoKoschekk:
[MENTION=5465744]H4X0R46[/MENTION] it's completely blank, 0 byte?
[Android Software Development] H4X0R46:
Not blank blank, it has the header info about the module and such, but nothing is recorded. Does it only record errors? I tested it with my phone fully functional.

---------- Post added at 07:21 PM ---------- Previous post was at 07:10 PM ----------

Alright, how would I go about getting a logcat during boot? Just run the adb command again while it's booting?
[Android Software Development] robygt:
Hi guys, I'm trying to stay unencrypted after formatting my Poco F2 pro but seems I'm doing something wrong because after I flash .zip and reboot I'm always encrypted, never happened on other devices. ಥ_ಥ

I'm using MSM-extended on Android Q, but happened with other roms either.
[Android Software Development] WoKoschekk:
Try this one, I took another command to grep the log.
[Android Software Development] Zackptg5:
Updated verity zip! Changelog:

* Updated volkey methods - no need for programming step anymore
[Android Software Development] Reechings:
Can anyone confirm this works on android 11 roms (OnePlus 7 Pro would be extra helpful). Thanks
[Android Software Development] H4X0R46:
It does not. Not on the 7 Pro at least, just tried the latest build on my 7 Pro.

---------- Post added at 03:15 AM ---------- Previous post was at 03:07 AM ----------

Okay [MENTION=6037748]Zackptg5[/MENTION] I was only able to get the recovery and kernel log from this.

Link: https://www.sendspace.com/file/uhysvt

I couldn't for the life of me get a boot logcat because the system leaves me on an endless boot animation where adb will not even register a device, I even used the zip that was given to me to get boot logs but even that shows up blank. The phone must really freeze up at an early stage of the boot process.

what you'll see here is me flashing Magisk v21, your decrypt zip, and then an India partition deleter zip (kinda standard for this device if you don't live in India, and I don't). I hope this can help in some way.

Just a reminder, OnePlus 7 Pro on Open Beta 19.
[Android Software Development] kevinthug:
Did you got it work? I have the same doubt, but i have no idea. long time i did with my oneplus 3t, don't know anymore.
[Android Software Development] robygt:
Waiting for a custom kernel to be released and trying with that. ¯\_(ツ)_/¯
[Android Software Development] Zackptg5:
No errors in the recovery log. The only thing different that this zip would do from magisk installer in your case is vendor fstab patching which seems to have worked fine. I'm not really sure what the problem is at this point :(
[Android Software Development] alecxs:
How can you know? You don't have any log about if or what is changed in fstabs
[Android Software Development] WoKoschekk:
https://xdaforums.com/showpost.php?p=83863243&postcount=1164

see line 916
[Android Software Development] Zackptg5:
Log showed no errors in the patching and I unpacking the rom myself to look at the fstabs and nothing changed there from previous oos versions
[Android Software Development] alecxs:
the log only tells you on which files it ran sed, it doesn't make a diff on that files before/after so you simply can't know :confused:

if guacamole is running with magisk but boot loops with this zip, and the only difference between magisk and this zip are patched vendor fstabs, i recommend to check fstabs ;)
[Android Software Development] GetRektBoy724:
not working on xiaomi redmi 6

hey i have an issue,my force encryption is still enabled but dm verity was already disabled.i use xiaomi redmi 6 global (cereus)

for more detail see on your github page of this project
[Android Software Development] WoKoschekk:
To check encryption:

Start TWRP > mount /vendor > open terminal > run

cat /vendor/etc/fstab.* | grep force

blank output = encryption is disabled

output message = encryption is still enabled
[Android Software Development] GetRektBoy724:
ohh ok thx for the reply.i will check it later,but what if i get blank output but the twrp still ask for password?

what should i do?
[Android Software Development] WoKoschekk:
First you should check it and then we will see.
[Android Software Development] GetRektBoy724:
oh ok
[Android Software Development] GetRektBoy724:
ok i get some output in here

https://drive.google.com/file/d/1mGy3lynz8U9L0vNqnDN5Gih4PPw7UXFi/view?usp=sharing

what should i do now?

---------- Post added at 12:13 AM ---------- Previous post was at 12:10 AM ----------

I Want To Install Magisk...Here Is My Steps :

1. Format The Phone With fastboot format userdata

2.Still on the Fastboot mode, flash twrp (i use twrp v3.2.3-1)

3.Go To TWRP and flash the MIUI Rom (I use MIUI cereus 8.11.8 Global)

4.Still on the TWRP, flash Magisk 21.0

5.Still on the TWRP again, flash The Disable DM-Verity And Force Encryption (I download it from here)

6.And The last thing....reboot to system

And yeah it boots successfuly...and also the DM-Verity was disabled (How do you know you ask?Cause the TWRP was not resetted to Mi-Recovery after booting into system and the Magisk installed successfuly)

However if i go to the TWRP after booting into system,the TWRP still ask for password and my internal storage show 0mb

(It shows that the encryption is still there, right?)

What do i do wrong ?
[Android Software Development] WoKoschekk:
I've found today (on my Moto G6+) that TWRP isn't being able to mount /data correctly after fastboot erase userdata. But after a second format by TWRP it was mounted. Check the output screen on TWRP for that.

Two questions:

1. Why not using official TWRP v3.4.0-2?

2. Is the recovery flashable ROM a full ROM?

---------- Post added at 04:44 AM ---------- Previous post was at 04:35 AM ----------

And don't use Magisk v21.0 for your ROM. For Android 9 and below it's better to use v20.4
[Android Software Development] WoKoschekk:
You can try this:

With your device's configuration (Magisk+TWRP installed, but still encrypted) open the fstab file and change it manually. Then boot into TWRP, format /data and reboot into system => device should be unencrypted.

Another option is:

1. start TWRP

2. format /data (it's always recommended to reboot TWRP or into system after that!)

3. flash your ROM

4. flash Disable DM-Verity And Force Encryption

5. boot into system without installing Magisk

=> check if you are unencrypted

On the one hand there's encryption and dm-verity. But on the other there's Magisk.

To unencrypt your device you need to change /vendor/etc/fstab.*. But the dm-verity process prevents any changes on /vendor and verifies the partition before it will be mounted. The process is set in your kernel and the same applies to /system.

Magisk is a systemless root method. It only needs your boot.img and /data. It won't do any changes on /system.

So, installing Magisk successfully can't be a proof for disabling dm-verity. But if TWRP won't be replaced by your stock recovery then it is, because TWRP has to patch a script for that stored on /system.
[Android Software Development] GetRektBoy724:
Two answers:

1.I found a thread on xda developers forum that it should be better to use twrp 3.2.3 on miui 8

2.Ofcourse...i download it at xiaomifirmwareupdater.com ,you can download firmware and rom on there

3.do you have magisk v20.4 ??cause i cant find it anywhere.

---------- Post added at 11:09 AM ---------- Previous post was at 11:00 AM ----------

[/COLOR]

ok,i got some replies for you :

1.cause i dont use password or pin or pattern,but twrp still ask me for password,so i cant unlock the encryption.i always use

fastboot format userdata

to format /data partition

2.cause i cant unlock the encryption on the twrp,i need to use the adb pull and push method to take the fstab,edit it and put it back,is that okay?

3.does flashing the ROM again will replace the old fstab?

4.if i dont flash the magisk and the device is unencrypted(which is my mission is successful),can i flash the magisk after that ?

sorry for lot of questions... :D

---------- Post added at 11:33 AM ---------- Previous post was at 11:09 AM ----------

i also always check my encryption with

getprop ro.crypto.state

on termux or adb shell

do you have a proper and accurate way to check if my dm-verity is enabled or disabled ?

---------- Post added at 11:37 AM ---------- Previous post was at 11:33 AM ----------

do you know an android version that didnt have dm-verity and force encryption?

or do you know a rom that use an android version that didnt have dm-verity and force encryption that works for my Xiaomi Redmi 6 (cereus) ?
[Android Software Development] ashish1989:
Unable to mount storage 0 mb data in samsung j500f

Any solutions???
[Android Software Development] radz_:
[MENTION=6037748]Zackptg5[/MENTION]

What's the proper way of flashing this zip with Franco kernel?

The instructions that you have provided in the OP is contradicting to osm0sis steps when using Anykernel2.

Check this post.

https://xdaforums.com/showthread.php?p=77411358
[Android Software Development] Zackptg5:
This zip doesn't use ak2 and so the reasoning behind wh6 the flashing order is different. The main reason is because it creates the .magisk and .SuperSU files that tell magisk and SuperSU to not enforce force encrypt and dm_verity. These files need to be present before flashing the root solution.

AK2 is typically used for custom kernels so although the reasoning to flash that last it a good point, there's the possibility that the a kernel enforces force encrypt and so it should be flashed before this zip. If you know for sure the kernel doesn't enforce it, then you can flash it after like osm0sis recommends.

I always just backup my boot img in twrp before doing anything so I can always restore it, flash different kernel, then other stuff as described in the OP. I also don't switch kernels much ever other than updating it and stick with magisk beta releases so the magisk backup isn't really an issue for me. I actually prefer magisk back up my custom kernel, force encrypt disabled boot img
[Android Software Development] JEANRIVERA:
this didn't work on HTC U12+ on a Pie treble rom or Pie GSI to be exact it still encrypt on first boot maybe it need some adjustments done for Pie
[Android Software Development] ttocs99:
Hi could this be dirty flashed if all set up? I have a cubot dinosaur and when I flashed crdroid for it. It force encrypted and I wouldn't mind disabling the encryption
[Android Software Development] JEANRIVERA:
It doesn't work like that busy this needs to be flashed before first boot after data wipe since it prevents encryption it doesn't take it away once is someone only way to do it is wiping data and then flash this before first boot
[Android Software Development] ttocs99:
I just format data and set up as usual and what do you know, no encryption and I didn't have to Install this mod but keeping it if anymore problems arise and thanks for your information I hit the thanks button.
[Android Software Development] madbat99:
Crdroid probably has force encryption removed already. Just needed a format to remove prior encryption.
[Android Software Development] Zackptg5:
Update both zips with new magisk 17.1 stuff! I also changed the versioning schema to just use the date instead of a version number - just makes more sense this way
[Android Software Development] :
Flashes ok on essential phone, but bootloops.

Edit. It worked. I am decrypted
[Android Software Development] xpil:
Help needed for T825

I have a T825 (Samsung Tablet s3) with stock rom and not rooted. I have downloaded this universal zip and also magisk. Via Odin I can flash the proper twrp for T825. What Should I do after that?
[Android Software Development] robsonbyte:
It does not work on the G955FD with the latest August update patch.
[Android Software Development] :
This zip is a miracle. Nicely done. Essential users don't have to disable security anymore before booting into twrp.

Thanks!
[Android Software Development] xpil:
I can confirm that it works with SAMSUNG S3 TABLET (T825 LTE).

Thank you so much....
[Android Software Development] fixapn:
thanks for it

awsome sharing
[Android Software Development] NexusRunner:
disable DM_Verity only

May I propose an even tinier version that only disable DM_Verity? It might help installing GSIs.

DM_Verity has to be disabled to boot GSI on stock kernel for most project treble devices. For this purpose, Magisk installer is not a good choice because it's not yet that stable with Android Pie and often causes bootloops itself. I use OP's disabler and got many successes on different devices.

Problem is, if ForceEncrypt is also disabled, if we format /data (which is often required to switch from stock ROM to GSI) the device won't encrypt automatically. And in many ROMs the built-in "encrypt your phone" feature is buggy, it renders /data unreadable after hours of running, then you have to format /data again which means it's still unencrypted... So we practically lose the encryption feature on many custom ROMs.

I took OP's zip and deleted a few lines related to ForceEncrypt, and make it a DM_Verity disabler that leaves ForceEncrypt untouched. With this zip, I successfully installed phh's AOSP 9.0 on Mi 8 SE with encryption forced on. I attached it here hope it would be helpful.
[Android Software Development] Zackptg5:
I mean, the main point if disabling force-encrypt is so you can stay decrypted and never be encrypted again. None the less, wanting to only disable dm_verity is a fair point (I didn't think about treble roms). Updated the website with a dm_verity only disabler (it's the same as yours except I modified the echo's). Thanks!
[Android Software Development] daitalos:
Great job! I tried it yesterday in Nexus9 & fire-ice kernel (in nexus9 works correct & with stock rom)

It works very well ....In the past I used fed-patcher & works well,but modifies the boot.img etc..

Thanks & sry for english
[Android Software Development] jult:
My Note 9, N960F, is rooted through OEM Unlock > Factory Reset > Odin > TWRP > (decrypt) format /data > Magisk install.

According to Magisk I can do OTA or SamFirm updates and go back to root again.

I tried this, but it failed, I assume because the Samsung fw looks for encrypted /data partition?

Is your dm-verity force encrypt disabler of any use here? I.e. the question then is;

How to best upgrade a rooted stock Samsung rom (with altered and deleted files under /system), without losing /data again?

Thanks for any and all clarification.
[Android Software Development] droople:
Hi there, i tried on my redmi K30 pro, seems not working :(

and here is the recovery log.
[Android Software Development] Zackptg5:
Looks like your device has a super partition layout and twrp can only mount system and vendor as read only. This won't work in that situation
[Android Software Development] GetRektBoy724:
Pls [MENTION=6037748]Zackptg5[/MENTION] i use your zip and my force encryption is still enabled....

---------- Post added at 11:19 AM ---------- Previous post was at 11:19 AM ----------

Pls [MENTION=6037748]Zackptg5[/MENTION] i use your zip and my force encryption is still enabled but my dm-verity was disabled.i use miui 8.11.8 on redmi 6 cereus
[Android Software Development] droople:
Thank you mate.

Although I don't quite understand what is a super partition, it must be a very tough issue.
[Android Software Development] WoKoschekk:
https://source.android.com/devices/tech/ota/dynamic_partitions
[Android Software Development] droople:
Thanks a lot. Now I understand.
[Android Software Development] sibikallikkat:
Does the latest version work with android 11 and with a working twrp in place?

I mean can we decrypt latest oneplus 8 on android 11 by flashing this zip???

---------- Post added at 08:42 PM ---------- Previous post was at 08:41 PM ----------

Does the latest version work with android 11 and with a working twrp in place?

I mean can we decrypt latest oneplus 8 on android 11 by flashing this zip???
[Android Software Development] Zackptg5:
Probably not at this point for the same reasons gone over in previous posts
[Android Software Development] ultradj83:
Hi guys.

Just a simples question.

Does disabling dm-verity unlock bootloader?

Regards
[Android Software Development] WoKoschekk:
no
[Android Software Development] ultradj83:
OK, the question was about the problem with SafetyNet that controls bootloader actually.

Does this mean I can disable dm-verity, install TWRP, Viper4Android and manually do any other modification to system files without to compromise SafetyNet status?

Regards
[Android Software Development] WoKoschekk:
An unlocked bootloader will compromise SafetyNet status. Magisk is able to fix it and hides the unlocked bootloader.
[Android Software Development] ultradj83:
How do you hide the unlocked bootloader with magisk?
[Android Software Development] WoKoschekk:
by flashing it
[Android Software Development] ultradj83:
Google changed SafetyNet recently.

Now it checks device's bootloader by processing its hardware key server side, so as far as I know Magisk can't hack this.

To install Magisk you need to unlock bootloader, so you loose Safetynet certification.

Apps are being updated to use Safetynet, my bank apps refuse to run and soon many other apps will do the same.

At the moment there's only one workaround by MagiskHide Props Config module, it works around by changing device fingerprint, in this way Safatynet thinks to have no hardware verification support and backs up to basic software verification; unfortunately Google will close this soon, so we'll have to choose between root and many apps.

I actually use Magisk only to have Viper4Android and edit DAC levels, but when Google will close I'll have to restore stock firmware.

I already purchased a hi end type-c DAC to have a try...

That's why I ask if removing dm verity will unlock bootloader.

If not, I'll find a way to install Viper and edit DAC files by recovery, without to install Magisk.

This will work if Safetynet won't detect disabled dm verity, I can't know this...
[Android Software Development] WoKoschekk:
dm-verity has nothing to do with SafetyNet
[Android Software Development] ultradj83:
Dm verity has nothing to do with Safetynet if it doesn't modify the bootloader.

Are you sure the bootloader won't be modified?
[Android Software Development] WoKoschekk:
dm-verity = device mapper-verity

https://source.android.com/security/verifiedboot/dm-verity

SafetyNet https://www.xda-developers.com/magisk-no-longer-hide-bootloader-unlock-status/amp/
[Android Software Development] ultradj83:
I know what they are.

I just don't know how disabler works.

If it edits bootloader Safetynet will fail, likely.
[Android Software Development] WoKoschekk:
You cannot modify the bootloader with any .zip or something else. It only knows two states:

0=locked/SafetyNet status ok

1=unlocked/SafetyNet status compromised

Everything you install, flash or what ever won't change this state. Only Magisk can hide it during boot. That's all.
[Android Software Development] ultradj83:
I think things have changed.

Have a look: https://www.xda-developers.com/safetynet-hardware-attestation-hide-root-magisk/
[Android Software Development] WoKoschekk:
There are also workarounds for some devices
[Android Software Development] ultradj83:
I think all temporary, when Google with no more accept basic authentication we're died...

Somebody also tells about a Riru module, but being closed source I'll never trust it.
[Android Software Development] vdbhb59:
Safety Net is hype, and useless stuff. Learn to live without stupid conglo..
[Android Software Development] alecxs:
i don't understand discussion. if your bootloader is locked any modifications will trigger dm-verity, therefore you can neither disable it nor flash any zip (how would you?)
[Android Software Development] ultradj83:
Do you mean dm verity disabler unlocks bootloader?
[Android Software Development] WoKoschekk:
seriously??
[Android Software Development] alecxs:
no. but in order to install magisk or custom recovery you must unlock bootloader first. even if you manage to root on locked bootloader, trying to alter partitions will trigger dm-verity and deny boot. i am not aware of any method to disable dm-verity on a locked bootloader
[Android Software Development] H4X0R46:
Does this zip work on Android 11 to unencrypt data?