yashsingh1/xdaforums huggingface dataset:
[Magisk] lolifer:
My god I have been looking for this post for months. This is exactly what I need. Be back in a second...Ascend XT2 is low level formatting as we speak. However I do have a question. Exactly "how" do I go about this? Simply enter what you posted above? Would you mind clarifying that a bit more? :good::silly: Thanks VR25 for all your hard work.
[Magisk] VR25:
But that's a fairly old post... :rolleyes:

Tell me exactly what you want to achieve and I'll guide you. Thanks.
[Magisk] lolifer:
---------- Post added at 03:11 PM ---------- Previous post was at 03:09 PM ----------

Thanks for the quick reply! Im looking for the most efficient process that would allow me to test modules in different settings, with different configs, etc... How can I do that with your f2fs script? Lets say you test one app in 10 different configs on the same phone. How would YOU do that in the most efficient manner using your f2fs workaround on encrypted /data?

I want to use magisk the way it was designed to be used really. I was searching for a means to incorporate f2fs workaround into a patched boot so I didnt have to go through the process of flashing boot.img, flashing magisk.zip and f2fs to begin to flash a module successfully not to mention the backend process when clearing cache and for me its hit and miss whether I keep the modules I had or not. :eek::laugh:

It just seemed much easier in my mind if after each module that was installed one could wipe cache, flash patched_f2fs_boot.img and restore all modules. I dont even know if thats possible but its what I have been searching for or something that will achieve a similar result..
[Magisk] lolifer:
Does that make sense?
[Magisk] youyim:
Hi, I flash it on my device, but it failed. Thank you very much.

device:nubia (zte) Z18

cpu:SDM845

data:f2fs

cache:ext4
[Magisk] nshimose:
This didn't work for me...

After deleting the files and reboot the device the module F2FS disappear...

Edit: I tried again and it's working now... Thanks so much VR25
[Magisk] madbat99:
Did you flash it in Twrp?
[Magisk] youyim:
Yes, I flash it by twrp.
[Magisk] VR25:
Well, I haven't dug this deep. If my own kernel had the F2FS bug, perhaps I would go that far.

I had some crazy ideas involving the use of FUSE, SDCARDFS, ESDFS, or similar to handle Magisk images. That implied not using /cache anymore.

A recent idea of mine has the potential of killing the size limitation imposed by /cache. However, I just don't have time and enough drive these days to put more thought into that.

BTW, reinstalling this module after wiping /cache restores all the stuff.

Firstly, are you sure your kernel actually has a flawed F2FS?

Secondly, you're using an unofficial Magisk version. Have you tried 17.1?

---

Note: I'm still rocking Magisk 17.2 and this module's latest version. I tried to reproduce the <modules vanishing after 2nd reboot> issue... no conclusions at this point. Everything has been working just fine. Why some of you face such an issue is still a very funny puzzle!
[Magisk] lolifer:
VR, when do you wipe cache? Do you wipe cache after each flash then reinstall the workaround immediately then reboot? what is your method?
[Magisk] madbat99:
Are you running a custom kernel or custom ROM? Are you sure your device has the f2fs loopback bug?

It appears you are using some unofficial magisk 17.3.

It also looks like your failure is related to this

"Access denied finding property "persist.vendor.dpm.feature"

Most custom roms have the loop-back bug fixed in their kernels. But not all.

it has already been stated that this module hasn't been tested or working on anything higher than magisk 17.2
[Magisk] VR25:
I usually wipe /cache in two occasions:

- Before installing a new ROM (clean flash).

- On factory reset

The module must be reinstalled before booting into system.
[Magisk] youyim:
I am not sure this device kernel actually has a flawed F2FS, This is kernel source, https://github.com/ztemt/NX606J_O_kernel.

v17.3 is only work on my device, Other versions will cause my device bootloop. until this commit fix it, https://github.com/topjohnwu/Magisk/pull/654.

Please let me know if you need anything else. Thank you very much.
[Magisk] The Analog Kid:
Mhhh... there's a TWRP and Magisk install method for Moto Z2 Play, which totally lacks the need for flashing anything else (this F2fs workaround included) or any echo script input. Probably it is just that things reached it's peak advanced point for Z2 Play (with no hope on evolving further, BTW) Does anybody here knows how is this achieved? Here's the thread in question:

https://xdaforums.com/z2-play/development/twrp-3-2-0-0-moto-z2-play-albus-t3715660

