Magisk General Support / Discussion

Search This thread

zgfg

Senior Member
Oct 10, 2016
10,688
9,203
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11
I've been out of the loop for a while but since my march update, Safety Net is not longer passing on my 4XL, any guidance on article or thread to have my Safety Net to pass again...?
Please read the posts during the last week. Makes no sense that others write/repeat same things that are already written, for everybody who was 'out of the loop'. TG, we are on XDA and not on Telegram

Make sure that Magisk Hide is enabled. Instead of SafetyPatch, use Magisk Hide Props Config. If SafetyNet still failing, disable all other modules and inspect one by one which is errant
 
Last edited:
  • Like
Reactions: cnjax

CoOlSlY

Senior Member
Jun 28, 2016
87
13
Please read the posts during the last week. Makes no sense that others write/repeat same things that are already written, for everybody who was 'out of the loop'. TG, we are on XDA and not on Telegram

Make sure that Magisk Hide is enabled. Instead of SafetyPatch, use Magisk Hide Props Config. If SafetyNet still failing, disable all other modules and inspect one by one which is errant

With all due respect, I read a few of the last pages, but my last page read at first was something like 2070 which was ~1700 pages out so while I read a few pages and also made a thread search, from my reading (and even on Twitter), it was "the fun ends" so thought it was over. Thank's for helping, i'll give a check on what you suggested.
 

zgfg

Senior Member
Oct 10, 2016
10,688
9,203
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11
With all due respect, I read a few of the last pages, but my last page read at first was something like 2070 which was ~1700 pages out so while I read a few pages and also made a thread search, from my reading (and even on Twitter), it was "the fun ends" so thought it was over. Thank's for helping, i'll give a check on what you suggested.
Generally, stock ROMs with Gapps built in, hence being certified by Google, should all pass. You just need to make sure Magisk Hide is enabled (since being disabled in the latest Magisk Manager Canary build)

It means, SafetyNet will pass with all modules being disabled. Then enable one module by one, and if particular one causes SafetyNet to fail (e.g. Riru + EdXposed) ask in the module's thread, find an alternative module or live without

For custom ROMs (or stock ROMs without built-in Gapps - usually for devices sold only in China ), in addition to Magisk Hide, you need to use Magisk Hide Props Config module to fake the device fingerprint - to present them to Google as being the certified stock ones.

With that and all modules disabled, it should pass. Then investigatw one module by one...

If something is unclear you can search for, e.g. for Props Config,, SafetPatch or Riru if it was already discussed here
 
Last edited:
  • Like
Reactions: kkjb and guest4711

Tombab

Member
Sep 15, 2018
35
9
Absolutely first thing to check is if MagiskHide is enabled at all (and toggle it off and on again if it is). Since Magisk v20.4 it'll be disabled by default (on clean installs).

After that it will be time to look at other possible sources of error. More tips and troubleshooting here:
https://didgeridoohan.com/magisk/MagiskHide#hn_SafetyNet

I'm running LOS 16 + Magisk v20.3 and I need to toggle magiskhide off and on each time my phone reboots due to bug or crash of some kind. For some reason phone crash disables Magisk and my banking app locks up because it detects root even if safetynet tests pass OK and everything should be peechy. Few times I have forgot to do this and then I have to clear banking app cache and set it up from scrach to get it working again, pain.
 

CoOlSlY

Senior Member
Jun 28, 2016
87
13
Generally, stock ROMs with Gapps built in, hence being certified by Google, should all pass. You just need to make sure Magisk Hide is enabled (since being disabled in the latest Magisk Manager Canary build)

It means, SafetyNet will pass with all modules being disabled. Then enable one module by one, and if particular one causes SafetyNet to fail (e.g. Riru + EdXposed) ask in the module's thread, find an alternative module or live without

For custom ROMs (or stock ROMs without built-in Gapps - usually for devices sold only in China ), in addition to Magisk Hide, you need to use Magisk Hide Props Config module to fake the device fingerprint - to present them to Google as being the certified stock ones.

With that and all modules disabled, it should pass. Then investigatw one module by one...

If something is unclear you can search for, e.g. for Props Config,, SafetPatch or Riru if it was already discussed here

