yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
Wait... why did you run those commands in the first place? You may have messed things up by doing that.

The latest versions takes care of everything. What you've done is only for the "NOMOUNT" variant I uploaded a couple of days ago.

Regarding "rm /data/magisk.img /data/adb/magisk.img 2>/dev/null" -- you only run that to remove all traces of magisk.img before installing the module for the first time.
[Magisk] Wolfcity:
Ok, then I was lucky that the first two commands didn´t work in a terminal. I removed magisk.img from data and data/adb and gave "rm /data/magisk.img /data/adb/magisk.img 2>/dev/null" in TWRP, than flashed your module and until now everything is fine.

edit: TWRP wasn´t able to hold any settings like locale time or vibration intensity before.Now it does, so it seems it is also affected by the loopback bug.
[Magisk] Wolfcity:
Just want to give some feedback: This mod (latest update) works perfect on my Moto G5+. I updated magisk from 14 over 15.2 to 15.3 without any issues. Magisk modules (Viper, Dolby Atmos, Doze for Google services) are working and stay installed over the updates, magisk hide too. It even fixed the official TWRP recovery that wasn't able to hold any settings like language or stay 'read only' on my device.

Awesome job [MENTION=5228676]VR25[/MENTION]! Thanks a lot.
[Magisk] tyty48:
I'm about to buy a Moto G5S Plus to replace my Moto G4 Plus (which doesn't have this bug) so I'd like to know if it suffers from this F2FS Loopback bug ?
[Magisk] Wolfcity:
Would be the best to check the devices thread.

And yes,it seems so: https://xdaforums.com/moto-g5s-plus/development/kernel-t3707143
[Magisk] skymera:
I have an issue on my OP3 where Magisk can't access su.db

Does this module resolve?

My modules work fine , Superuser is broken
[Magisk] Wolfcity:
I don't think so because the loopback bug prevents img files from being mounted r/w. But you can check if your data partition is f2fs formatted. If yes (and your cache partition isn't f2fs formatted too) you can give this module a try.

Edit: One question to [MENTION=5228676]VR25[/MENTION]: As I posted on the previous page your mod works perfect on my Moto G5+, I just want to know if I have to be careful in any way with the cache partition? Can I use apps like SD maid of more important can I clean cache and/or dalvik in TWRP when it's recommended or will my magisk installation be damaged? If yes any workaround?
[Magisk] VR25:
The module automatically runs cp -af /cache/magisk_img /data/magisk_img_bkp shortly after boot. So, if you wipe /cache, simply restore the image backup in TWRP by running cp -a /data/magisk_img_bkp /cache/magisk_img -- or reinstall the module -- it'll do the job for you.
[Magisk] Wolfcity:
Ok,thanks for that. Another small issue is that my magisk sound modules (Viper and Dolby Atmos) only work over headphones when I reboot the device with the headset plugged in. Ist there a way to emulate this with a command/ script or is the reboot essentiel?
[Magisk] blips75:
bug Workaround dont work on doogee s60 / aermoo m1
[Magisk] nicolap8:
Simply doesn't work.

Installed from a clean stock,

flashed twrp

installed magisk 15.3

installed F2FS LBW

reboot

changed some settings

reboot

lost all settings!

File present:

/cache/magisk.img 8 MB

/data/adb/magisk.img 64 MB

From the Magisk log it's clear that it try to mount the image in the original path.
[Magisk] madbat99:
It works. You should say "doesn't work on my device/setup". Then post logs, device info, rom, partition details, etc.

Is f2fs bug your issue? Did you flash in twrp?
[Magisk] sam00561:
i had the same issue on moto z play then i wiped everything and installed rom gaaps the loopback fix module and finally magisk. I belive the fix module has to be installed before
[Magisk] nicolap8:
[MENTION=5228676]VR25[/MENTION]: it's true? If yes, maybe you can write in big on the first post, so people like me stop bothering...

EDIT: only after posting I saw the new version! :))

This is that I've done:

adb shell
su
rm /data/magisk.img /data/adb/magisk.img
ln -s /cache/magisk_img /data/magisk.img
ln -s /cache/magisk_img /data/adb/magisk.img
reboot

Now Magisk it's working, at least the settings are saved and AdAway works systemlessly.

Thanks :)