... And before you suggest me to ask right there, I'll tell you that it is now a bit hard to get any answers from that thread (actually, it applies to most Moto Z2 Play forums these days as well. To be fair)
[Magisk] madbat99:
If that device has the f2fs loopback bug, that procedure isn't going to help. but if the procedure outlined in that thread is working obviously that device does not have this particular issue. That device seems to have other issues and they now have a working TWRP that can fully decrypt data
[Magisk] The Analog Kid:
Yeah... I've been thinking the same. Probably such device has a patched boot.img, which I understand is the only way for a Moto device not to sport the F2fs bug, isn't it? but I wonder why in this world is not specified in the OP?...

Anyway, I guess I can still use F2fs workaround along with this method, taking advantage of their TWRP that can fully decrypt data and is claimed to have the SD mount issue fixed as well, don't you think? Unless... That TWRP actually has means to fix F2fs bug by itself... Interesting. Is that barely possible?
[Magisk] The Analog Kid:
But... how do we know that?
[Magisk] VR25:
Only if it Installs a custom kernel or recompiles the stock kernel (unlikely).

We can't install Magisk modules, since Magisk images are mounted read-only.
[Magisk] The Analog Kid:
Sounds fairly complicated, indeed...

Okay... So we can only know by means of trying Magisk modules, but never before that? It basically means that we better flash F2fs fix as recommended in OP, if we want to avoid any further disappointment?
[Magisk] Wolfcity:
You can download Disk Info from playstore to check if your data partition is F2FS formatted.

But as @V25 posted if you have no problem with magisk and especially its modules you don't need that fix.
[Magisk] The Analog Kid:
Well, I've already used DevCheck for that and yes /data is F2fs formatted (as any stock Moto, I guess), but it doesn't really tells me there's a bug in there; unless you're telling me that just by being formated F2fs, there's a bug in /data? Meaning Motorola's F2fs is actually the bug itself?
[Magisk] madbat99:
Motorola's f2fs implementation is going to have the bug in it. Read that you linked to install TWRP and magisk is going to work but you're not going to be able to install any magisk modules
[Magisk] Wolfcity:
For some strange reason DevCheck tells me my data partition is ext4 formatted but Disk Info identifies the correct format (see screenshots). That's why I recommended that app.

About the bug, [MENTION=5228676]VR25[/MENTION] has a good explanation in the OP:

So the bug is more related to the kernel, that's why some custom kernels (i.e. ElementalX) which have the fix implemented solve the problem too.
[Magisk] DanGLES3:
[deleted]
[Magisk] The Analog Kid:
Ok, then I'll try Disk Info...

Sadly, there is no ElementalX for Z2 Play. I've been using it on my previous Moto G4 Plus
[Magisk] The Analog Kid:
Yep. Confirmed F2fs:
[Magisk] The Analog Kid:
Should I install F2fs fix in spite of the procedure then?

---------- Post added at 10:04 PM ---------- Previous post was at 09:49 PM ----------

BTW, I had an occurrence: There's actually a way to change partition format in TWRP; from ext4 to F2fs and vice versa. Could it be useful in any way to try changing partition to ext4 and then going back to F2fs in Moto devices, in order to fix the bug?
[Magisk] Wolfcity:
If you have magisk installed and use any modules for it you should try this F2FS fix. You can also format your data partition to ext4, this would solve the problem too. No need to go back to F2FS than.

If you have any problems with magisk and related modules you have three choices:

- flash this fix

- flash a kernel that has the fix included (ask kernel developer)

- format your data partition to ext4

If you don't have problems with magisk modules or with any other img files that have to be mounted r/w no need to do anything of the above.
[Magisk] The Analog Kid:
Clear as water

Although... If I want to format back again to F2fs, it will remain bugged?
[Magisk] Wolfcity:
If you don't change the kernel the bug will remain if you're data partition is formatted f2f2 again.
[Magisk] madbat99:
If your device will run properly with data formatted as ext4 then sure go ahead and change it. I have the Moto E4 Qualcomm version and it won't boot in ext4. But some devices will so that is definitely a viable solution.
[Magisk] elevatorguy:
I'm trying to use this on a moto z2 play on 7.1.1 it installs fine shows up but after a reboot it disappears. Am I missing something here? Any help would greatly appreciated.
[Magisk] Wolfcity:
Someone had a similar issue with the module vanishing after the second reboot. I would recommend to try an older version of the loopback bug fix. I'm on v. 2018.8.1 and it's still working .
[Magisk] madbat99:
Finally got a moto device that the loop-back bug didn't stop me. Magisk installed modules installed fine. Moto G6 play Jeter. No fix needed on this one.
[Magisk] elevatorguy:
Thanks for the the suggestion it ended up working with the one before the one you mentioned along with 16.4 of magisk.
[Magisk] Wolfcity:
For me it's ok with magisk 16.x too, it's really strange that there's no build working with any magisk version from 17.x on. After a reboot all magisk mods incl. fsf2 loopback fix are gone and so is the hide list and other settings. This seems to be a magisk related issue, there were several mods that disappear after a reboot.

