yashsingh1/xdaforums huggingface dataset:
[Android Software Development] alecxs:
It may work if you re-install SuperSU / Magisk from Recovery. Systemless root solution uses loop devices to mount ext4 image su.img / magisk.bin, which is stored on data partition. Just make sure all is mounted in right order. For advanced users there is option left to manually unpack boot.img and modify fstab / mount scripts, if re-installing fails
[Android Software Development] amg314:
Rooting is not directly connected with the encryption of the data area.

The problem is the lack of workable TWRP. Due to TWRP issue it is necessary to patch boot.img manually and flash patched_boot.img using flashing tool like Odin, SP Flash Tool, etc. instead of flashing Magisk.zip directly.
[Android Software Development] WANTES:
Good afternoon. I have OnePlus 6t and I have a problem. when I format data and flash the script, the encryption is removed on the phone, but the

after flashing the script there is no password, the phone is active, but I can not use the new registered password for fingerprint or face ID, as soon as I try to create a password, it will immediately become incorrect.
[Android Software Development] WANTES:
not even so, the system boots in a new state, but because of the script, when I want to create a password, it will be created, but immediately will not be true when you first start the phone or lock the screen.
[Android Software Development] WANTES:
this error fixed?

Can't use any unlock method. Deleting gatekeeper and locksetting files through TWRP works but setting a new PIN results in not being able to unlock again. The PIN is entered correctly but still it reports "wrong password". But actually it detects that the PIN is correct since it doesn't trigger a lockout time.

.

UNLOCK BUG LOGCAT OCCURENCES - HELP NEEDED!
Here are some logcat lines which I think are related to the unlock bug.
HTML Code:
E GatekeeperHalDevice: verify
E GatekeeperHalDevice: ret: 0
E GatekeeperHalDevice: resp->status: -24

E GatekeeperHalDevice: verify
E GatekeeperHalDevice: ret: 0
E GatekeeperHalDevice: resp->status: -30

I LockSettingsService: Device doesn't implement AuthSecret HAL
E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/gatekeeper.password.key: open failed: ENOENT (No such file or directory)
E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/password.key: open failed: ENOENT (No such file or directory)
E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/gatekeeper.pattern.key: open failed: ENOENT (No such file or directory)
E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/gatekeeper.gesture.key: open failed: ENOENT (No such file or directory)
E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/gesture.key: open failed: ENOENT (No such file or directory)

E keystore: Changing user 0's password while locked, clearing old encryption

E JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
E JavaBinder: java.lang.RuntimeException: android.os.RemoteException: Non-OK response verifying a credential we just set: -1
E JavaBinder: at android.os.Parcel.writeException(Parcel.java:1779)
E JavaBinder: at android.os.Binder.execTransact(Binder.java:765)
E JavaBinder: Caused by: android.os.RemoteException: Non-OK response verifying a credential we just set: -1
E JavaBinder: at com.android.server.locksettings.LockSettingsService.setUserKeyProtection(LockSettingsService.java:1602)
E JavaBinder: at com.android.server.locksettings.LockSettingsService.setLockCredentialInternal(LockSettingsService.java:1483)
E JavaBinder: at com.android.server.locksettings.LockSettingsService.setLockCredential(LockSettingsService.java:1397)
E JavaBinder: at com.android.internal.widget.ILockSettings$Stub.onTransact(ILockSettings.java:141)
E JavaBinder: at android.os.Binder.execTransact(Binder.java:752)
[Android Software Development] Zackptg5:
Looks like this is a rom issue. Some roms require encryption and won't work properly if decrypted. Oneplus hasn't been known to do that kind of thing though. Magisk tools will be updated soon and so I'll be updating this mod then which may help with this issue. Can you post your fstab files too? They'll either be in ramdisk or in vendor/etc
[Android Software Development] WANTES:
yeah , of course not a problem. now you will have your files ready to test it!

files vendor/etc

https://drive.google.com/open?id=1y54Zruz8GsW-4RkjDqAVnUm3bp8chfXz
[Android Software Development] Zackptg5:
fstabs all look normal. I'll be pushing an update with magisk 19 changes/binaries later today so maybe they'll help
[Android Software Development] WANTES:
they look fine because I don't have a DM-verity archive flashed and I didn't create a password.
[Android Software Development] Zackptg5:
Pushed update with new magisk tools. I was looking for new entries for file encryption but I didn't see anything new, same thing used on my op5t
[Android Software Development] WANTES:
Look what I'm doing.

Firmware Full ROM

