yashsingh1/xdaforums huggingface dataset:
[Android Software Development] kewinhw:
Okey so only flash disable.zip after a rom or a kernel/boot ,followed by magisk as the last zip.

And also Everytime before flashing/updating magisk.

Yeah it is a bit anoying. It takes like 25-30min to do a clean flash all the way from oos to desired custom rom.

I don't know of any script like that but I believe flashing is supposed to have gotten easier with twrp 3.3.0-0 but I don't know if it's best to wait for a custom twrp to update or to use the official twrp hehe. I guess There's a reason why people make their own twrp's.

My device is OnePlus 6 :)

So it should be like this for a clean flash:

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 + disable.zip + magisk

Reboot system

This should be correct, Since the only time in this process is before reboot system which is the only time where I flash magisk during clean flash?

And then when updating the rom with rom updates:

Flash ommirom update + twrp.zip

Reboot twrp

Flash gapps + disable.zip + magisk

Reboot system

Can I remember it as if I need to flash magisk then always flash disable.zip before whenever flashing magisk is needed? Or can I even remember to flash it Everytime I flash anything in twrp but never flash disable.zip AFTER magisk.
[Android Software Development] madbat99:
In my experience, once you've flashed the disabler then magisk, from on it's not needed unless you wipe or format data. Magisk will have the flags set for dmverity and forced encryption. And magisk has a element (maybe flash after update or add-on.d) that reflashes magisk after ROM updates. Could be different on A/B treble devices. Mine is A only so I can't say 100%.

I know some of those devices have recovery in the ramdisk now, so flashing TWRP over again becomes necessary. Take a look at Osmosis' odds and ends for his TWRP retention for A/B devices to see if it can lighten your load.

https://xdaforums.com/showthread.php?t=2239421&p=77770683
[Android Software Development] kewinhw:
thanks I'll look into the script :)

EDIT: i installed disable.zip with a clean flash and it went great! :D
[Android Software Development] aocboe:
Oops, deleted
[Android Software Development] Zackptg5:
Did you read the OP to see what the attachment is? It's not the current build or download link
[Android Software Development] aocboe:
Sorry, I came to a wrong thread.:crying:
[Android Software Development] Lackooo84:
I have a Honor 8 with stock 8.0 oreo (C432B562). I can install twrp and magisk with no problem but I don't wanna my data partition being encrypted, but I'm stuck at this point. I tried everything, but no luck. After a clean install I do not let the phone to boot to system, only to twrp, I tried install magisk.zip, this dm-Verirty-forceencrypt.zip to patch ramdisk(boot).img, but after I install any of them I get corrupt boot, means the phone boots to system but main system apps are missing, no keyboard, no google apps, no file manager, no nothing I can't do anything and oh, the phone set itself 'FRP lock' state. So the only way out from this is a new clean boot via Huawei erecovery, then login, set OEM unlock to remove FRP lock and try again... ALso tried to modify vendor/etc/fstab.ext4.hi3650 and fstab.f2fs.hi3650 with no luck. Any ides to do this? Thanks.
[Android Software Development] Zackptg5:
So magisk doesn't work for you? This zip uses some magisk binaries to unpack and modify the boot img so if magisk doesn't work, this zip probably won't work either. Best to open a bug report on the magisk thread
[Android Software Development] Tunapersie:
This have stressed the life out of me as I have done format all + download countless times just to fix my Baseband.

But it got corrupted again after flashing the OP zip.

Please, were you able to fix it? If yes, how?

My service is Infinix note 4 pro - Mt6753 android 8.1.0.

---------- Post added at 09:12 PM ---------- Previous post was at 09:07 PM ----------

Were you able to fix it anyway?

Please.
[Android Software Development] kewinhw:
How do i safely update from Magisk Beta 19 to Magisk 19.1?

is this the correct order?

Flash Magisk unistaller

Flash Disable Dm-verity+forceencrypt

Flash Magisk 19.1

Reboot System?
[Android Software Development] jahidinbedod:
[MENTION=6037748]Zackptg5[/MENTION]

Latest magisk 19.1 already update

---------- Post added at 02:22 AM ---------- Previous post was at 02:20 AM ----------

for update just direct install from magisk manager