N
[Magisk] VR25:
Not at all. The thing is, users who already used Magisk before implementing the workaround must remove all Magisk image files prior to installing the module. If these files exist during installation, then symlinks creation fails and things don't work as intended. Obviously, the issue doesn't apply when you perform a clean install.

The good news is, I've updated the module to automatically find and remove the aforementioned image files so that users don't have to. Yay!

Pro tip: if you wipe cache, either accidentally, intentionally or it gets erased by aliens somehow, simply reinstall the module. It'll restore the image backup -- /data/magisk_img_bkp --> /cache/magisk_img.
[Magisk] razr96:
So if you want to migrate your current magisk.img rename it to magisk_img_bkp and move to /data?
[Magisk] VR25:
Correct.
[Magisk] Didgeridoohan:
[MENTION=4470081]topjohnwu[/MENTION] moved all Magisk files (except the stock boot image backup) to /data/adb so that apps will have a harder time detecting Magisk. Might be a good idea to move the image backup there as well.
[Magisk] Wolfcity:
Is it recommend to flash the latest update from 24.1. even when the one before is working?

And if yes, just flash it over the old one?
[Magisk] VR25:
You don't need to, but you certainly can without any issue (and yes, flashing over previous versions works just as well).

The latest version addresses the existing image files issue causing installation to fail. Previously, users had to remove those files manually before installation -- now that's done automatically by the module itself.

---------------------

**2018.1.31 (201801310)**
- Image backup moved to /data/media to comply with Magisk Hide policies and survive factory resets
- Major optimizations
- Two image backups are now performed as opposed to just one
- Updated reference
[Magisk] MikeyLee:
I'm continuing to get this error with any module. dAta/adb/magisk_merge.img mount failed

Can anyone help? Magisk worked fine until I update my firmware.

Bootloader is still unlocked, device is rooted, stock firmware, still nothing will install. I flashed this workaround and still nothing.

Ulefone T1 Nougat
[Magisk] Wolfcity:
If you flashed stock or stock update your device should have been unrooted?

If you've installed magisk afterwards again it should work as before. If not full unroot your device (flash stock boot.img, use magisk uninstaller and unsu.zip by Osmosis) and try again. If magisk worked for you before the update this module won't help you. It's only for devices with f2fs formatted data partition. Check if that's the case. If your cache partition is not f2fs formatted you can give this module a shot but I don't think that the update reformatted your data partition, you would have lost all your personal data then.
[Magisk] MikeyLee:
I actually did lose everything when I updated. The phone was completely reset, all apps and data gone. The only thing that remained was the bootloader was still unlocked. How would I check to see if it was changed to f2fs?
[Magisk] Wolfcity:
You can see it in TWRP (wipe ,format, check data) or with a app like this: https://play.google.com/store/apps/details?id=me.kuder.diskinfo

But it would be very uncommon to change the filesystem by an OEM update.
[Magisk] raunaqseth:
Only the 3 apps are saved after flashing the zip
[Magisk] MikeyLee:
I checked this and it is still etx4. I'm going to try uninstalling Magisk with the app and re flash with TWRP and see it that works.
[Magisk] Wolfcity:
Check if your data partition is f2fs formatted and your cache partition ext4 (in TWRP-wipe-format data or with an app like this ).

If not this mod won´t help you. I don´t know your kernel but normally a custom kernel (for example ElemementalX) should solve the loopback bug and the mod won´t help you too.

The best would be to ask in the kernel developers forum if the kernel fixes the loopback bug because that´s all this mod does.
[Magisk] m.mishka:
Firstly thank you so much for your help - it all checks out. It's f2fs for data and ext4 for cache. I'll go ahead and back up all things important, and then have a go at flashing it. And secondly, huge apologies for all the autocorrection awfulness in my previous comment - even I had a hard time deciphering what it was I was trying to say there:
[Magisk] Stanney:
"Always install large modules from recovery mode only -- to avoid issues due to limited cache size."

Could someone define "large modules", what exactly is considered large files size for modules?

Just out of curiosity what is the cache size limit and does installing from recovery mode ignore that limit?
[Magisk] Stanney:
Hello,

