Problem installing modules (magisk.img failed to mount) - Magisk

I've tried installing multiple modules by both directly using the magisk manager and flashing them in recovery and both don't work, I'm using magisk 15.1, on Android 6, mtk6735 device. The problem I face is that in magisk manager when I try to install a module it says "magisk is not activated" and during the installation during recovery mode it says "magisk.img failed to mount", any help would be gladly appreciated

simply the most awesome said:
I've tried installing multiple modules by both directly using the magisk manager and flashing them in recovery and both don't work, I'm using magisk 15.1, on Android 6, mtk6735 device. The problem I face is that in magisk manager when I try to install a module it says "magisk is not activated" and during the installation during recovery mode it says "magisk.img failed to mount", any help would be gladly appreciated
Click to expand...
Click to collapse
Probably f2fs loopback issue. You need a custom kernel, or at least a patched boot.img. there is a module that claims to fix this issue. Search magisk section for f2fs loopback work around.
Here's a link f2fs loopback issue workaround
This may not be your issue because usually ppl with this issue still have magisk working for root. Just get the "failed to mount" issue installing modules.

madbat99 said:
Probably f2fs loopback issue. You need a custom kernel, or at least a patched boot.img. there is a module that claims to fix this issue. Search magisk section for f2fs loopback work around.
Here's a link f2fs loopback issue workaround
This may not be your issue because usually ppl with this issue still have magisk working for root. Just get the "failed to mount" issue installing modules.
Click to expand...
Click to collapse
Tried that module, installing it gives the exact same issue, error:1, magisk.img failed to mount, any help would be appreciated

exact same here, Workaround spit out same issue, any help?

Works well on my Moto
But even when every thing is flashed property there is no module shown in module list of magisk tried Mount magisk :crying:and f2fs both but only worked after formatting my data f2fs again:angel:
Like repair via TWRP and starting with fresh ROM PARTITION

same problem here , im on stock rom with stock recovery i installed latest magisk and then i flashed xposed frmaework through it ,it installed and working now even , but i dont know why every time i want to install a module from repo or file manager it says magisk not activated or magisk not mounting , for example i wanted to instal camera 2 api enabler but no success , any solution? what is the problem?

It's really annoying this issue is never fixed no matter how much we request help from the devs. I'm thinking of switching to another Su app at this point, happens across all my devices.

same issue here.I do not have a recovery, used it once for boot, maybe that is the problem? but it used to work fine,

Related

[BUG] Magisk refuses to install modules from repo (The zip is not a Magisk Module!)