Firmware TWRP (What's in. * Zip)

Reboot in TWRP

Firmware Fix 3.28.19 Encryption

Firmware Magisk 19

Reboot in TWRP

Reboot to the system.

On the output, I get a clean system, no password, no encryption. I Create a password, lock the screen, try to unlock the phone, and get the wrong password. Now from under TWRP the skin files fstab with the stitched protection from encryption.

files fstab oneplus 6t ext4 dm verity with corupted password

https://drive.google.com/open?id=1-e3vvevojxvvHQR4rfumFK8xopxXpHda
[Android Software Development] hkjo:
What are the use cases for this tool?

Are there cases where it's needed also when using Magisk?

When is fstab modification important?
[Android Software Development] Zackptg5:
Out of the files attached, only the 2 fstabs are patched, the others aren't touched. The fstabs look the way they should - the fileencryption was replaced with encryptable like it should be so no errors there.

Have you tried without magisk? The problem isn't related to this mod though based on the files and logs provided
[Android Software Development] WANTES:
The problem is connected with this mod, I tried without magisk, any kernel that decrypts the date, breaks passwords, as well as the script protection against encryption, so it's not in the fstab files. Thanks
[Android Software Development] WANTES:
here recorded 2 logs through ADB and two logs through catalog. created a password and tried to disable it immediately.

catlog

https://drive.google.com/open?id=14sA_lx_8NZKCribSPyMAXE6lQyL01qak

adb logs

https://drive.google.com/open?id=1fXTQ3eWFkAYjHFemu5958GUd9VpQ1H6M

https://drive.google.com/open?id=1kArB_AKTN8oBwvlKSEXP4CtNezSVHZx2
[Android Software Development] WANTES:
video with problem on youtube

https://www.youtube.com/watch?v=ojN_SGhrrg8&feature=youtu.be
[Android Software Development] Surrikat:
Hi. Can I somehow rollback changes of this zip file or save data folder? I have the necessary data on my phone, but now then I boot in TWRP I see encrypted data without the ability to decode them. Thanks.
[Android Software Development] Zackptg5:
Updated zip! Fixes problem where kernel fstabs weren't being patched. Thanks to lastsaskatchewanpirate @ github for the fix
[Android Software Development] xdaGerry:
Need Help with TWRP and DM-Verity, ForceEncrypt, Disablers

I need some advice and help for the following:

I have and UNROOTED LG G Pad V530. The bootloader is unlocked, but I have not been able to get the TWRP to boot.

The problem is that /system/recovery-from-boot.p is booting the stock recovery.

The link to the TWRP is: https://xdaforums.com/g-pad-x-80/development/unofficial-twrp-t3861875

Now I see that the Universal DM-Verity, ForceEncrypt, Disk Quota Disablers should be installed using TWRP.

Could I installed the install DM-Verity, ForceEncrypt Disabler using ADB?

adb devices

adb reboot-bootloader

fastboot devices

fastboot format userdata

fastboot update c:\Disable_Dm-Verity_ForceEncrypt_04.03.19.zip

If this will work the I should ab able to rename recovery-from-boot.p to recovery-from-boot.p-bak

What I would like know is will TWRP Enable DM-Verity, ForceEncrypt after it is installed?

How will I be able tell that if DM-Verity, ForceEncrypt has been disabled?

Any advice or help will be appreciated.
[Android Software Development] culiacanazo:
That explains it.
[Android Software Development] Pat750:
Thanks a lot for this. Used it on a Galaxy A3 (2017) A320FL, but only march version with Magisk 18.1 worked for me.

With the april version TWRP allways showed 0 MB after first boot, no matter what I tried. "Quota" was added.

Long description here

https://xdaforums.com/samsung-a-series-2017/development/recovery-galaxy-a3-sm-a320f-t3562302/page33
[Android Software Development] xdaGerry:
Errors "zip has no android-info.txt" and "Enter Security Password"

Device is LG G Pad V530

I got 2 errors:

fastboot update C:\adb\Disable_Dm-Verity_ForceEncrypt_04.03.19.zip

The error message is: --> "zip has no android-info.txt"

After rebooting I was asked for a security password. I don't have a security password.

I had to do a factory reset.

I don"t have TWRP installed. Because after TWRP is flashed, the stock recovery replaces TWRP.

Only the stock recovery boots even through the flash of TWRP was a success.

I was trying to install DM-Verity, ForceEncry Disabler , so that I could modify the system and get TWRP working.

If I had a working TWRP I would not have a problem.

Is there a way to find out the required content of the android-infor.txt?

Or will creating a Super CID work?

Any help will be appreciated.
[Android Software Development] alecxs:
You must install zip via twrp (or any custom recovery) - no other method allowed
[Android Software Development] madbat99:
For starters, flash it in twrp
[Android Software Development] saznat:
Hi. Can someone clarify something for me. I've been reading around the subject of DM-Verity. As I understand it:-

If I install magisk, it mods the boot image anyway and in doing so, it also disables DM-Verity. I hope I've got that right.

I have a Samsung T580 with stock T580XXU4CSA1_BTU ROM. I have flashed with TWRP recovery 3.2.3.4 and then installed Magisk. I have NOT installed any no-Verity or Disable_verity zip file.

As a result, I can boot to TWRP and my device is not encrypted.

Is this because I have a stock ROM or because I installed Magisk?

The most important question this leads to, is what happens if something goes wrong with Magisk or it gets uninstalled? Would the boot be restored to the original version? If so, is my device at risk of being encrypted on its next boot and might I find that due to a potentially reactivated DM-Verity, i can no longer get into TWRP?

If I install Disable_Dm-Verity_ForceEncrypt before magisk. Would I be right in assuming that Disable_Dm-Verity_ForceEncrypt will modify the boot and then during magisk installation, it saves the already modded boot and then if it restores it at any point, it's actually restoring the Disable_Dm-Verity_ForceEncrypt modded version, rather than an original. Thus DM-Verity remains disabled?

If so, to avoid a possible bootloop problem in the future along with the inability to use TWRP, should I uninstall magisk, flash Disable_Dm-Verity_ForceEncrypt and then re-install magisk?

I currently have Magisk 18.1 and Magisk Manager 7.1.1. Would it work if I install Disable_Dm-Verity_ForceEncrypt

and then update magisk to v19?

At the moment. The more I read, the more confused I'm getting.

I hope this post isn't too complicated to make sense to readers.
[Android Software Development] alecxs:
yes, exactly what you write. Magisk uninstall will restore /data/stock_boot.img.gz. your workaround is right
[Android Software Development] saznat:
Great. Thanks for confirming that.
[Android Software Development] saznat:
Hi. Everything is working on my device. But I did not install any no verity zip before magisk. Ideally, I don't want to go through the hassle of uninstalling magisk and potentially finding my T580 unusable due to encryption or bootloops as the original boot image is restored.

Several idea's came to mind.

1. Save the magisk modded boot image, so in emergency, I can flash it to device and hopefully disable verity.

I can see files in /data/adb/magisk, but none are the same or similar size to the stock boot image. Where is magisk storing the original boot image?

2. extract boot.img from the Samsung stock ROM, copy it to device and then go to magisk manager, install and patch stock ROM. However, this fails as it says it can't repackage the modded boot image (don't know why).