update magisk manager first before install zip
[Android Software Development] repey6:
I checked else one time but not disable dm-verity and fec with format data before installation this rom https://xdaforums.com/galaxy-tab-a/development/rom-touchwiz-port-oreo-8-0-t3792635 . Sorry.
[Android Software Development] _MartyMan_:
Thank you! Working fine on OnePlus 6 with OxygenOS 5.1.9 :good:
[Android Software Development] Zackptg5:
Just an update here guys. Theoretically, flashing order shouldn't matter other than rom first. The exception here is of course if you flash a kernel or some mod that would enable force encrypt.

That being said, I've been flashing around a bit and I found that the best order for me has been: rom, gapps, dmverity-fec remover, magisk 16.7 (1671) - I copied the file in this zip to /cache prior to flash magisk.

If anyone was having trouble, this is worth a shot :)

You can always flash a custom kernel after booting or before this dmverity-fec remover zip if you use it.
[Android Software Development] rippledrums:
Just want to let you know that I just used your zip when upgrading from Oxygen OS 5.0.3 to 5.0.4 and it worked as advertised. ;) :good:
[Android Software Development] Mervingio:
delete
[Android Software Development] Mervingio:
All right [MENTION=6037748]Zackptg5[/MENTION] I’m a little lost here so what of the two zip I really need to flash?

This: https://xdaforums.com/showpost.php?p=77153231&postcount=23

Or this the one in the OP: https://xdaforums.com/attachment.php?attachmentid=4551401&d=1531795101

And if I understand correctly the flash steps are follow?

1 Rom (custom or stock)

2 gapps (not apply to stock roms)

3 dmverity (is this your zip right)

4 magisk

5 then the 500 moded zips that people flash and then phone bootloped or explode (joke but seriously for few guys)

Let me know
[Android Software Development] Zackptg5:
The magisk zip isn't a flashable zip, it just contains the .magisk file.

1. So extract that .magisk file from the zip, copy it to /cache

2. Flash rom

3. Flash gapps if applicable

4. Flash dmverity from the OP

5. Flash magisk

6. Then mods if you're a risk taker ;)