Thank's a lot... As soon as I read your first message I went ahead and disabled everything and it worked... Brain fart... Basic stuff :| I had disabled everything except Riru and EdXposed ("beginer" mistake) and EdXposed .is the culprit, i'll check, Riru core works but as soon as I enable EdXposed it fails... I'll check this out, thanx again
 

pndwal

Senior Member
I've been out of the loop for a while but since my march update, Safety Net is not longer passing on my 4XL, any guidance on article or thread to have my Safety Net to pass again...?
With all due respect, I read a few of the last pages, but my last page read at first was something like 2070 which was ~1700 pages out so while I read a few pages and also made a thread search, from my reading (and even on Twitter), it was "the fun ends" so thought it was over...
In a nutshell:
Google introduced new hardware key attestation which fails CTS profile due to unlocked bootloader. No spoofing etc can bypass this, but after a few days they switched it off again, ostensibly to allow time for some OEMs to fix badly implemented key attestation, so CTS is passing for now, but the concesus is that Google will turn it on again to provide CTS that app developers can rely on "to know that their code runs in an unmodified environment, whose behavior is predictable."

Since then, Google introduced further SafetyNet checks, this time basicIntegrity failing due to several Magisk modules and Xposed framework. Solutions are found in recent pages for failures due to SafetyPatch module and EDXposed, and removing other mods fixes SafetyNet failure.

Make use of our 'borrowed time'! PW
 
Last edited:

°Washy

Senior Member
Jan 17, 2018
368
79
OnePlus 8T
My magisk doesnt load his version, update, modules and anything regarding It. Root btw works well so it's very strange. I tryed to unistall It fully and dirty flash my rom before installing It again but with no success. I didn't find something similar to my issue so Im very bored. Any ideas?
 

demonoidmaster