3. If I install Universal DM-Verity, so it updates the magisk modded boot record, can I extract this boot record and replace the the original boot image magisk has saved. If I could do this and magisk got uninstalled, would It then restore a working boot image with DM-verity disabled by Universal DM-Verity?

I am just trying to find a way to install this so that I have a no verity boot image and a magisk no verity saved backup image, so whatever happens, after reset or uninstallation of magisk, I can't stuff my tablet. And I'd like to achieve it with the least amount of de-installing of other stuff magisk, modules, adaway etc.

Besides. I'm worried that if I uninstall magisk in order to run Universal DM-Verity, I will I find I can't get into TWRP to run the zip files, or the device just bootloops.

If anyone can give me some help on how to do this as easily and safely as possible, I'd appreciate it.
[Android Software Development] amg314:
On my tablet path is: /data/stock_boot_b8287d8dd70ae9328cc4b399e39533d17d481895.img.gz

Search 'stock_boot' in Total Commander.
[Android Software Development] alecxs:
... and deleting this should be fine ?
[Android Software Development] saznat:
Thanks. I've searched with Total Commander and it finds no stock_boot*.* file. Maybe this is a Samsung thing, as Samsung uses Odin and tar files to flash, rather than fastboot and img. Maybe the naming convention is different. All I can find is the magisk stuff in /data/adb/magisk and nothing there looks like a boot image.
[Android Software Development] amg314:
Search in /data '*img* and size is > 3M
[Android Software Development] saznat:
Found it. Thanks.

Funny thing is that it wasn't there before I uninstalled Magisk, installed Disable No-Verity, then reinstalled Magisk.

I'm not sure what happened the first time I installed Magisk.
[Android Software Development] madbat99:
Probably a little late since it seems like you're fairly satisfied, but...

If you're still interested in a "stock + no-verity only copy of your boot.img. Follow me down the rabbit hole (just kidding, sort of)

you can backup your current, magisk patched boot.img in TWRP.