I have Bluboo S1 phablet (MT6757) running with Nougat 7.0, with stock ROM (This is my first time rooting an android device, so don't have much knowledge, only what I have read in the past two weeks :P)

After few days of struggling I managed to install TWRP 3.2.1 and Magisk 15.3 (+ Magisk Manager 5.5.5)

When I tried to install the modules Greenify4Magisk v3.9.5 and Debloater (Terminal Emulator v8.7 and/or v8.8.2) from the list in Magisk Manager/Modules/Downloads, I end up in failure.

Tried installing only these two modules so far, but I actually only care about the Debloater, as I want to remove and disable some apps, which are part of the original firmware and cannot be modified without root access.

Attempted installing them from the Manager and flashing through Terminal (while in recovery) both ways, both apps/modules ended up with "Updater process ended with ERROR: 1

Error installing zip file..."

In the Magisk logs there are the lines showing the errors: “failed with 13: Permission denied…” typical for the F2FS loopback, that is why I downloaded from Magisk Manager/Modules/Downloads the module “F2FS_Loopback_Bug_Workaround-2018.1.31” and flashed it through Terminal (while in recovery) but got the Error: 1 – failed installation.

Checked my data, system and cache partitions with wipe-format data (yes I had to flash my device again, due to no OS after that :D), DiskInfo app and Terminal using the command “mount” – where all these showed that my partitions are in EXT4 format.

Read the whole thread here but either I missed what could help me or it wasn’t there.

Please help me run Debloater, so I can remove/disable apps I don’t need (two are actually Adware viruses).

So if you need more info ask away, will provide whatever I can.

Logs are below (TWRP log, TWRP recovery log, kernel log, Magisk Install log and Magisk Mgr log):

https://www.dropbox.com/s/qv1or8ut51xf3uc/dmesg.log?dl=0

https://www.dropbox.com/s/khtgwecwbtdcj5k/install_log_20180211_160853.log?dl=0

https://www.dropbox.com/s/03zq4cmkl93pkq2/KpshLog.txt?dl=0

https://www.dropbox.com/s/mqbb2w4fftufoju/magisk_log_20180211_161016.log?dl=0

https://www.dropbox.com/s/8svh3azifwnz2pg/recovery.log?dl=0
[Magisk] Sebastl:
Hello Stanney,

this is a different problem a few (MTK) devices show up with.

It has to do with the unability to mount or write to the image file via loop device.

Find more infos in the Magisk Beta Thread.

Last Post on that topic is 4969

I tried to adapt VR25s work (thank you very much - great help !) to use /sdcard instead of cache, but again it fails mounting ;(

read
[Magisk] Stanney:
[MENTION=1959263]Sebastl[/MENTION], So I am not sure I understood all what was written, but you guys are still trying to find a workaround for this as well?

"I can confirm that mounting/writing to magisk.img works manually if the file is on /sdcard

Everything works if the image is in /storage/sdcard0. I could even mount magisk.img and write to it when moving it there."

I am not sure about the above, is this something you are working on or is it something that I can try to make it work?

I only need a program to enable me to uninstall/remove and disable few pre-installed apps/viruses.

Anything I can use instead, another program perhaps? (I would really like to enjoy the extras of Magisk though) :)
[Magisk] Sebastl:
We are still looking for a solution.

That post in that thread was just the last one in the "research process". Read back if you are interested.

If you are affected by this particular kind of Permission 13 / Mount problem you can only use Magisk and its SU capabilities but no modules.
[Magisk] Wolfcity:
Just a small hint If you're not aware of it:

As [MENTION=1959263]Sebastl[/MENTION] wrote you can use the normal SU capabilities of magisk and if your main problem is to remove some system apps to debloat your ROM it should be easy to do that job with Titanium backup, SD Maid or even manually be deleting these apps with a file explorer like Mixplorer or Solid Explorer. I mostly do that with Titanium.

So there's no need for a debloater module.

Just saying, you can't use magisk modules but you can easily get rid of bloatware with root privileges.
[Magisk] Stanney:
Isn't there a way to manually install the Debloater not as a module?

Is Titanium backup compatible with Magisk rooting, can I use it instead?
[Magisk] Didgeridoohan:
Take a look at the post above yours.
[Magisk] swat4samp:
Can someone please correct me if I'm wrong? All I have to do is to flash this module from twrp after flashing magisk and that's it? I did that but had no changes from default behaviour ( SuperSU requests not saving). I'm on OP3 with data partition as f2fs and cache as ext4.
[Magisk] Wolfcity:
You just have to flash it from twrp, that's correct. As you write 'SuperSU': This is meant to work with magisk. If you use magisk try to reflash the latest module and check if the module appears in magisk manager. Take a recovery log (after flashing and before booting) in twrp and post it together with a magisk log.
[Magisk] madbat99:
It doesn't sound like you have loopback bug issue.
[Magisk] swat4samp:
Sorry, I meant to say superuser requests. I will try to clean flash ROM and then check it once again.

TBH i don't know about this loopback issue. I tried this module only after a suggestion from magisk thread for those who are facing issues with f2fs partition.
[Magisk] VR25:
Been out for a while due to random internet access issues.

I skimmed through what's been discussed lately... found something curious: putting Magisk images in /storage/emulate as opposed to /cache. Unfortunately that won't work. The emulated storage is not available early enough to accommodate Magisk -- in fact, it's not even close.

That's an interesting attempt, though. It may be possible to use ESDFS, SDCARDFS, FUSE or any other mechanism to emulate an alternate path for Magisk images early enough. This would in turn kill the need for F2FS fix and size limits altogether. That has to be done by Magisk itself before the image gets mounted.

I'll study the possibilities. [MENTION=4470081]topjohnwu[/MENTION], you might find this relevant as well.

------------------------

Will talk about other subjects later. Currently, I don't have much free time.

P.S., the module automatically checks whether cache is EXT4-formatted.
[Magisk] fr3d0x:
Works great with g5 plus
[Magisk] kewlzter:
I'm having difficulties with this.

if I disable/uninstall/install a Magisk module, upon restart..... every background startup app crashes over and over including system.

it seems I have to delete all the backups, clear the cache(s) then reinstall everything just to uninstall a module. if I don't delete the backups, F2FSlb will restore the deleted modules.

and each module installation has to be done in recovery regardless of size.

this is too complicated, for it not to be somehow broken on my phone!

any ideas?

Thanks

Moto Z²P
[Magisk] Wolfcity:
Don't know what goes wrong there. Normally this module is "flash and forget". I can install modules through magisk manager (magisk 16) and they are working fine after reboot. Give some more information, are you sure that your /data partition is f2fs? Any custom kernel/rom installed? Is this module shown in the list of magisk modules inside the manager?

Maybe provide a magisk and recovery log of the module flash process.
[Magisk] kewlzter:
Motorola Moto Z2 Play.

yes the cache is ext4, and others F2FS,.

There are zero errors until restart. I have about five modules installed,

Yes! It used to be a smooth "flash and forget" process until recently after one of the updates, (hard to say which one, as I'm not tinkering with Magisk Modules everyday) .

took me a few days to troubleshoot including a factory reset.

There are no indicators. Nothing amiss in the installation logs. No errors or red text. Just a nightmare upon restart.

I'm on Stock 7.1,

All modules are listed and functional, but if I try to disable one, or uninstall one......... when I restart the crashes start.

Then I have to install F2FSLB, again, this restores the deleted/or disabled modules. and I'm back to where I started.

Or I have to delete the backups clear the cache, install F2FSLB again, along with all desired modules stored in my Magisk directory (minus the one I don't want. LMAO).

Just tried installing an emoji Module, and the nightmare returned. had to clear cache, reinstall F2FSLB, just to startup (without crashes)
[Magisk] Didgeridoohan:
Logs...

Magisk log, Magisk debug log, logcat, etc...
[Magisk] kewlzter:
I was able to fix it, by restoring a backup from early last month. I was trying to avoid this because they are stored on NAS, and it takes forever to transfer.

Then slowly I started installing crap until I found out what breaks F2FSLB, long day, install a group of things, test Magisk module in/Uninstall, reboot, repeat......

Things are now working as intended.

I can install and Uninstall all the emojis without fear.!

:)
[Magisk] Wolfcity:
And what was it breaking f2fs loopback modules functionality? Maybe you can explain, just for other users running into the same issue?
[Magisk] kewlzter:
' Marshmallow SD fix' .

An app (From PlayStore) that has sat idle for years spanning Three of my phone upgrades.

It has an Xposed hook, and about a week ago I turned it on, and used it with my favorite torrent client (Flud).

It's a shame because the app works very well, and is super simple, with nice interface.

But! I believe other Xposed modifications can also do it. I turned on too many GravityBox activities, and achieved the same crash results.

My Xposed is installed via Magisk.
[Magisk] VR25:
**2018.3.6 (201803060)**

- Check whether data and cache have the required filesystems

- Misc optimizations

- Run magisk_merge.img re-creation service in background to prevent delays/interferences in other Magisk tasks

- Upgradeable from Magisk Manager

----------------------

I've been very busy lately. The worst: accessing the internet has just become much more difficult and expensive in my current location. As a result, my online presence is greatly restricted, but I'll still keep pushing updates and providing support whenever possible.
[Magisk] YoshiFan501:
I try to install this on my Pixel 2 XL in TWRP but it says Failed to mount /cache.
[Magisk] Wolfcity:
Are you sure your data partition is f2fs formatted?
[Magisk] YoshiFan501:
no it says it's ext4.

would making it f2fs fix the bug of not able to install modules because of /data/adb/magisk_merge.img mount failed?
[Magisk] Wolfcity:
I don't think so. This module is only for devices that have a f2fs formatted data partition in correlation with a kernel bug so that the device isn't able to mount img files r/w. These are mostly Motorola devices. So if you don't have that special bug (and as your data partition isn't f2fs you don't have it) this module won't fix your problem. It must be something else than.
[Magisk] sam00561:
could someone help i am on latest lineage nightly and this loopback fix doesnt work anymore i cant install modules and when i try to open magisk manager after flashing the fix it crashes.
[Magisk] madbat99:
Are you sure you need this?
[Magisk] sam0056:
Maybe there is another way but I need to install iyoutube black theme module and viper for sound I really need these to work but can't get any modules to install
[Magisk] Wolfcity:
What device? First check is your data partition formatted f2fs? If not this module won't help you. You can find it out in TWRP (wipe-format data) or with an app from playstore.
[Magisk] miguel7501:
I have a Oneplus 5T and flashed the Open Beta 4 (8.1). The first time magisk worked perfectly, but a dolby atmos zip caused a bootloop. I dirty flashed the OTA and magisk, wich lead to bootloops again and me eventually finding this thread. It worked that time. Due to a bad TWRP backup, my entire device got wiped. Now I got the same issue as before but the fix does not work anymore. Last time, I already had xposed and the blu_spark kernel running (wich should not be relevant since the OTA flash clears those things). Other than a wiped device, there is nothing appearant to me that changed. I am currently on an unrooted device. Any suggestions?
[Magisk] Wolfcity:
Is your data partition f2fs formatted? If not this module won't help you. If you are unrooted atm this module can't work anyway, as it moves magisk from /data to /cache so magisk has to be installed first.

Also when you flash a custom kernel this module shouldn't be needed.

But first check your data partition (in TWRP, wipe - format data or with an app). Only devices with f2fs formatted data partition and a special sort of stock kernel are affected by the loopback bug.
[Magisk] miguel7501:
I just checked and my device is indeed formatted in ext4. I read about this fix in another thread where it was recommended for the 5T specifically and it worked for me, so I assumed it would be F2FS. I have flashed the module directly after magisk that time and everything went smooth. After checking my logcat it appears that /sdcard cannot be mounted. The "OEMlogkit" process spammed "waiting for internal sdcard to be mounted". Any other suggestions on this problem? Flashing the Open beta 4 OTA will allow the device to boot, but it overwrites the entire system partition and removes any traces of magisk, just like TWRP.
[Magisk] Abish:
Tried this

First time works like charm later I got problems device strucked to boot loop until I cleared cache ... And uninstalled magisk ?

Unable to install magisk steamless Xposed or any of its module :( woried how to make it work again

Using Moto e4 retin woods

:confused:
[Magisk] Wolfcity:
[MENTION=5228676]VR25[/MENTION] posted this when I asked what to do if I accidentally delete the cache partition or similar things:

So just reflashing this module (or running the commands) should work, maybe twice until it shows up in the Magisk Manager modules. I would run the actual magisk uninstaller, reflash magisk (or patch the boot.img) and this module.

Took a look at your logs (I'm not a pro in reading logs) and it seems that magisk isn't installed correctly, there are mount errors so maybe the loopback bug module isn't working.

As written above: Run magisk uninstaller, reflash magisk and loopback bug module.
[Magisk] romhippo.com:
Great! But did you forget to attach this new version to your first post?
[Magisk] Didgeridoohan:
It's in the Magisk repo. Download from the Manager.