Senior Member
Nov 19, 2015
1,035
331
Sometimes Magisk Manager screws something up when multiple versions are installed (like not detecting Magisk), and since of course they have different package names, you can have both of them (or even more) installed. That is why I told him to delete the original one first. However, if the manager is installed upon reboot, it is indeed pointless, as it is what you suggested next. If his company measures run at boot time, they could detect the original magisk package file installed, and he wants to prevent that from happening. I guess he should screw a bit around the install script: if the manager installation script Is in plain text, he could delete it (but i honestly don't know as I haven't checked myself what's inside the zip)

EDIT: I realized i was not very clear... Of course when you open original MM and select to hide it, the original one will get uninstalled leaving you with just the repackaged one (no need to click on the original one again as there won't be any, unless your drawer didn't update the app list). But if you reflash Magisk on top of that, you will end up with 2 versions installed and it may cause problems.
If he doesn't mind having MM get auto removed when opening the repacked one then he could do that, however if it detects at boot and does weird things then he should do the alternate thing i said, open the magisk zip in RAR app (available on play store) , go to common and delete the magisk apk, itll autorezip it, then whenever he needs to flash magisk it wont install the manager upon reboot. Best way to avoid having the default manager installed
 

wikiuse

Senior Member
Dec 26, 2018
50
2
Bien Hoa, Vietnam
After uninstall Magisk and unroot

This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases.
All information, including troubleshoot guides and notes, are in the Announcement Thread

After uninstall Magisk, unroot and flash ROM A50(SM-A505F), so I opened Samsung Health it was blocked beacause: "it found Rom was change". What should I do?
 

bunklung

Senior Member
Mar 20, 2011
532
109
My pixel 3 started prepping download too, then went back to no updates. Maybe google pulled the incremental ota, while leaving full ones and factory images. If I don't get it by Sunday, I'll probably flash the factory

Sent from my Pixel 3 XL using Tapatalk

Just an FYI: I restored images, and was able to pull the April security update!

I did NOT check for updates first. I restored the image, THEN i checked for the update. Normally I would do the other way around: Check, it breaks, I restore, I re-check, etc.

On my second phone, I did not have the restore image present. So I had to manually build it in /data/magisk_backup_55fcd5ec203b16ceb559848918a1fbc85853f434/boot.img.gz and /sbin/.magisk/config

https://xdaforums.com/showpost.php?p=81712377&postcount=38238

I am a bit jolly I don't have to manually patch the boot images and flash the entire image. It's so much more convenient and safer (opinion) to use the OTA process. I don't know how long this will last, but I suspect 20.4 might have fixed this OTA process.
 

Ch3vr0n

Senior Member
May 6, 2009
1,693
668
41
Yeah I checked first, then restored and checked again. Didn't work. Guess I'll have to wait another couple of weeks [emoji4]. Not going to reflash March image just to test this. And no 20.4 didn't fix this procedure

Sent from my Pixel 3 XL using Tapatalk
 

Didgeridoohan

Retired Senior Moderator
May 31, 2012
12,300
1
14,848
Gone
Google Nexus 4
Nexus 6
After uninstall Magisk, unroot and flash ROM A50(SM-A505F), so I opened Samsung Health it was blocked beacause: "it found Rom was change". What should I do?

I don't do Samsung, but I would strongly suspect that would be caused by the tripped Knox e-fuse. As far as I know there's nothing that can be done about that...
 
  • Like
Reactions: kkjb

rpgdev

Senior Member
Jul 31, 2011
591
86
Is there a good tutorial somewhere on how to make magisk modules? I need a little bit more than the official guide. More especifically, is there a particular way in which to zip the module? I made a very simple module (modified an existing one) but when I try to install it Magisk Manager complains that "this zip is not a magisk module" :/
 

Didgeridoohan

Retired Senior Moderator
May 31, 2012
12,300
1
14,848
Gone
Google Nexus 4
Nexus 6
Is there a good tutorial somewhere on how to make magisk modules? I need a little bit more than the official guide. More especifically, is there a particular way in which to zip the module? I made a very simple module (modified an existing one) but when I try to install it Magisk Manager complains that "this zip is not a magisk module" :/

Have you made sure to follow the instructions properly, with the correct update-binary and updater-script placed in the proper location in the zip? If you have, this might be your problem: https://didgeridoohan.com/magisk/Magisk#hn_Zip_is_not_a_Magisk_module
 

rpgdev

Senior Member
Jul 31, 2011
591
86
Have you made sure to follow the instructions properly, with the correct update-binary and updater-script placed in the proper location in the zip? If you have, this might be your problem: https://didgeridoohan.com/magisk/Magisk#hn_Zip_is_not_a_Magisk_module
I feel like an idiot now lol. Yeah that was it thanks! I was able to install it successfully (or so it seems) but I can't see it in the modules screen and it did not seem to have the expected effect, are they all supposed to show up in the modules screen?
 

Didgeridoohan

Retired Senior Moderator
May 31, 2012
12,300
1
14,848
Gone
Google Nexus 4
Nexus 6
I feel like an idiot now lol. Yeah that was it thanks! I was able to install it successfully (or so it seems) but I can't see it in the modules screen and it did not seem to have the expected effect, are they all supposed to show up in the modules screen?

If it's a Magisk module it would show up in the modules section. You sure it installed correctly? What does the install log show?
 

rpgdev

Senior Member
Jul 31, 2011
591
86
The actual log says something very different lol (attached). I kind of know what happened but, I put a path to a file in the REPLACE but it seems like it expects a directory (the module I modified pointed to a file). Not sure if putting the parent directory of this file would be appropriate.

Code:
 - Copying zip to temp directory - Installing OREO_MAGISK_LGV35_Remove_Cliptray-3.zip update-binary: line 54: get_outfd: not found - Current boot slot: _a - Device is system-as-root Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip creating: common/ inflating: common/system.prop inflating: common/post-fs-data.sh inflating: common/service.sh inflating: config.sh inflating: module.prop ******************************* Disable LG ClipTray ******************************* ****************************** Powered by Magisk (@topjohnwu) ****************************** update-binary: line 101: mount_magisk_img: not found - Extracting module files Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip creating: system/ creating: system/etc/ creating: system/etc/permissions/ inflating: system/etc/permissions/com.lge.software.cliptray.xml touch: /dev/tmp/magisk_img/DisableLGClipTray/system/etc/permissions/com.lge.software.cliptray.xml/.replace: Not a directory update-binary: line 610: can't create /dev/tmp/magisk_img/DisableLGClipTray/system/etc/permissions/com.lge.software.cliptray.xml/.replace: nonexistent directory chmod: /dev/tmp/magisk_img/DisableLGClipTray/system/etc/permissions/com.lge.software.cliptray.xml/.replace: Not a directory - Setting permissions update-binary: line 147: unmount_magisk_img: not found - Done

Edit: XDA app didn't allow me to upload the log.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    I can't access superuser and modules they are both lockedView attachment 6081641
    Your phone isn't rooted! The top section of your screenshot shows Magisk "Installed N/A".
    Installing the Magisk app isn't enough to root your phone.
    4
    Hello, I'd like to write a module for magisk to transfer in userspace actions like this:
    "echo "16 2048" > /sys/class/leds/aw210xx_led/single_led_br" to allow led control on Nothing Phone 1 to any app, would you suggest me an example module I can take inspiration from?
    Write your service.sh script with whatever commands you need

    Then use any module you already have installed that does not have its service.sh script and add your scriot to that module, eg in case of Systemless Hosts itbwill be:
    /data/adb/modules/hosts/service.sh

    Or use some other module that does have its own service sh script and extend its script with your commands

    You may need to wait booting to finish (you have to debug how yout modifications works if executed earlier or later), in that case script will look like:
    #!/system/bin/sh

    until [ "$(getprop sys.boot_completed)" == "1" ]; do
    sleep 1
    done

    echo "16 2048" > /sys/class/leds/aw210xx_led/single_led_br

    You can add additional sleep if you need to further postpone upon the System finish booting, eg couple of seconds to establish WiFi connection or something

    Or if that is too late (some modifications must be done much earlier, while the System boots), you will have to use post-fs-data.sh script instead of service.sh script but then you must not wait for booting to finish and you must not use sleep

    Read on Magisk GitHub Developer info avout differences in service sh and post-fs-data.sh usage

    Read there generally about the structure of the module scriot, etc

    At the end reboot and test does it work

    Once you make sure that your script does the job properly, it will be an easy step to pack it into your own module

    Similar questions have been asked couple of times (and I responded with instructions and minumalistic sceleton to pack final scripts into the zip installation for a new module)
    4
    I have always have problems with magisk and bug reports think I have even failed with the debug version lol, although its closed I have added that the bug is not present with the debug version
    Just open another with "version code: 27002" somewhere in first post, explain you tested both but issue is with Canary only, not Debug... Supply logs from broken build and wait for further instructions from Devs... Template requires the version code (or bot closes) + logs (or Devs will often close with comment like "no log no fix")...👍 PW

    Edit: Someone opened proper issue following template just now:
    https://github.com/topjohnwu/Magisk/issues/7921

    Looks to me like this commit has issues:

    Always update stub APK when upgrade

    committed5 days ago
    4
    Latest canary Update 27002 will not let me hide the Magisk app, get a failed toast, tried opening an issue but need to use the debug version,
    Installed the debug version and it works and hides the magisk app?
    4
    Not sure if the fix has been pushed yet but looking at GitHub it's been sorted
    Not pushed yet according to my magisk app.
    Luckily i don't hide or need to hide; this is a sad bug and i hope, for others' sake, it's pushed as soon as the developers can. But that's also why it's canary and not beta or release, it's why (or should be why) we use canary, to squash bugs before the rest experience them.
  • 1103
    This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases.
    All information, including troubleshoot guides and notes, are in the Announcement Thread
    156
    Hello, I haven't given much support on XDA lately. It can be resulted from
    • University started and I have limited free time. In fact, I mostly develop during midnight
    • I live in Taiwan, which has large time zone differences between my European/American contributors/testers, which usually forces me to stay up late at night to discuss/test stuffs.
    • The new version is about to come, I don't want to spend effort on supporting old releases
    The planned update is delayed again and again, to some point I think I'll shed some light about what has been happening lately, also along with some announcements.

    New Forum!
    As you might have already discovered, Magisk got its own subforum on XDA! Many thanks to all the support you gave me, and much more information/features/support is about to come!
    **For developers supporting all the devices that are not using standard Android boot format, feel free to create threads in this section (actually, PLEASE do so) for your favorite devices after v7 is out. As I currently know, Asus devices require signing the boot image before flashing, and is model dependant; Sony devices seems to use ELF kernel that is unpatchable, or some has two ramdisks (inner + outer), both requires different workarounds; LG bootloader locked devices has to manually "BUMP" the boot image after flashing Magisk..... and there may be lots of other crazy boot image formats that haven't come up to my attention yet.
    It is impossible for me to support all these non-standard boot images, and I hope the community can collaborate to make Magisk running across all the devices. Overall, community collaboration is what XDA about :D

    The Pixel Phone
    Some of you might already know this news, that the next Pixel Phone right around the corner seems like it does not have ramdisk in boot image, which pretty much wrecked Magisk in all ways. However, it pretty much doomed root itself too. Kernel modifications is inevitable IMO, so I'll try to migrate my scripts to C programs that could possibly be included into the kernel itself. Note that I'm not familiar with linux kernel, I'm not even sure if my idea and concept is correct or not. But once the device is available, I think developers will find a way to bypass all the difficulties, and I'll do my best to learn things ;)

    Current Progress
    In the past month, I've spent quite some time learning SELinux, so that I can avoid using SuperSU's sepolicy patches. Thanks to the helps and tips from @phhusson and @Chainfire, I finally have a much clearer understanding of how SELinux works. The Magisk core parts (the scripts, boot image patches, new features, more supports) are actually done some time ago. What is causing all the delays is the Magisk Manager.
    To be completely honest, although I can code in Java without much issues, Magisk Manager is actually my first Android application, I had to reach out for assistance, and fortunately awesome developers like @DVDandroid and @digitalhigh contributed a lot, which makes the current Manager awesome.
    After the repo system and module management is mostly done, I was about to do some adjustments and release, but what we really done is decided to add another feature: auto-unroot with per-app settings. I decided to wait for it to be finished, and then do my adjustments. Due to reasons that'll be mentioned later, this feature will likely not be available for the next release (should come in future updates)

    Safety Net Disaster
    Those who are using Magisk for Safety Net bypass purposes must have known that Google recently updated the detection method of my Systemless Xposed. I still have no idea what Safety Net is detecting, so currently I cannot fix it on my side (also because I'm busy working on the next update). However, suhide developed by @Chainfire is able to hide Xposed and worked fine.
    However, only my Systemless Xposed v86.2, which is based on SuperSU's su.d, is supported using that method. v86.2 and v86.5 (latest, Magisk based) have nearly identical binaries, and the only difference is the path where the binaries are stored.
    I'm still not sure what's the real issue for it not being supported, I just hope it is not done intentionally.

    Conclusion
    Due to the fact that my Safety Net bypass is not 100% perfect now, I do not want to spend any more time waiting for auto-unroot to be polished. What I'm doing now is finishing up all the things I'd like to change in Magisk Manager (it has been a while since I last contributed to Manager, my fellow developers are doing all the heavy job), which might take a little more time, after that, packed with tons of information to be announced in Magisk Section, I'll release the long awaited update.

    Hope this lengthy post gives you the idea of the whole situation, and again thanks for all your support!!
    121
    Ah, some Chainfire bashing, I hope it is not too late for me to exercise additional villainy.

    First, let me make clear I have nothing against @topjohnwu, nor against Magisk. Magisk is an interesting project and it certainly displays @topjohnwu ingenuity and persistence. I don't doubt we will see more interesting things from his hands.

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

    What has happened here is not all that dark and complicated, from either end. I returned from holidays, and someone pointed me at Magisk. My first thought: interesting!

    Among other things, the thread lists some issues with SuperSU, which in combination with the phrase The developer also requests users to not bug Chainfire with compatibility requests for SuperSU with Magisk from the portal article, raised my left eyebrow by nigh half an inch. The popular systemless xposed mod is apparently now based on it, and apparently it now no longer works with SuperSU, and apparently I'm not supposed to fix that, nor any of the other found issues. I found that a bit weird. So yes, I have told @topjohnwu that I was a bit surprised he was posting about issues with SuperSU without notifying me about them (I can't fix or help fix issues I'm not aware of, after all).

    He's also spreading a modified version of the SuperSU package, which is not all that uncommon, nor necessarily a problem. I have not looked into what he modified, I only ran a few quick tests on one of my devices, and found some commonly used commands run as root to be broken. I have informed him of this as well.

    It appears the tool of choice for Magisk is phh's Superuser, because of some of the mentioned issues with SuperSU. That's fine by itself, but fixing issues in that superuser by incorporating SuperSU's binaries into it is a somewhat questionable practise. After all, SuperSU is a commercial closed-source package that helps pay for my dinner, and superuser is a direct competitor. I have informed him that I was surprised he did this without asking for permission. I have expressed similar surprise on him spreading a modified version of LiveBoot (which helps pay for a snack now and then).
    @topjohnwu has also stated that Magisk's scripts are largely influenced by mine (I have not checked). Scripts based on mine are used all over the place on XDA, some people have crafted amazing things based on them, I have never made an issue of this (otherwise I would have just made them binaries). But yes, I have also stated to him that I don't think it's very nice to base something on one program, and then using that to (almost exclusively) push something directly competing with that program.

    tl;dr Towards @topjohnwu, I have:
    - expressed surprise he has issues getting Magisk to work with SuperSU, and has chosen not to inform me about those
    - expressed surprise he is using SuperSU binaries in a competing superuser without permission
    - expressed surprise he is posting a modified LiveBoot without permission
    - informed him of issues with the modified SuperSU he has posted
    - let him know I thought it wasn't very nice to be applying my scripts to benefit seemingly exclusively that same competing superuser

    To be crystal clear:
    - I have not asked for an apology
    - I have not asked for Magisk to be abandoned, neither the root hiding nor systemless module parts, and certainly not systemless xposed
    - I have not made an issue of any of this anywhere, until this post
    - I have not even specifically asked for anything to be taken down (though obviously in my opinion the other superuser package mixed with SuperSU's binaries, as well as the LiveBoot package, should go)
    - I have not reported this thread to XDA moderators for copyright violations or otherwise

    While my conversation with @topjohnwu may not win any awards for being friendly (though it may win some for brevity), I think all things considered my response has been rather mild. To be perfectly honest, until the apology post, I thought this was over with already. I think the apology post was triggered because I haven't replied to his last PM for a while - I was in the zone, it happens.

    To emphasize again, I have nothing against @topjohnwu, Magisk, or systemless xposed, and it is certainly not my goal to see any of them go. If it can be made to work together with SuperSU, great.

    I get it though: you think of something, you want to see if you can make it work, you finally get it to work, you publish it, it takes off - enthusiasm gets the better of you. Maybe in the rush some mistakes are made. That doesn't mean you have to just drop it and run. None of my stuff would make it past 0.1 if I stopped at the first big mistake :)

    Aside from said being in the zone coding, I usually regret actually responding to these sort of things the day after, which has made me hesitant to reply. Surprise me.
    76
    Thread temporarily closed so everyone sees this.

    The flood of "SafetyNet isn't working for me either!" posts are not helpful, at all. Please refrain from posting further, it will be looked into. Please do not forget that not passing SafetyNet is 100% NORMAL AND INTENDED when you have an unlocked booloader or running custom firmware. These are workarounds and they will be worked around in turn.

    The Flash
    Forum Moderator

    EDIT: Thread is reopened... I will be cleaning any SafetyNet posts for a while to keep the thread clean for real issues.
    75
    Hello everyone!

    I am aware that Google has updated Safety Net that makes Magisk itself a no go for Android Pay. In fact, I witnessed the change live while I am developing the new magiskhide, which should hide all Magisk modules and Magisk installed root.

    Google is serious about Safety Net now, clearly hunting down all possibility to run Xposed with Safety Net passed. I spend quite some time examining the new security measures last midnight, and fortunately it seems that it is possible to run Magisk and root along with Safety Net if no Xposed is running. I'm glad I removed the old root toggle at the right time lol, that is no longer feasible with the latest detection.

    So stay tuned for the next update, it will come with bug fixes, along with the new magiskhide to bypass that Safety Net.

    Google, how will a few systemless mods do any harm :p:p