In TWRP, tap Backup --> and select "boot" and "boot.img". That way you'll have a TWRP "normal" backup of boot, and one as a boot.img.

If you want one with only dmverity disabled, and you have a clean, stock boot file (.tar or .gz or whatever), you can...

Take that stock boot file (you said Samsung so probably a .tar or .tar.gz or something like that) and keep extracting it until you come to the boot.img

Place that extracted boot.img somewhere on your device that you can find it in twrp

Boot to TWRP, backup only boot (maybe change the name of the backup to something you'll recognize as this particular backup) TWRP has this option as you're making the backup.

Still in TWRP, back on the main page now, install the extracted boot.img, like this,

install -> install image (after you tap install you'll see a button at the bottom that says install image)

Select the boot.img you extracted earlier -> select the partition to flash it to (boot) -> swipe install to to the deed.

Do not reboot to system yet (for obvious reasons)

Still in TWRP, back to main screen. Tap install -> tap the install zip button at the bottom (because we switched to install image earlier and it usually stays that way for the entire recovery session) and select the no-verity zip from OP (I assume you already have it, lol)

Back to main TWRP screen once it's flashed (still not booting to system) and tap backup, select only boot (and boot.img too if you like to have a copy in .img form).

Now that's your "stock + dmverity removed only" backup. Name it accordingly.

Now, still in TWRP, either

1. restore that first boot backup you made when we started (with magisk patches and everything already in it)... Or

2. Flash magisk zip.

Now you're back where you started, except now you have a "no-verity only" stock boot img backup.

You can reboot system now.

Sorry if that seems long, it's not as long as it looks. And I, like yourself, know the value of thorough backups to cover all possible borks, bricks, calamities, and random device wierdness that can happen.

It only looks like a long process because I wanted to be clear, and thorough. And, admittedly, I get a bit "wordy" sometimes.

---------- Post added at 11:19 PM ---------- Previous post was at 11:15 PM ----------

@Zackptg5

Dude, bro...

I apologise for that last post. Lol. Just got a good look at how long it was. Geez,

I did manage to stay on topic though. Since you're no verity zip what's the key to the whole process. and the goal was a boot image with only that modification. Kudos on a great tool.
[Android Software Development] saznat:
Thanks for that long explanation. It's just what I need, and I'm more than happy that it's so in-depth so I can't go wrong. it'd be so easy to do one step wrong and end up in the proverbial brown stuff!

Thanks again
[Android Software Development] alecxs:
nice backup solution too. and these boot.emmc.win can be flashed or booted - as is - directly from fastboot, in case twrp not working ?
[Android Software Development] chooks06:
I consider this a well written set of instructions. Thanks bro!
[Android Software Development] madbat99:
No problem at all. As long as you don't reboot system until the end, once you've either restored the beginning magisk patched boot.img, or flashed magisk over the resulting no-verity boot.img, then your device should not encrypt. Or bootloop because of DM verity.

Long story short (too late for that right?)

Backup current magisk patched boot.img

Flash a clean stock boot.img

Patch it by flashing no-verity zip

Back that up

Flash magisk zip or restore original magisk patched boot.
[Android Software Development] fa000wi:
No sim card detected after installing Universal DM-Verity, ForceEncrypt with TWRP 3.2.3-0. on lava Iris 88s . Oreo 8.1.0 kernel 4.4.95+
[Android Software Development] madbat99:
These
[Android Software Development] Zackptg5:
Search the thread, this has been answered multiple times
[Android Software Development] bigrammy:
For Info:

Not sure if this has been reported already or if your script finds it but on MediaTek devices there is a fstab.mtxxxx file in /nvdata and or /data/nvram

/ # ls -l /data/nvram
lrwxrwxrwx 1 root root 7 2019-04-15 20:45 /data/nvram -> /nvdata
tuba:/ # ls -l /data/nvram/
total 800
drwxrwx--x 4 root system 4096 2019-04-12 22:38 APCFG
-rw-rw---- 1 root system 704615 2016-10-19 22:38 AllFile
-rw-rw---- 1 root system 70180 2016-10-19 22:38 AllMap
-rw-rw---- 1 root system 4 2016-10-19 22:38 RestoreFlag
-rw-r--r-- 1 root system 572 2019-04-12 22:56 fstab.fota
-rw-r--r-- 1 root root 3260 2019-04-15 20:45 [COLOR="Red"]fstab.mt6755[/COLOR]
drwxrwx--- 2 root root 4096 2019-04-12 22:38 lost+found
drwxrwx--- 3 root system 4096 2019-04-12 22:38 md
drwxrwx--- 2 root system 4096 2016-10-19 22:38 md3
drwxrwx--x 2 system radio 4096 2016-10-19 22:38 md_cmn
drwxrwx--x 2 media audio 4096 2019-04-12 22:38 media
tuba:/ #

I think this is copied to /nvram on first boot so if you modified the /system/vendor/etc/fstab.mtxxxx and /data is clean (wiped/formatted) then the changes made will be made to the one in /nvdata also. :good:

But if your /data is not clean (Old) then the stock one from your first boot stored in /nvdata takes president I think.

I worked this out before discovering your flashable .zip else I would of reported it earlier.

BTW on my devices having "encryptabe" set on ALL fstab.mtxxxx fixed the no sim issue but this may differ by OEM implementation.

To explain the radio checks the encryption state like in this here

04-15 21:26:39.493 374 374 D ccci_mdinit(1): ro.crypto.state=unsupported

Hope this makes sense I have tried explain it a few times to various people but they do not seem to understand. :rolleyes:
[Android Software Development] Zackptg5:
Can you post a link to stock firmware for your device so I can take a look at it?
[Android Software Development] bigrammy:
It's not a single device it's like this for Most of my MediaTek devices.

the /nvdata fstab is not included in any firmware per-say it's copied to /nvdata by binary file i guess maybe the multi_init binary in the boot.img or a system side one who know's it's nothing obvious anyway and easy to workaround. (EG: leave the device forceencrypt if encryptable on all fstab's breaks the radio)

But your welcome to have a dig around if you like. :D

Here is the 8.1 update Nokia3-mt6737.zip
[Android Software Development] madbat99:
Is that an update zip, or the entire firmware? Big difference.
[Android Software Development] bigrammy:
Yes I know the difference thanks. :laugh: it's not a patch update and has everything that he needs :rolleyes:
[Android Software Development] alecxs:
[MENTION=3924647]bigrammy[/MENTION] i can not confirm. i have made some changes to /nvdata/fstab.mt6580 and created /nvdata/fstab.mt6580.bak (selinux permissive). both files are gone after reboot. It is copied/restored on each boot
[Android Software Development] amg314:
If you could edit the fstab.* file, there will be no need for universal DM-Verity))
[Android Software Development] bigrammy:
What android version are you on??