You bring up a good point though. I'll add the .magisk file thing to the dmverity zip so you won't have to worry about it in the future. So the next version will have that (can't tell you when I'll release it though, I've been pretty busy lately)
[Android Software Development] Mervingio:
Take your time my friend :good:

and thanks for your work :cool:
[Android Software Development] chooks06:
@ Zackptg5,

Thank you for this. Worked perfectly on my Ulefone Armor X running stock 8.1.0.

BEst regards.

Choo ks
[Android Software Development] Zackptg5:
[MENTION=3871605]Mervingio[/MENTION] and everyone else:

Updated this zip to v1.1. Changelog:

Added magisk.apk back for bootsigning purposes only (doesn't get installed or anything)

Updated stuff to magisk 16.7 (1671)

Added creation/modification of .magisk and .supersu files with verity and FEC disabled. Also set the supersu fec remover to false as well just in case it could mess with things. This will remove any existing .magisk files and create one at /cache. It'll modify /data/.supersu if it exists, otherwise it'll create it
[Android Software Development] Mervingio:
Sweet Thanks Zach [emoji41]
[Android Software Development] chooks06:
Good day mate!

Just a nooby layman question (I'm new to Magisk}..

To get the new zip on board, can just just flash it via TWRP with the device already running previous version?

I just had a fun time - flashed this updated version, then installed a module via Magisk (first time). On reboot, SIM not detected cause I lost both IMEIs.

No biggie - had a TWRP backup so was back in business in 15 min.

Because I did two different things consecutively, I can't figure out what went by wrong where (my bad).

So I just want to eliminate this first after which I'll back up to this state. Then I'll probably start to learn about the Unity thingy.

Thanks for the awesome work.

Cheers!

Choo ks
[Android Software Development] Zackptg5:
You can but there's no point. This needs to be flashed after any rom flashes (both dirty and clean). You can flash it and reflash it as many times as you want and it shouldn't effect anything (I've done it just to see what happened and all was fine).

I've never heard of the IMEI thing before so I'd doubt it would be related to this. Just out of curiosity, what magisk module did you flash and what device do you have?

On another note, I reuploaded v1.1 with magisk 16.7 binaries :)
[Android Software Development] chooks06:
I am using the 16.7 binaries. Actually I had some issues, had soft bricks a few times, so had to go all the way back to flashing stock ROM then root again.

When I decided to try Magisk, it was after I found your post and the dm-verity removal. It was just a few hours before I saw your latest version update info..lol

By then I did a TWRP backup and decided to try (albeit wrongly doing 2 different things consecutively) just flashing your new version.

Am still on a learning curve so deepest apologies if any convenience caused.

Just trying to figure out where how and why I went wrong.:p
[Android Software Development] Zackptg5:
Well if you've already booted and not encrypted, you're good to go. If you're encrypted, you'll need to wipe everything (including internal storage so back up your stuff to your PC first). Then flash rom, gapps, custom kernel (if applicable), this zip, then magisk (if you want). You're using magisk 16.7 (1671) right?
[Android Software Development] chooks06:
Good to go ... In fact recovered using TWRP backup twice. If it comes to the crunch will go back to ground zero. Thanks!

Edit.. Yes, I'm on 1671
[Android Software Development] Mervingio:
[MENTION=6037748]Zackptg5[/MENTION] man this phenomenal no more "preserve force encryption" check mark in Magisk
[Android Software Development] DEVILOPS 007:
[MENTION=6037748]Zackptg5[/MENTION] Hi man, I'm on treskmod for op5t and for some reason when flashing this my phone shows the splash screen then reboots to recovery. I have no idea why but seems to be the same problem [MENTION=7478074]bdwilk[/MENTION] had and maybe still has. Treskmod is based on Omni and includes 5.1.3 firmware I think and includes the open gapps package from their sources on GitHub if that helps.
[Android Software Development] Zackptg5:
Have you flashed anything else and in what order? Can you post recovery.log post flashing?
[Android Software Development] DEVILOPS 007:
I flashed ROM, ROM debloat script and kernel before noverity. I've not got a recovery log before so please bare with me while I work out how to get one ?
[Android Software Development] Zackptg5:
I'll need logs after flashing the zip, a walkthrough of what you did (like what you - did you format data in twrp? - it's different from just wiping it - flashed and in what order), and what rom you were using

If you're already on magisk, just flash the update. Magisk modifies the existing boot img so the changes my zip made to the boot img are still there, and the file magisk reads from for force encrypt status and stuff is still present in cache (assuming you didn't wipe it) so magisk will still read from it.

You only need to reflash this zip if:

You're flashing/reflashing a rom (clean of dirty since it overwrites the boot img with a new one)

If you flash a kernel (may not be needed but better safe than sorry)

You can update magisk normally, nothing special required (always back up your boot img first just in case though).

I'm looking into the update now
[Android Software Development] Zackptg5:
Okay everyone. So everything works on my end except one thing that I can't test: odm and nvdata partition support. None of my devices have these so I have no idea if they'll work as intended there so I'm calling this a test build for those users. Anyone without those partitions will be perfectly fine with this version but if anyone with odm or nvdata can send me a log after flashing and let me know if it worked or not, that'd be great.

Changelog: Updated stuff to magisk 19.1, added potential /odm and /nvdata support
[Android Software Development] kewinhw:
Ah okay :) Alright no i haven't wiped cache or anything, but i think i got it .

Flash Disable.zip whenever a change has been made to boot. Except when only updating Magisk, unless cache has been wiped. Thanks :D

What about now that you've updated your Disable.zip 0501. Do I need to flash it? Since it is a newer version? I'm currently on 0403.

If so, I assume I should flash the Disable.zip before Magisk v19.1 then reboot?
[Android Software Development] Zackptg5:
Nope. FEC and dmverity is already disabled so you're good to go there
[Android Software Development] kewinhw:
okay nice :)

Worked perfectly!
[Android Software Development] z-vet:
Hi, i have a question. If i unlock bootloader do i still need to format /data prior to flashing this?
[Android Software Development] mipirakas:
Yes. As unlocking the bootloader only wipes the partition and doesn't format it. This is at least how i understand it. But even if not it doesn't hurt to format. It takes like 5 extra seconds.
[Android Software Development] z-vet:
OK, formatted it, everything seems to be fine. Thank you.
[Android Software Development] Camerado:
[MENTION=6037748]Zackptg5[/MENTION] Last released version 04.03.19 breaks down a fingerprint/face unlock at latest Xiaomi models (this items of settings disappears from OS)
[Android Software Development] Zackptg5:
You try the beta build a few posts up? Some stock roms don't like be unencrypted, not too much I can do about that u fortunately :/
[Android Software Development] solar666:
[MENTION=6037748]Zackptg5[/MENTION]; somehow your universal patch is not working for BLISS Rom.

