Magisk General Support / Discussion

Search This thread
Mar 16, 2017
27
3
São Paulo
Have you completed all the steps here (click on spoiler):


Especially enabling Zygisk and rebooting...
I followed yes. I removed the fix, restarted, added it again, restarted again, everything was ok but the incompatibility continued, I cleared the cache and data from the Play Store twice and it worked again. I'm starting to think that unlocking bootloader and rooting is not being more advantageous, a lot of bureaucracy and problems.
 
Mar 16, 2017
27
3
São Paulo
Have you completed all the steps here (click on spoiler):


Especially enabling Zygisk and rebooting...
In fact, I was a little confused by the guidelines of the other topic, a lot of information to translate and try to follow, it was kind of dispersed in the comments. If the problem reoccurs, what should I try?
 

Captain C

Member
Feb 23, 2011
27
4
I am currently on EvoX custom ROM running Magisk 24.3 with universal safetynet 2.2.1 and Shamiko v0.4.4. Everything is working with my denylist apps not detecting root. (except for the new Momo detecting zygisk). When I install the latest Shamiko v0.5.0 module Momo does not detect zygisk anymore but my banking app stops working. It just opens and then closes immediately.

Any advise as what the problem could be.
 

pndwal

Senior Member
Either I am incredibly stupid, or something's wrong with Magisk, but I cannot seem to root my Galaxy S7.

When I install Magisk on a fresh rom, it will say "Ramdisk Yes". I then select the AP.tar file and patch it. After flashing the patched file + BL + CP + CSC the phone boots up like normal, when I open Magisk it suddenly tells me Ramdisk No.
That's surprising (*see below), but I'm not sure why you're following this procedure on S7; seems it launched with Android 6.0 Marshmallow...

The instructions outlining your method are prefaced with the comment:
Samsung (System-as-root)

If your Samsung device is NOT launched with Android 9.0 or higher, you are reading the wrong section.
https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

My phone is not rooted, nor can I proceed further after this. Trying to patch any files now doesn't work. Inside the AP folder there is a boot.img file, but it has an .lz4 extension. Am I supposed to decompress this .lz4 file and then patch the result?
Actually, patching AP is specifically for SAR / 2SI (variation on SAR) decices, generally launched with Android 9, as noted above, so it seems you should extract and patch the boot image. However I believe Magisk handles lz4 and several other compression formats fine; I'd try patching it as is...

Also, it seems pre-SAR Sammy phones had standard fastboot mode, so my guess is that you can follow the generic instructions here:
https://topjohnwu.github.io/Magisk/install.html#patching-images.

(Samsung users may know if Odin is actually required on S7...)

I don't have a file called vbmeta.
Normal on old devices...
At step 5 instantly says "Installation failed!" regardless of what additional boxes I check or leave unchecked.

I am using Android 8.0 and bootloader version 4. Should I try downloading a more recent firmware? (I think the S7 goes up to BL version 8)
I'd try proper official method first... GitHub Issues for S7 users all seem to be resolved currently (no-one reported your issue AFAICS) except this one if kernel is old:
Pinned issues
[Wontfix] Zygisk cannot activate on some old Samsung devices with old kernel (3.19-)