Does changing the /system/* side fstab change the one in /nvdata for you or is your fstab in your boot.img?

These issue's started at around Android 7.X > and defo 8.0 But 6.0 was never any issue at all.

EDIT:

The boot "init" binary

of a recent 8.1 seems look for fstab in these places if they exist.

fstab.dt (encoded in the boot.img it's self dtb )

/fstab.xxxx (In the root of the ramdisk)

/etc/recovery.fstab

/odm/etc/fstab

/vendor/etc/fstab

/nvdata/fstab
[Android Software Development] alecxs:
It is stock Android 7.0 Kernel 3.18.35 with fstab in boot.img i will check if there is a new FOTA and report
[Android Software Development] bigrammy:
Yes that makes sense fstab in the boot.img seems not to have an issue it seems to affect boot.img's without fstab and to varying degrees. :eek:

At the end of the day I only wanted to alert the OP of the possibility of missed fstab's because when I do things manually I seem not have any issue's like I see some others having around xda. I guess each device OEM sets things how they want which may explain the randomness but if the OP's script checks all the bases then it should not be a problem.
[Android Software Development] kewinhw:
Is this the correct flashing order if I'm going to clean flash and applying the disable.zip:

Format data

Flash oos.zip + twrp.zip

Reboot twrp

Flash oos.zip + twrp.zip

Reboot twrp

Flash omnirom + twrp.zip

Reboot twrp

Flash omnirom + twrp.zip

Reboot twrp

Flash gapps + magisk + disable.zip

Reboot system

(Or do I flash disable.zip EVERYTIME before I "reboot twrp"? Or is it only needed to flash it the last time before I "reboot system"?)

And then when updating the rom with rom updates:

Flash ommirom + twrp.zip

Reboot twrp

Flash gapps + magisk + disable.zip

(And same here, do I flash disable.zip Everytime I "reboot twrp" or only the last time before I "reboot system"?
[Android Software Development] madbat99:
Disable.zip comes before magisk. It sets the flags for magisk.

You likely need to flash disabler anytime you flash a new room (or at least a new boot.img which is usually in a rom anyways)

But only if you're not wiping data (as in an update), magisk takes care of it from then on (could be different on different devices).

I'm not that familiar with your device, all that double flashing looks tedious.

And flashing TWRP every time. Isn't there a recovery retention script for A/B devices?