I've had magisk installed since version 6, I've published some magisk modules already and never had a problem until today.
After a full clean reinstall of Nougat NBD90Z (with wipe) on my Nexus 6 and then flashing Magisk, phh's superuser for magisk, installing phh's superuser apk from play store and magisk manager apk I stumbled upon a previously reported (without details) bug where magisk manager would refuse to install modules from repo claiming they are not magisk modules.
I've struggled trying everything I could including the full wipe (more details here: http://forum.xda-developers.com/apps/magisk/module-app-systemizer-t3477512/69230448#69230448) and bounced some ideas off @pnwsr6 who's had the similar problem on Nexus 6 device.
I've achieved a partially working Magisk Manager (manual installs of ZIP files work, but installs from repo still fail) and here's the list of steps which lead to me having semi-working magisk manager again:
1. I flashed ZIP files of some modules in twrp (I'm attaching App Systemizer and Nexus 6 LED Enabler which I flashed)
2. After the phone booted up I saw the modules active and working
3. Within Magisk Manager I then added the ZIP file of the phh's superuser module from that thread (http://forum.xda-developers.com/attachment.php?attachmentid=3893967&d=1475554052)
4. Now at least manual installation of modules within Magisk Manager are working fine.
@topjohnwu -- I've enabled verbose logging and extra logging for bash commands, but I'm still not seeing anything in the log on top of the regular output.
Created an issue against Magisk Manager so it's easier to track for developers: https://github.com/topjohnwu/MagiskManager/issues/20
Looks like that even after flashing some modules in twrp, Magisk Manager only allows to install from zip only exactly the same ZIP I've already flashed (even a minor change and bump of versionCode results in "This ZIP is not a Magisk Module!"). So it might be an issue of Magisk Manager being unable to write to /magisk despite having storage permission and being granted root access.
Well, it works now (you'll have to wipe again). So here's the sequence of events:
1. Flashed @RatchetPanda's busybox http://forum.xda-developers.com/attachment.php?attachmentid=3850579&d=1471875389 from twrp -- got stuck on a boot animation, rebooted again in twrp, flashed magisk uninstall and it didn't help for some reason.
2. So I force-rebooted into fastboot and flashed nbd90z with wipe.
3. After apps were restored and everything was set up, I booted into twrp (it didn't even ask me if I want to allow /system modifications for some reason), added magisk v8 and phh's r259 root to the list, flashed them both.
4. Once the phone booted I could again install modules from repo/zips.
Maybe something didn't get properly wiped first two times but it's working now @pnwsr6!
I've seen this error as well on my Nexus 6 NBD90Z with Magisk v8. Started with v7 after some heavy modification on my part .
I was sometimes able to fix it by simply extracting the zip and then Magisk Manager would somehow recognize it as a module.. Other times I could extract the zip and then re-archive the contents and Magisk Manager would recognize that as a module. Weird, but doable.
stangri said:
Well, it works now (you'll have to wipe again). So here's the sequence of events:
1. Flashed @RatchetPanda's busybox http://forum.xda-developers.com/attachment.php?attachmentid=3850579&d=1471875389 from twrp -- got stuck on a boot animation, rebooted again in twrp, flashed magisk uninstall and it didn't help for some reason.
2. So I force-rebooted into fastboot and flashed nbd90z with wipe.
3. After apps were restored and everything was set up, I booted into twrp (it didn't even ask me if I want to allow /system modifications for some reason), added magisk v8 and phh's r259 root to the list, flashed them both.
4. Once the phone booted I could again install modules from repo/zips.
Maybe something didn't get properly wiped first two times but it's working now @pnwsr6!
Click to expand...
Click to collapse
I probably won't try again until next update, and hope the wipe just wasn't clearing something. I have the zip installed through twrp and working for now so I'm good till then.
just wondering if you're still having this issue with v9? I had modules installed fine under v6, but never really installed any modules under v8 to see if this problem occurred for me. now that I'm on v9, which has been wiped clean to start, I can no longer install any modules via Downloads or in the Modules section... any suggestions?
I have the same issue when trying to install viper with v9 on Nexus 6P DP2
Skickat från min Nexus 6P via Tapatalk
Same here. Find a fix ?
From what I hear, ZIP/module management has been reworked in the upcoming magisk v10, so unless you want to go the route I went thru, you can just wait for that.
stangri said:
From what I hear, ZIP/module management has been reworked in the upcoming magisk v10, so unless you want to go the route I went thru, you can just wait for that.
Click to expand...
Click to collapse
Just an FYI, I do still have this problem, but can install the zip through twrp. Maybe 10 will be the solution.
I had the same problem, I cleared magisk manager data and it works fine now
Didn't help
Sent from my SM-G532F using Tapatalk
I've published snapshot builds of magisk v10 and magisk manager v2.6, try these together to see if they'd help.
stangri said:
I've published snapshot builds of magisk v10 and magisk manager v2.6, try these together to see if they'd help.
Click to expand...
Click to collapse
I tried the latest one from the 26th, magisk manager keeps crashing when trying to install the downloaded dialer/contacts on HTC 10.
Meowdib said:
I tried the latest one from the 26th, magisk manager keeps crashing when trying to install the downloaded dialer/contacts on HTC 10.
Click to expand...
Click to collapse
Weird, do you have the same problem with magisk manager 161223?
stangri said:
Weird, do you have the same problem with magisk manager 161223?
Click to expand...
Click to collapse
Same
I need a Help to download modules using magisk
Lastest version, Included phh root, manager is from G. play,
But Modules download function is not working
Say "No modules found" for download to install via magisk.

Module installation errors

Hi everyone, just got a Moto G5 flashed AEX and Magisk. Now, when trying to install Viper4Android through the repo I get "/data/magisk merge.img mount failed". If I try to flash the ZIP for V4A manually through TWRP it comes back with "Error 1". What gives?
Oops maybe should have posted in general discussion thread
So it's not just me then? The merge error went away with one of the newer updates on my G5 Plus, but even though the script says SUCCESS the modules never install.....running Stoneware .67 and ElementalX 2.01 with Magisk 14.
I got the same problem trying to install module for greenify, audio mod, gms mode
But some work too
Nexus 6p, nougat
Same problem with my Doogee S60
Aneuryst said:
Hi everyone, just got a Moto G5 flashed AEX and Magisk. Now, when trying to install Viper4Android through the repo I get "/data/magisk merge.img mount failed". If I try to flash the ZIP for V4A manually through TWRP it comes back with "Error 1". What gives?
Click to expand...
Click to collapse
It's on most moto phones. F2fs loopback issue. You either need a kernel (or at least a boot.img) patched to fix loopback issue on f2fs, or there is a flashable zip that may fix it. The zip moves the magisk.img to /cache and links it to the original location. It does more but it's alot to write. I'll grab you a link.
Found it f2fs loopback bug work around

modules fail to install

so I'm running a Huawei nova plus and magisk works fine but modules don't install no matter in twrp or magisk app I get halted at /data/magisk_merge.img failed to mount installation stopped is there any fix or am I screwed for viper4android (cant install normally as the driver just never installs)
Same error in my Xiaomi mi a1
Delta wolf said:
so I'm running a Huawei nova plus and magisk works fine but modules don't install no matter in twrp or magisk app I get halted at /data/magisk_merge.img failed to mount installation stopped is there any fix or am I screwed for viper4android (cant install normally as the driver just never installs)
Click to expand...
Click to collapse
Same problem on some moto devices. It's due to f2fs format. You would need custom kernel that supports a different file format for data (like ext4). So if kernel sources for your device are available, you need to compile it with different data format options.

Strange Magisk installation behaviour

Hi guys.
I'm facing an issue with Magisk (stable and beta) that I never had before. I'm on OP5, PixelExperience, Android Pie (but I've tried also on a Oreo ROM yesterday, not sure if it was stable or beta version of Magisk). Here's the flash routine I do for every single ROM:
- Wipe everything, internal storage included
- Flash ROM
- Flash Magisk
- Boot
In the past few days, Magisk isn't installing MM, don't know why. It always installed MM on every single flash I did in my life, now suddenly it isn't installing it anymore. I haven't changed my flashing "habits", I do the exact steps I wrote above on every single flash (not on updates, of course).
This issue also leads to not being able to install modules from MM, but I can install them via TWRP (I've got the latest blu_spark, I'm decrypted, flashed no_verity_v2 for OP5). When I install modules via MM it says:
! /data/adb/magisk_merge.img mount failed.
I tried re-installing Magisk, using the uninstaller and then first time the stable, then the beta, but they won't installing MM after flashing.
What do you guys think?
Thanks.
EDIT: I've recreated the issue, I've attached the log. I tried 2 different modules, Sysconfig Patcher and Busybox. The first one is installing only via TWRP (via MM it produces the log in the attachments), the second one is istalling via MM correctly.
"update-binary: line 203: make_ext4fs: not found"
Unable to format the .IMG to ext4 it seems so there's no magisk merge image to be mounted
Not entirely sure where to go with that but it could be a start.
Bad version of twrp?
If I understand you correctly, the Busybox module install just fine, no matter if installed through the Manager or TWRP.
Have you tried other modules?
The Sysconfig Patcher module isn't using the official module template, so it's very likely that @VR25 need to fix something in his install script.
Didgeridoohan said:
If I understand you correctly, the Busybox module install just fine, no matter if installed through the Manager or TWRP.
Have you tried other modules?
The Sysconfig Patcher module isn't using the official module template, so it's very likely that @VR25 need to fix something in his install script.
Click to expand...
Click to collapse
Indeed, there's stuff to "fix". I've been working on that for a few days now. I noticed [some] recent ROMs lack a bunch of useful binaries, such as make_ext4fs and resize2fs. So, I'm migrating to Magisk Module Template and relying on Magisk's util_functions.sh for better "future-proof" compatibility.
Didgeridoohan said:
If I understand you correctly, the Busybox module install just fine, no matter if installed through the Manager or TWRP.
Have you tried other modules?
The Sysconfig Patcher module isn't using the official module template, so it's very likely that @VR25 need to fix something in his install script.
Click to expand...
Click to collapse
I tried YTVanced module, downloaded via MM and it installed just fine. So I think that, as VR25 said, the ROMs I've tried these days might have lacked of those utilities. So we might have "solved" this issue.
And what about the fact that flashing Magisk from TWRP doesn't install MM? Is it also related to the fact that those ROMs are recent?
Pipodi93 said:
And what about the fact that flashing Magisk from TWRP doesn't install MM? Is it also related to the fact that those ROMs are recent?
Click to expand...
Click to collapse
That happens once in a while, and may very well be ROM related. Fortunately, it's easy to install manually...
Didgeridoohan said:
That happens once in a while, and may very well be ROM related. Fortunately, it's easy to install manually...
Click to expand...
Click to collapse
Yeah, I thought so too. Because when I was on AICP, MM was installed after flashing. My concern was that "mount failed" was related to the fact that MM wasn't installed during the flashing operation, but I'm glad to see that's not the case and my phone isn't cursed. Thank you!

[HELP] Pixel3a Bootloop when Magisk Installed

Hey Guys,
I was experimenting with some SELinux context labeling rules a couple of days ago in Android10 related to JamesDSP and my own Audio Mod Project. I had tried to inject a new rule via 'magiskpolicy' (it was a name_transition rule which I was hoping would re-label the library files in /vendor/lib/soundfx from a system_file context to vendor_file) in a few ways; first via command line using the --live argument which resulted in a Segmentation Fault, then again without the --live argument which resulted in no error and then finally I added the rule to a Magisk Module and installed that. Neither of the command line attempts had any result on the running system and after installing the Magisk Module and rebooting I started hitting bootloops.
I managed to get out of the bootloop by flashing the entire Factory Stock Image, but now everytime I try to re-install Magisk (by putting the Stock Boot Image onto the phone, installing MagiskManager, selecting the Boot Image to patch and then using fastboot to flash the patched boot image) the resulting Magisk Boot Image causes a bootloop. I've found that, for some reason, this particular pre-patched boot image with modded kernel works : https://forum.xda-developers.com/pixel-3a/development/kernel-stock-kernel-plus-f2fs-t3945936 (specifically the stock-modified-android10-1203-magisk.img one; the latest one also causes my phone to bootloop).
I'm a bit stumped on this... wondering if anyone has any ideas? Maybe I somehow corrupted the device's SELinux Policy, but I expect that to be replaced when I flashed the Factory Stock Image...
Update : This is the SELinux Policy Rule that I tried to add (same rule for all 3 attempts) : name_transition hal_audio_default system_file file vendor_file libTestEffect
Have you cleared /data? If you haven't your Magisk module (in /data/adb/modules) will still be active as soon as you install Magisk again, hence the bootloop.
Take a look here for some tips on how to remove it:
https://didgeridoohan.com/magisk/Magisk#hn_Disablinguninstalling_modules_manually
Jman420 said:
I'm a bit stumped on this... wondering if anyone has any ideas? Maybe I somehow corrupted the device's SELinux Policy, but I expect that to be replaced when I flashed the Factory Stock Image...
Click to expand...
Click to collapse
Like was mentioned above, you need to remove your module. You could try this:.
Root your phone again. When you bootloops, fastboot boot one of the images here. One will boot core-only, the other remove magisk and all modules so that you should be able to root again without bootlooping.
https://forum.xda-developers.com/pi...disabler-booting-magisk-t3976621#post81547783
Tulsadiver said:
Like was mentioned above, you need to remove your module. You could try this:.
Root your phone again. When you bootloops, fastboot boot one of the images here. One will boot core-only, the other remove magisk and all modules so that you should be able to root again without bootlooping.
https://forum.xda-developers.com/pi...disabler-booting-magisk-t3976621#post81547783
Click to expand...
Click to collapse
The module is most definitely gone. While I was running Magisk 20.1 I ensured that the /data/adb/modules folder was empty and then tried the steps you suggested above. The boot images provided in that thread also cause bootloops on my phone, both of them. The only guess I can come up with is that the 'magiskpolicy' commands I ran somehow changed something that doesn't get overwritten...
Jman420 said:
The module is most definitely gone. While I was running Magisk 20.1 I ensured that the /data/adb/modules folder was empty and then tried the steps you suggested above. The boot images provided in that thread also cause bootloops on my phone, both of them. The only guess I can come up with is that the 'magiskpolicy' commands I ran somehow changed something that doesn't get overwritten...
Click to expand...
Click to collapse
The method I showed you was for fixing a problem where there is a module installed that you could not remove due to a bootloop. That is the only problem it was meant to fix. If your module was already gone then it was pointless to try it.
Tulsadiver said:
The method I showed you was for fixing a problem where there is a module installed that you could not remove due to a bootloop. That is the only problem it was meant to fix. If your module was already gone then it was pointless to try it.
Click to expand...
Click to collapse
Agreed... but I'm trying every port in this storm. It's such a strange issue... At this point I've got the phone running the latest Factory Image, but have flashed the boot image I mentioned above with Magisk 20.1 installed. Running correctly, no modules installed or visible... but if I try to update to 20.3 it bootloops.
So I figured out my problem and fixed my phone. I still find the situation that I ended up in very strange and can't come up with a complete explanation of what happened. But the root issue was that I had a remnant sepolicy.rule from a test module I was playing with on my Pixel's /persist/ partition. Since that particular sepolicy.rule caused a bootloop I was never able to remove it via MagiskManager, so the sepolicy.rule was left on the /persist/ partition and Magisk was trying to apply it on boot. The solution was to re-root using the boot image I mentioned above and remove the file from /persist/.
The issue has been mentioned to TopJohnWu and a fix will likely be included in the next release.

Categories

Resources