I tested every magisk version and every build of this mod.

This fix is really a lifesaver for rooted Motorola users, thanks to [MENTION=5228676]VR25[/MENTION] for releasing something he doesn't even need.

If any logs are needed, I'm willing to be a tester for newer Magisk versions.
[Magisk] VR25:
I have new ideas. These eliminate size limitations and pretty much all other issues.

There's a catch, though. Since the method involves patching Magisk scripts or module zips, the algorithms are extremely complex. Consequently, a massive amount of development time is required.

If every Magisk module used the exact same installer framework (simar to OpenGApps), I'd run over this much faster.
[Magisk] nshimose:
I was one of these people that had problems after the second reboot. I had tried to use the f2fs v2018.8.1 with Magisk v16.x and it didn't work for me.

In my case, I solved the problem just when VR25 made available the version 2018.10.9 and it it's working with Magisk v17.1 in my Moto G5 Plus.
[Magisk] Wolfcity:
How did you get there? Update the fix or a complete new install from TWRP? Did you first update Magisk or after? All magisk modules working?
[Magisk] nshimose:
I just followed the VR25 suggestion below:
[Magisk] krzee:
any chance that you'd be willing to clarify how you got magisk working well on cedric?
[Magisk] shaDNfro:
Hmm, I do not really remember.

All i know is, that i flashed all modules in twrp (instead of isntalling it using magisk manager).

I am still on v.16 passing both safetynet tests.

Bests,

shaDNfro
[Magisk] krzee:
I was having problems getting it to work (because of the profile) on lineage14.1 so i loaded an old stock firmware with 7.0 and used the latest workaround zip, and now i have magisk running and passing safetynet. my only problem is that on reboot magisk does not remember which apps it needs to hide from magisk. but at least it works!
[Magisk] Vladisar:
Is it possible to install this fix without custom recovery (just patched_boot.img was flashed)? May be using terminal it is possible to manually run scripts?
[Magisk] The Analog Kid:
Remember the TWRP method I've mentioned before... the one from Junior Passos? Well, after a lot of overthinking (and pulling hard for a complete install guide... IMAO) I've tried, and it's been fifteen days now with Xposed systemless working flawlessly on my Z2 Play (no more modules yet) without F2fs fix. As you pointed out, probably there is no F2fs bug in my phone ?; however, somehow I'm still reluctant to believe that "just" a working Xposed module is actually a confirmation sign ?... Unless it is. Is it?
[Magisk] xeropressence:
Figured I'd check this out again, moto e4, xt1768 magisk 17.1 f2fsfix-2018.10.9.zip does not persist after a reboot.
[Magisk] Wolfcity:
[MENTION=5228676]VR25[/MENTION] : Do you know if Motorola has fixed the loopback bug in Oreo? I read something about a kernel fix but I'm not sure.
[Magisk] madbat99:
My g6 play on stock Oreo didn't need the fix if that helps.
[Magisk] Suryo75:
result : updating process ended with error 134

moto e4plus MTK 17770
[Magisk] madbat99:
Instead of quoting the entire op (why?)

You should post the install log or magisk log
[Magisk] Wolfcity:
A log could also show if your device has the loopback bug at all and if it's data partition is f2f2 formatted.
[Magisk] The Analog Kid:
As far as I know, since March 2018 security update, there is no more F2fs bug.
[Magisk] Suryo75:
My moto still root magisk but no modul template can be installed by magisk. Root but nothing.
[Magisk] tag68:
You tested that the hide list and changed settings survive a reboot without?
[Magisk] The Analog Kid:
Not using hide list yet; but after nearly two months now, everything else seems working as it should...

---------- Post added at 03:59 PM ---------- Previous post was at 03:58 PM ----------