After reboot from TWRP the phone goes straight back in fastboot mode.

Used the latest one found as download from op.

Don't know why but for now I used the no-verity v4 found in afh:

https://androidfilehost.com/?fid=1395089523397950826

This is working well with bliss without issues.
[Android Software Development] Zackptg5:
Can you post the recovery log after flashing each?
[Android Software Development] solar666:
Will check when I have time for another round of flashing.

:)
[Android Software Development] TheDrgizzmo:
is this the last version??
[Android Software Development] Zackptg5:
Ya, this is the latest. Nobody's said anything about it concerning odm and nvdata partitions :/
[Android Software Development] flyinsz:
My phone lost modem and cant detect any SIM after flash this zip. Could somebody help me for emergency?
[Android Software Development] Spannaa:
If you explain in detail exactly what steps you took, you'd have a better chance of getting useful help ;)
[Android Software Development] flyinsz:
I just format data participant, flash the zip, and magisk 18.1, reboot then found no signal as no SIM detected. After entering the system, I found null in modem version, and IMEI is null as well. My phone is LEAGOO S10 with Oreo. Thanks.
[Android Software Development] JesseG59:
Help needed

So if my phone is

NOT

encrypted, will I lose all my apps and files if I follow this process, or do I have to backup those things before I flash the items? If that's the case, what would be the best sequence for me to follow if I want to keep my device as-is (talking about apps, files, data) before disabling dm-verity? Do I make a backup, then flash and restore the backup after disabling dm-verity? Or do I not need a backup because my device is not encrypted? I'm a bit confused. Thanks in advance!
[Android Software Development] JesseG59:
Do I need to flash the rom before I flash this .zip or can I just flash the zip without the rom?
[Android Software Development] Lackooo84:
You've just successfully flashed over your EFS partition I think....
[Android Software Development] flyinsz:
Unfortunately, there's no EFS partition always. Help me pls.
[Android Software Development] wartomato:
No backup is always a car idea. Try flashing the stock rom.
[Android Software Development] alecxs:
please avoid sarcasm it may not understand due the language barrier

i guess this was caused from format data. you should post in the thread where you got the twrp image from, maybe the partition mapping has changed.

guys use your brain, or at least, figure it out by yourself. its always best idea to make a backup, even if you don't need it later
[Android Software Development] Lackooo84:
It wasn't sarcasm. If you have no IMEI your modemst or the whole EFS partition are damaged, or deleted. Simple as that. If the partition mapping in the installer is different you can mass up your partitions easily. That is why most ppl. say: "BACKUP EFS PARTITION!" before starting any flashy-flashy....
[Android Software Development] flyinsz:
But there is no any EFS partitions even I flash the stock ROM, why? I found if I re-flash the vendor partition then it detect the SIMs again, so I think the badeband config is in this partition,but I don't know which one is.
[Android Software Development] wartomato:
Stock ROM restores the full vendor. That's why.

Unrelated to the module, I guess, as you should have wiped and formatted userdata partition only, which normally does not hold any of that data.

Your problem seems to be that not much people own your device plus you & everyone here don't know much about it.

So please, please, either backup before or try this only, when you know what you are doing.
[Android Software Development] flyinsz:
Sorry, I don't know what you mean. I had wiped and formatted the userdata partition before flash the module.
[Android Software Development] alecxs:
Yes. We understood this. But which recovery used? How can you know that this isn't caused by a invalid fstab?
[Android Software Development] flyinsz:
I use twrp 3.2.3. So how can I fix the fstab?
[Android Software Development] alecxs:
you can easily figure it out if twrp caused this or not. After backup, do everything what you did last time but skip installing Disable_Dm-Verity_ForceEncrypt.zip (and Magisk), then check your IMEIs. at least, provide a recovery.log right after installing Disable_Dm-Verity_ForceEncrypt.zip and maybe link to the forum/thread/download where you got twrp from... the version of twrp is not THAT important, but the /etc/recovery.fstab must match your partition scheme. you can double-check from twrp terminal:

cat /etc/recovery.fstab
ls -l /dev/block/platform/*/by-name
[Android Software Development] cfrantzol:
Immediate Success on Mi A6 Pie (10.0.8.0)

Just to let you know that your zip worked first try on my new Xiaomi Mi A2. Before reading this post I had been fiddling for more than 10 hours unsuccessfully (and anguishly) with other posts that were probably obsolete (this is the latest implementation of Pie for this phone model).

For everyone's information and help, let me describe how I proceeded:

1. Unlocked bootloader (did this days ago, but I mention it here for clarity. By the way this model came with vanilla bootloader, no authorization codes and the like needed to unlock).

2. Booted to TWRP via "Fastboot boot twrp.img"

3. TWRP->Wipe->Format Data

4. Flashed Twrp 3..3.0 (Dees_Troy).

5. Flashed your zip over stock boot.img

6. Flashed Magisk over it.

And ready! Just rebooted to Android (took a bit longer which is normal anyway after a master reset)

Everything was in one recovery pass, no need to reboot to recovery between the above steps, no Dalwik cleanup, no nothing else. Had everything on SD so once in TWRP no computer needed, I could as well be riding on a bus and still do the mod.

That was all, worked perfectly, I want to warmly thank you and all involved in this nice work. You really contribute to giving us back our devices which we think we buy but the industry thinks they just lease them.

Cheers!

Christos.
[Android Software Development] cfrantzol:
Correct, rooting is independent from data area. I had a trebled device initially impossible to decrypt (before this .zip) but I had it rooted very easily with Magisk using both methods (TWRP install and in-OS Magisk.apk boot.img patch) they worked fine. It is TWRP that does not cope well with encryption of the data area and most importantly if you are the type of guy who reads these posts you probably feel unconfortable having a mandatory "lock" on your data imposed by someone else.
[Android Software Development] kewinhw:
Quick question if I make a backup of a rom that has this script applied, should I also backup the cache partition as well for it to keep remembering that I don't need to flash the disable zip when updating magisk in the future if I haven't flashed something that modifies/patches boot.img? Then again I guess this scenario wouldn't happen vary often because magisk updates don't come that often so perhaps asking for asking this is a bit far fetched hehe.

EDIT: just realized that it is not possible to backup cache on OP6 hehe. and that cache is on data partition for OP6 hehe
[Android Software Development] flyinsz:
Thank you very much. I have fixed it by replacing the twrp.fstab file with recovery.fstab. It works now. Very nice of you!:fingers-crossed:
[Android Software Development] Zackptg5:
So the IMEI problem was a TWRP issue?
[Android Software Development] kewinhw:
after doing a restore of a nandroid does this script still work as it did before the restore? the flags still remembered in the cache?
[Android Software Development] alecxs:
Probably wrong port by flyinsz, but without recovery.log you can ignore such issues ;)

magisk is not permanently stored at cache you can wipe cache every time. your question depends on boot.emmc.win only. there is no script working inside, it's just a permanent patch of existing flags
[Android Software Development] Zackptg5:
Well it's been 2 weeks and nobody said anything about the test build so I guess it's fine.

Changelog in 5/1 build for those who missed it: Updated to magisk 19.1 stuff, added odm and nvdata partition support
[Android Software Development] Camerado:
As it turned out that problem with loss fingerprint at Redmi Note 7 (lavender) only. Maybe you need some files from ROM that will help track addiction?
[Android Software Development] moon0101:
I can't used youtube anymore!

Only get loading video list looping

I also can't change my area please help
[Android Software Development] wartomato:
Wrong thread, I guess...

I can not imagine this module has something to do with it.
[Android Software Development] mkol:
The last May version does not work correctly with the nvram partition, as a result, the nvram becomes inaccessible to the system and the cellular connection does not work. The previous version worked correctly. The device can only be restored by full flashing through SP Flash Tools in the “Firmware Update” mode. Device: Umidigi F1 Play, Android 9.0
[Android Software Development] Zackptg5:
Can you post recovery log after flashing? I asked everyone to test it as a beta but nobody responded...
[Android Software Development] jahidinbedod:
[MENTION=6037748]Zackptg5[/MENTION]

latest magisk stable v19.2 is ready update
[Android Software Development] Zackptg5:
Updated to magisk 19.2 tools :)
[Android Software Development] jahidinbedod:
thanks ;)
[Android Software Development] kewinhw:
i don't have to flash this script if i restore a boot backup that had the script in place right?
[Android Software Development] madbat99:
You mean the boot.img you are restoring is already patched? (there isnt a script residing in boot)

Should be all set. As long as you don't boot up to system with the stock boot img, then it would encrypt and you'd have to format data again.