* AFAIK Ramdisk yes should never change unless OEM ramdisk is corrupted or replaced with a custom (modified) ramdisk (which can still work; Magisk ramdisk no doesn't actually mean no ramdisk in boot as most Xiaomi rooters know, but really 'no stock / OEM ramdisk in boot')...

Ramdisk no is only expected on A-only legacy SAR boot type devices anyway; yours is legacy ramdisk, unless updated to A10 / 2SI booting if available.

It could be that patch AP corrupts ramdisk for some reason because non-SAR/2SI devices were not considered with its implementation The method (with need for full data wipes to root) derives from the special / edge case presented by 'Modern' Samsung SAR devices with 'Vaultkeeper' etc...

Hope this helps. 🤠 PW
 

pndwal

Senior Member
Hahaha thanks for both answers! Another question, if I update the root to the latest version, I can use this version 2.2.1, right? I ask because my problem is the following: Since updating to version 24, hide has been weird (although the deny list works well), so several apps I use started to be not compatible in the Play Store (I think because of the bootloader , because even without root they are still not compatible), so the only thing I would like is for this feature to work again and these applications are normally able to install as it was until version 23 of Magisk.
View attachment 5613169

The problem came back. It was this CTS profile match failing that the incompatibilities came back. How do I fix this permanently? :(

(The app is in Portuguese, I'm from Brazil)
So USNF module is not causing fallback to basic attestation...

Assuming you have USNF 2.2.1 and Zygisk enabled, is Magisk App reporting Zygisk-Yes (after reboot)?... You're not losing root entirely? PW
 
  • Like
Reactions: 73sydney

pndwal

Senior Member
vbmeta fixes coming...
John Wu, 1h

I found a bug in magiskboot's vbmeta structure extraction logic, which is the cause of the requirement of disabling vbmeta verity manually in fastboot (or else bootloop). Fix coming soon...

For some reason the new GKIs contain multiple vbmeta structures in the boot image (I don't know if this is a bug or intended behavior). magiskboot was extracting the incorrect one, which causes the bootloader to freak out 😅
www.twitter.com/topjohnwu/status/1525034917670756353

👀 PW
 
  • Like
Reactions: dr4go and asripath

pndwal

Senior Member
FWIW, Purpose of Magisk; Dev perspective:

Mayoi, 1h

Weird question, but do you still enjoy maintaining magisk? I remember during the zygisk update a lot of people were angry about the focus switch from safetynet bypass inbuilt for magisk, and it just seemed rly toxic.

John Wu, 1h

I stopped caring for end users. All I really care is that Magisk is up-to-date (supporting latest releases) as a security research tool.

I also use Magisk as a playground for learning stuffs, such as Zygisk is me dabbling in code injection, trying out Rust in the future etc.

Of course, I won't go out of the way to break normal end users' usage. If the modding community has a reasonable request or issue, like this AVB bug that affects a lot of users, I am more than happy to spend some time investigating.
www.twitter.com/bakwas247/status/1525035786621575169

👀 PW
 
  • Like
Reactions: dr4go

pndwal

Senior Member
Latest Official TJW debug Canary Magisk:

Magisk (c11ccbae) (24310)​

  • [MagiskBoot] Fix vbmeta extraction implementation

Diffs to v24.3​

  • [MagiskInit] Update 2SI implementation, significantly increase device compatibility (e.g. Sony Xperia devices)
  • [MagiskInit] Introduce new sepolicy injection mechanism
  • [MagiskInit] Support Oculus Go
  • [MagiskInit] Support GKIs with no ramdisk (Pixel 6 Android 13)
  • [MagiskBoot] Fix vbmeta extraction implementation
  • [App] [MagiskSU] Properly support apps using shared UID
  • [MagiskSU] Fix a possible crash in magiskd
  • [Zygisk] Fix function hooking on devices running Android 12 with old kernels
  • [BusyBox] Add workaround for devices running old kernels
https://github.com/topjohnwu/magisk-files/blob/379a6f08e9c5736a3f810d44d444ef13533d4b12/notes.md

👍 PW
 

pndwal

Senior Member
  • Like
Reactions: 73sydney

mbangi

Senior Member
any fix for this?
Screenshot_20220514-012023_Momo.png
 
Last edited:

pndwal

Senior Member
Since there are inconsistencies with changes for Shamiko module listed here:
https://github.com/LSPosed/LSPosed.github.io/releases
and Shamiko's Readme.md file, I'm posting a 'readme' with overlooked changes appended:

Readme.pw:

# Shamiko

こっっ… これで勝ったと思うなよ―――!!​

### Introduction

Shamiko is a Zygisk module to hide Magisk root, Zygisk itself and Zygisk modules like riru hide.

Shamiko read the denylist from Magisk for simplicity but it requires denylist enforcement to be disabled first.

Currently, system apps (with uid%100000=1000) cannot be hidden even it's in the denylist. This issue comes from Magisk.

### Usage

1. Install Shamiko and enable Zygisk and reboot
2. Configure denylist to add processes for hiding
3. *DO NOT* turn on denylist enforcement

#### Whitelist

- You can create an empty file `/data/adb/shamiko/whitelist` to turn on whitelist mode and it can be triggered without reboot
- Whitelist has significant performance and memory consumption issue, please use it only for testing
- Only apps that was previously granted root from Magisk can access root
- If you need to grant a new app root access, disable whitelist first

### Changelog

#### 0.1.0
1. * Hide Magisk root
2. * Hide Zygisk and Zygisk modules

#### 0.2.0
1. Support font modules since Android S
2. Fix module's description

#### 0.3.0
1. Support whitelist (enable by creating an empty file `/data/adb/shamiko/whitelist`)
2. Always unshare (useful for old platforms and isolated processes in new platforms)
3. Request Magisk 23017+, which allows us to strip Java daemon and change denylist regardless of enforcement status
4. Temporarily disable showing status in module description (need to find a new way for it)
5. Support module update since Magisk 23017

#### 0.4.0
1. Add module files checksum
2. Bring status show back
3. Add running status file at `/data/adb/shamiko/.tmp/status`

#### 0.4.1
1. Add more hide mechanisms

#### 0.4.2
1. Fix app zygote crash on Android 10-

#### 0.4.3
1. Fix tmp mount being detected
2.* Hide modified traces of init.rc
Note: Hiding some system apps won't work since 0.2.0. It is a Magisk's bug, and it has been fixed since 24102+.

#### 0.4.4
1. Fix module description not showing correctly

#### 0.5.0
1.* Better hiding Zygisk

* Appended

🤠 PW
 
Last edited:
  • Love
Reactions: Timmmmaaahh!

pndwal

Senior Member
Latest Shamiko fixed Found Zygisk for me [Redmi Note 8T] but I note reports that Zygisk is still detected on some devices after Shamiko update.

I still have Bootloader unlocked, but had that w/ previous MOMO also. PW
Nb. Latest Shamiko (from Magisk alpha TG) is Shamiko-v0.5.0-112, as opposed to Shamiko-v0.5.0-110 if downloaded from GitHub (linked above)...

Could those with Shamiko 0.5.0 and Zygisk still detected confirm issue exists in latest Shamiko-v0.5.0-112?

👍 PW
 

73sydney

Senior Member
Nb. Latest Shamiko (from Magisk alpha TG) is Shamiko-v0.5.0-112, as opposed to Shamiko-v0.5.0-110 if downloaded from GitHub (linked above)...

Could those with Shamiko 0.5.0 and Zygisk still detected confirm issue exists in latest Shamiko-v0.5.0-112?

👍 PW

yep, i tested both in other thread :)

still detects

Samsung S20+ 5G

Oh, and Ponkles to you good Sir
 
  • Like
Reactions: pndwal

zgfg

Senior Member
Oct 10, 2016
7,405
4,794
Nb. Latest Shamiko (from Magisk alpha TG) is Shamiko-v0.5.0-112, as opposed to Shamiko-v0.5.0-110 if downloaded from GitHub (linked above)...

Could those with Shamiko 0.5.0 and Zygisk still detected confirm issue exists in latest Shamiko-v0.5.0-112?

👍 PW
For me it was fixed with 0.50 from GitHub - actually I update through Magisk app when it shows that update for the module is available (hence I don't manually download from TG or GitHub)

It's good for me but on two Xiaomi phones, don't know about other phones
 
  • Like
Reactions: 73sydney

pndwal

Senior Member
For me it was fixed with 0.50 from GitHub - actually I update through Magisk app when it shows that update for the module is available (hence I don't manually download from TG or GitHub)

It's good for me but on two Xiaomi phones, don't know about other phones
Actually, now you mention it I recall I did the same and v.110 did fix Zygisk-after-Momo 4.1.1 - then manually updated to latest v.112... no change / Zygisk fixed...
yep, i tested both in other thread :)

still detects

Samsung S20+ 5G

Oh, and Ponkles to you good Sir
Could just be a Sammy thing then 😜

I think minor fix must be for edge-case crashing someone on TG reported...

Rhubarb... PW
 
  • Like
Reactions: 73sydney

Top Liked Posts

  • 1
    For future reference:
    -- Always take a working version of the latest Magisk and patch your boot.img
    -- This ensures that you can flash and resort back in the event of a catastrophic event
    -- Consider investing in installation of the Bootloop Saver.
    -- Look into what the 'Magisk Manager for Recovery Mode' can do for you [if you have a working version of TWRP installed].
    You forgot Plan Z. Make backups before doing anything that may trash your setup, and have a restore plan.
    ...snip...

    Btw, Magisk.db can be also easily managed from MiXPlorer (incl. Denylist and Root grants)
    Id be careful with using MiX. Although I use MiX, editing dB's can have issues. It was a while back, but what I think I saw happen, is that MiX makes a copy of the database, makes the change to its own copy, and then copies back over the original. That can fail if there is another app using the dB or has the same plans.

    Another option is to use SQLite directly from the command line, or use the app I built TeMeFI, which also edits the dB in-situ; its literally has a GUI to SQLite command line. MiX is closed source so its hard to know, but it failed to update a major db in android (I think the MediaDB), where the other options worked.

    But the 1st option is without question the best option. ie have Magisk mess with its own database. Database concurrency is a hard taskmaster.
  • 7
    Latest Official TJW public Stable (release) Magisk build:

    Magisk

    Magisk Changelog​

    v25.1​

    • [MagiskBoot] Fix ramdisk backup being incorrectly skipped
    • [MagiskBoot] Add new feature to detect unsupported dtb and abort during installation
    • [Zygisk] Change binary hijack paths
    • [App] Fix incorrect recovery mode detection and installation
    • [MagiskInit] Fix config not properly exported in legacy SAR devices
    • [General] Enforce the Magisk app to always match or be newer than magiskd

    Release Notes:
    https://topjohnwu.github.io/Magisk/releases/25100.html

    For remaining diffs to public Stable 24.3, see Changelog for public Beta 25.0:
    https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-86993241

    🎉🎉 👍 PW
    6
    Thank you @zgfg and @ipdev . I have a fully working and automated script to both update my phone and patch & flash the magisk boot.img file. The only thing thats missing is the autoreboot after sideload but i guess TWRP has to implement this feature.

    The script can both be used as standalone or class to modify it for custom stuff. Ill continue to work on the repo and make everything neat, as well as working on windows and linux binarys & a gui for people that have no idea how to use scripts.

    Thank you guys for your help, this will save so much time for me and maybe even other people (at least i hope it will be used). :)

    Here it is on github
    6
    I've bought a Motorola Moto G71 5G. Unfortunately i cannot find a single thread about it on XDA. If i find it's stock ROM, what's the next steps to install magisk? How can i know that patching boot.img with magisk would work and not result in bootloop?
    You could opt for temporary root and check if it works or not. For that, boot your device via the Magisk patched boot file using the command-
    Code:
    fastboot boot magisk-patched-boot.img
    If everything's well and good, then open the Magisk app and select Direct Install. It will permanently root your device.
    However, if your device doesn't boot up, then retry with a force restart, it will be booted to the standard non-rooted OS.
    If you are still unable to boot to the OS, then flash the stock boot.img via
    Code:
    fastboot flash boot boot.img
    6
    Hello. Can someone help me downloading latest Momo please? https://t.me/magiskalpha/517
    I am on computer and i dont want to make a Telegram account :/.

    Thanks.
    5
    ... nor the bum's Rust.

    (Sorry, couldn't resist!)
    ... Now in Magisk repo... Sooner than I thought!...
    Setup preliminary rust infrastructure
    topjohnwu committed 1 hour ago

    Rain setting in... Covid setting in... Rust setting in...

    May need some WD40... Go John!

    😀 PW
  • 1082
    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