Mmmh... Which Moto device you have?
[Magisk] Wolfcity:
Just rooted a Moto G5+ running Oreo OPSS28.85-13-3 (October security patch) with magisk 17.3 and all modules are working fine without the fix.
[Magisk] The Analog Kid:
There you have it, I guess.
[Magisk] Suryo75:
Moto e4 plus 1770
[Magisk] ThOAmin:
I've magisk 17.2 installed 2019-10-9 f2fs loopback fix around ....

But the modules Disappears after reboot ...

Help Me

Moto g5

Stock Kernel

---------- Post added at 05:08 AM ---------- Previous post was at 04:27 AM ----------

I have to use magisk 16.4 and 2018-8-1 f2fs fix for it to work even if I reboot it won't disappear but some modules isn't available in 16.4 ..

.isn't there anyway to make it work on newer versions ?
[Magisk] Wolfcity:
Have you tried this workaround?

https://xdaforums.com/apps/magisk/guide-magisk-official-version-including-t3577875/post77851406

Fyi, Motorola fixed this bug in 8.1 (at least for my Moto G5+) so if you can update to Oreo you don't need the fix anymore.
[Magisk] ThOAmin:
It's works with 17.2 but not 18 iguess I'll stick with it

Also I'm using mm for recovery mode which makes it easier with twrp

Anyway Thank You So Much!!!
[Magisk] Wolfcity:
You're welcome. Maybe it's best to never touch a running system;)
[Magisk] acspdx:
[deleted]
[Magisk] VR25:
Everyone,

Our prayers have been heard - FINALLY!

Magisk is going image-less. Pre-release builds already deprecated EXT4 images.

That means the F2FS bug will no longer break Magisk's functionality.

It has been a nice ride. This module will die soon. If I have time, I'll push one last, R.I.P. update.

Thanks
[Magisk] tag68:
But now, starting with Oreo, Magisk needs a pre-modified bootimage, at least on Moto Z Play. Early mounting lets Magisk patch algorithm fail. I'd wish to have the state wich X Play had - just flash any version of Magisk and be glad ...

Fine that the f2fs bug won't harm anymore, thank you for the message :)
[Magisk] madbat99:
That's a different issue. Several motos have it. Verity is not in the same place, it's in the dtb file for those devices. That has been the case for those devices all along (Oreo), but doesn't exist in all motos. I have a g6 play that shipped with Oreo, and it does not have that issue. Although the regular g6 does.

There are fairly straightforward instructions on how to patch the boot.img to remove dmverity in those situations.
[Magisk] tiger10000:
please help

i have infinix zero 5 x 603 meditek running nougat 7.0 rooted with magisk 18.1 manager 7.0 twrp recovery . root is working great but i cannot install any moudel when i try to install f2fs workaround via recovery my data and cash partition is f2fs format when i flash the moudel it fail as it should be ext2-4 when i chane the format to ext 2-4 the phone wont boot up any fix for my problem
[Magisk] Didgeridoohan:
Wait for the next stable release or start using the Canary builds right now. The current code has removed the use of the Magisk image altogether and faulty f2fs will no longer be an issue.
[Magisk] tiger10000:
You mean the next stable version of magisk?
[Magisk] Wolfcity:
Yes. Next stable will be "imageless" but you can move to Canary channel, these builds have already removed the use of magisk image.

But be aware that Canary is kind of alpha status, so bugs can occur. You'll find them here:

https://xdaforums.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337
[Magisk] tiger10000:
Thank you wolfcity for your help I will wait for the new version of magisk
[Magisk] Damian93mad:
I have oreo in my motorcycle z play and even if I have root it does not let me install applications as a system or edit / add / delete lines of build.prop, with this the problem is solved?
[Magisk] Wolfcity:
No. This mod is only for devices with a F2FS formatted data partition and a kernel bug which makes img files unable to be mounted r/w. The use of it is to be able to install magisk modules. Also this problem occurs on Nougat in most cases.

If you're rooted with magisk you should try to understand the mechanism of systemless rooting.

For example if you try to edit things in /system or build.prop you have to know that these locations are symlinked by magisk so you are changing things at the wrong location.

I recommend to read this guide about magisk:

https://www.didgeridoohan.com/magisk

There are magisk modules to change build.prop entries for example.
[Magisk] Damian93mad:
I looked in the thread that you left but it does not say anything about how to edit the build.prop, you could send me a link on how to do it or it bothers you if I send you a mp so you explain to me xfavor I am completely lost
[Magisk] Wolfcity:
Are you rooted with magisk?

The link was more for the understanding of magisk itself as a systemless root solution.

Check the module section of Magisk Manager for something that fits your needs, for example: https://xdaforums.com/apps/magisk/module-magiskhide-props-config-t3789228 for prop editing or https://xdaforums.com/apps/magisk/module-terminal-app-systemizer-ui-t3585851 for making apps system apps.

Anything you want to change in /system (also build.prop) can be done with magisk modules as the one above.

For further questions I recommend to ask them in the magisk support thread: https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/page3163
[Magisk] Damian93mad:
So I install magisk hide props confi and inside magisk in modules I can edit build.prop or with any editor?
[Magisk] Wolfcity:
That module has to be used by a terminal on your device.

When you flash it (through Magisk Manager or TWRP) it explains itself. After a reboot just open the terminal and use one of the given commands.
[Magisk] Nivramyaj:
Could this work on android 6.0.1 marshmallow...i have problem installing modules in magisk version 20?
[Magisk] Wolfcity:
No. This is just for potter devices running 7.0 with f2fs formatted partition. Your problem must have another reason.
[Magisk] mhp1995:
Got an OTA update (security update)... Have gone through this procedure & rooted my phone successfully... My question ia how do i apply an OTA? I didnt permanent flash the TWRP... Only root... No system or boot modification... Do i just neet to flash the stock recovery or do i need to do anything else before updating to d new security patch? Please help i dont wanna brick my phone just over OTA...
[Magisk] G4liant:
If you are still having the stock recovery and no other modifications in your system partition i think you will be fine. No way this could wrong. The worst outcome would be if the recovery does deny the OTA because of failed checksum. Then you have reflash the modified partitions as shown by the stock recovery. Those checksums in the OTA should keep your phone from bricking.
[Magisk] mhp1995:
Hey guys, i have a retin ver of moto z play... Unlocked, rooted via magisk & running nougat on january security patch.... Everyrhing is working great... I recieved an OTA a long time ago but cudnt find the time to install & update my phone... I have recieved an update which fixes notification tone bug...now i want to update via ota... I downloaded the ota and allowed the phone to restart & install d update... However while installing i got error... It says something like cache/recovery..... .... Includes unexpected contents or sumthing like that... What does this mean and how do i fix this... I wanna update my phone... I didnt modify any system file... I just got root explorer, lucky patcher and magisk running... No changes to the system... oh and i have selected "enabe busybox" option in magisk... Has it got to do anything wid this?? I didnt flash the twrp just temporary booted it... oh i forgot to mention... i have installed f2fs fix kernel...Do i need to unroot & delete magisk? Do i need to revert to stock kernel?? Someone help me how do i update?? Thnx
[Magisk] tag68:
f2fs fix installs kernel on boot. Magisk installs itself on boot. If boot is modified, OTA does not work.

Restore original boot partition and you should be done that all changes are reverted and the OTA succeeds. No guarantee, it is easy not to recognize some change on system by some app you granted root access.

For more detail you need to post that last log from /cache/recovery where the error occurs (if you do, please attach the file, not copy paste). My experience with OTA is that there is often some unexpected fail which you don't know without analyzing that log.

If you don't want to hassle and analyze in detail, just dirty flash your rom should help also. You could do this if flashing only boot partition does not help making OTA run without errors.
[Magisk] Gorship:
I have root working and safetynet passed, I cannot however seem to update the app itself, error -505.
[Magisk] mhp1995:
So i dont need to unroot the device from magisk manager or something?? Flashing the stock kernel (boot.img) will stop the root from working..right? And what abt the bootloops and stuff? After flashing the stock kernel and not unrooting the device, will i see bootloops and is there a chance of brick? I am thinking of just flashing the boot.img and continue with the OTA... If OTA succeeds, will again flash the f2fs fix kernel and install magisk again... Can u suggest what and how should i proceed? Thank you for the answer
[Magisk] tag68:
Magisk Manager is just an app that accesses the services provided by MagiskSU, which is contained boot.img. You are safe to ignore it. Flashing boot partition is unroot. If you didn't change anything on the other partitions recovery, system and logo, your plan is right. Do a backup of boot, system and recovery using fastboot boot twrp, so you can go back if it does not succeed for any reason.

Do a backup of data and data/media if something goes wrong. It never hurts if you don't need it. It hurts only if you need it and don't have ;)