Magisk General Support / Discussion

Search This thread

huskydg

Senior Member
Feb 17, 2021
206
208
The author of Magisk is currently positive for covid (post on twitter) so the development process might be delayed

Screenshot_20220629-205247_Twitter~2.png
 

pndwal

Senior Member
For me (recently I learnt it's 2SI device - whatever it means😁
Well here's the 'why' anyway; thought I'd provide a summary -

For anyone interested in both Android and Magisk evolution to modern 2SI boot protocol...

SAR


The first major departure from (Legacy) Ramdisk Android boot type was (Legacy) SAR.

This was introduced largely to accommodate A/B partitioning & seamless updates while conserving / reallocating memory resources, and changed Legacy Ramdisk's initial rootdir from rootfs to system.

A/B SAR eliminates recovery and cache partitions and halves the size needed for system by shipping factory preopted system app .odex files, which formerly took up ½ /system partition, on inactive /system_b partition and moving them to /data on first boot... An updated .odex file would have been installed to /data in any case after first Google Play update for each system app which means original .odex files in system are soon rendered redundant and actually remain unused for most of the life of the device...

In practice all this means that the same effective capacity for all active partitions, even with Bootloader, Boot, Radio, Vendor & System duplicated in a & b, is achieved with an increase of just under 1%, or 320 MiB on a 32GiB device, making A/B SAR a very cost effective proposition...

2SI

Since initial rootdir was changed from rootfs to system w/ introduction of Legacy SAR, a problem was created for prospective new Dynamic Partitioning scheme(s) for Android 10+. This is because the Linux kernel can't understand this new partition format and is unable to directly mount system as rootdir. In other words, a solution was required to support logical partitions as the kernel cannot mount the super blocks directly without userspace support.

2SI was/is the new solution designed to overcome this obstacle by having the kernel boot to initramfs as (initial) rootdir and execute /init in rootfs, just like Legacy ramdisk devices did.

The difference is that instead of initramfs booting Android, init in rootfs mounts the system partition and uses it as a new (Final) rootdir (in SAR, /system is Initial rootdir), allowing userspace to handle the rest of booting including deciding whether to boot into Android by executing a second-stage init (/system/bin/init), or into recovery. (In A/B w/o recovery partitions, method is officially called USES_RECOVERY_AS_BOOT; Some A/B devices have recovery_a/_b partitions (OnePlus 8T?) and only use the boot ramdisk to boot into Android as do A-only 2SI devices).
-------​
So basically boot to initramfs was replaced with System As Root w/ SAR in Android 9 (7.1 in the case of first Pixel), booting directly to /system... Then boot to initramfs was restored w/ 2SI in Android 10!... This explains why Google doesn't consider 2SI true SAR...

John Wu Android boot refs:
- Android Booting Shenanigans
-"2SI is a NIGHTMARE to work with, so yeah...."

- ok, 2 Stage Init), nothing changed
FWIW, the issue where previously patched boot image becomes incompatible and Direct Install breaks seems only to affect certain devices, notably OnePlus...

Perhaps the issue is reverting either AVB stripped flags, the modded fstab (file location in the ramdisk, fstab copy in /vendor/etc., the way OEM's like OnePlus implement the Device Tree Blobs / Device Tree Blob Overlays containing fstab etc may cause problems) or some other variable...
https://source.android.com/devices/architecture/kernel/mounting-partitions-early
Latest Momo with latest Shamiko (latest USNF, DenyList disabled) on latest Canary still detects su, Magisk and Zygisk
Could be some module or mod?
As TJW named, mast..tion device👍
Never saw that... PW
 
Last edited:

pndwal

Senior Member
HELP! This release (25.1) has become an absolute disaster. Of my first device, I did direct install as recommended, but upon rebooting, I had no Magisk, just the app. After some struggles, I managed to patch a raw boot image and flash that.

On my second device (with 24.3 installed and working for months). I again tried direct install, and Magisk appear to install, as normal. Again, after I rebooted, I had no Magisk (the app simply says "Installed: N/A"). I tried patching the boot image (several boot images actually, older patched ones, ones backed up from TWRP, and one extracted from the latest firmware - every one of them produced the same output file, meaning that all of the magisk_patched-25100_xxx.img had the same sha256 value). Every attempt keeps producing "Installed: N/A" after flashing the patched boot image.

I would like (for now) to go back to the old version (24.3) but attempting to install it produces "Please connect to the internet! Upgrading to full Magisk is required." If I connect to the internet, I get version 25.1 again (app only, and still no Magisk).

Any ideas? Thank you in advance for your help.
Seems you have stub app (not original Magisk app) installed... That's what Hide the Magisk app does; uninstalls Magisk App, installs stub, populates its data with "full Magisk" binary...

Updating w/ app 'hidden' is supposed to work, but, as reported here often (and in my experience) it only works 50% of the time in practice w/o issues... If you hid app(s), my bet is that you'll find conflicting renamed stub ('Settings' or whatever you named it) in system settings, Apps... Uninstall these instances and try with correct corresponding full Magisk app...

If this isn't your issue, please give some details about devices... model, OS, Android version... PW
 

pndwal

Senior Member
Yes this is what I was doing in general, but now for the latest magisk version, I cannot flash disable dmverity forceencrypt.zip and then flash after it magisk.zip. I get an error "Unsupported boot image extra"
Aside from what I already told you about Direct install (and I believe this applies to custom ROM zip installation also if updating previously installed Magisk rather than flashing over unrooted system) being broken / producing this type of error due to refactored MagiskInit when updating from 24.x or less, I see you have Galaxy Note 9... Despite launching with Android 8.1, since updating to Android 10 you now have 2SI "SAR" device, so you should read and follow Samsung (System-as-root) instructions:
https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

- Just ignore the statement "If your Samsung device is NOT launched with Android 9.0 or higher, you are reading the wrong section"...

...But I want to disable force encryption in my device because I'm not able to access internal storage in twrp. Please I need help
Is your recovery twrp-3.6.2_9-0-crownlte?... Doesn't it decrypt /data?

🤠 PW
 
Last edited:
  • Like
Reactions: J.Michael

zgfg

Senior Member
Oct 10, 2016
7,619
5,020
Could be some module or mod?
The only components I upgraded in the last weeks are:
- Magisk Canary
- USNF
- Shamiko (same if using instead Unmount DenyList))
- Momo (but I also downgraded Momo but did not help)
wngraded Momo but did not help)

All the rest, except for apps over Google play are not touched.
I checked Google Play System Update, it's still May 1, 2022 - well before Momo started to detect su

The whole mystery is in Magisk, Zygisk, Shamiko whatever

TG, I don't have any sensitive app on the phone to start complaining about the root but frankly, with every new round of refactoring or revolutionary improvements, root detection becomes more vulnerable - I wonder why people who really want to run sensitive banking apps or so, that frantically follow all upgrades here. Seems that old technologies (eg MagiskHide in Delta) provide more: root but less vulnerable to detections

Pls don't respond that preventing root detection is not TJW's business - we all know that. I'm talking from the users perspective, not from his or his employers perspective
 
Last edited:

Bouls

Member
Jun 22, 2022
9
2
Aside from what I already told you about Direct install (and I believe this applies to custom ROM zip installation also if updating previously installed Magisk rather than flashing over unrooted system) being broken / producing this type of error due to refactored MagiskInit when updating from 24.x or less, I see you have Galaxy Note 9... Despite launching with Android 8.1, since updating to Android 10 you now have 2SI "SAR" device, so you should read and follow Samsung (System-as-root) instructions:
https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

- Just ignore the statement "If your Samsung device is NOT launched with Android 9.0 or higher, you are reading the wrong section"...


Is your recovery twrp-3.6.2_9-0-crownlte?... Doesn't it decrypt /data?

🤠 PW
That's the same thing I did bro, I got my stock AP and patched it in magisk then flashed the firmware with this patched AP using odin. But my data is still encrypted, I cannot see my internal storage in twrp, yes I have the latest twrp install and it doesn't ask me to decrypt /data, I cannot access data
 
  • Like
Reactions: pndwal

pndwal

Senior Member
The only components I upgraded in the last weeks are:
- Magisk Canary
- USNF
- Shamiko (same if using instead Unmount DenyList))
- Momo (but I also downgraded Momo but did not help)
wngraded Momo but did not help)

All the rest, except for apps over Google play are not touched.
I checked Google Play System Update, it's still May 1, 2022 - well before Momo started to detect su

The whole mystery is in Magisk, Zygisk, Shamiko whatever.
Then difference between our results is probably your Android 11, 2SI, custom XiaoniEU(?)... I have 10, LSAR, stock MIUI...
TG, I don't have any sensitive app on the phone to start complaining about the root but frankly, with every new round of refactoring or revolutionary improvements, root detection becomes more vulnerable -
True... at least every WIP change requires remedial action which can be W...I..............P too! 😜

Also, Zygisk itself is just out of beta... Guess we shouldn't expect hide for Zygisk era Magisk to mature overnight...
I wonder why people who really want to run sensitive banking apps or so, that frantically follow all upgrades here. Seems that old technologies (eg MagiskHide in Delta) provide more: root but less vulnerable to detections
Sure...
Pls don't respond that preventing root detection is not TJW's business - we all know that. I'm talking from the users perspective, not from his or his employers perspective
Why would I say that? 🙄... He's only threatened to force root detection! 😁
www.twitter.com/topjohnwu/status/1452188664780500995

😜 PW
 

zgfg

Senior Member
Oct 10, 2016
7,619
5,020
Then difference between our results is probably your Android 11, 2SI, custom XiaoniEU(?)... I have 10, LSAR, stock MIUI...
Yes but there is no difference between me and me - I had and still have the same MIUI 12.5.8 with A11, on the same A/B device, etc

And those detections were not showing like ten days ago. That's what's bothering me
 

rodken

Senior Member
Jan 11, 2010
1,001
391
That's the same thing I did bro, I got my stock AP and patched it in magisk then flashed the firmware with this patched AP using odin. But my data is still encrypted, I cannot see my internal storage in twrp, yes I have the latest twrp install and it doesn't ask me to decrypt /data, I cannot access data
Did you at least attempt to:

-- The first thing to try is if somehow your internal storage became encrypted when using a legacy screen lock method.
-- Go to your Android device’s Settings > Security > Screen Lock, and change your screen lock method to either Pass or Pin.
-- Create a new one.
-- Reboot into TWRP, and it should ask for a password – enter the pass or pin you just created.
-- TWRP will attempt to decrypt your device’s internal storage, and if it succeeds, you should not have further issues.
-- However, if this does not solve your issue of “unable to mount data, internal storage 0mb”, continue with the rest.
-- Reboot your device into TWRP again.
-- Navigate to Wipe > Advance Wipe > Data, and choose Repair or Change File System.
-- Press Repair File System to see if this fixes the issue. If not, continue.
-- Press Change File System, choose Ext2, and swipe to confirm.
-- Now switch back to Ext4 and swipe to confirm.
-- Go back to TWRP main menu, then the Mount menu, and check if your partitions can be mounted now.
-- If you are still unable to mount your partitions, you need to repair Internal partition, which will most likely wipe your storage.
 
  • Like
Reactions: J.Michael

n.p.

Senior Member
Jul 25, 2013
100
14
Seems you have stub app (not original Magisk app) installed... That's what Hide the Magisk app does; uninstalls Magisk App, installs stub, populates its data with "full Magisk" binary...

Updating w/ app 'hidden' is supposed to work, but, as reported here often (and in my experience) it only works 50% of the time in practice w/o issues... If you hid app(s), my bet is that you'll find conflicting renamed stub ('Settings' or whatever you named it) in system settings, Apps... Uninstall these instances and try with correct corresponding full Magisk app...

If this isn't your issue, please give some details about devices... model, OS, Android version... PW

I had never done the Hide the Magisk app, but the issue does seem to involve remnants of something. The first time i tried to uninstall it (using Settings / Apps / Magisk), I then attempted to install via adb, and received a warning the app already existed. I then uninstalled via adb, and attempted to install after that (no warnings, but something still not working).

Later, with 25.1 supposedly installed again, I noticed in F-Droid (I have never used F-Droid to install Magistk, but of couse it reports the existence of any app with the same name as one in its repository) that it still reported 24.3 installed. So, I used F-Droid to uninstall Magisk (why not?), but then, after reloading F-Droid, it still reported version "1.0" as installed. So, I uninstalled that as well, and F-Droid no longer reported any Magisk on the system. I searched through System / Apps (even with Show system enabled), and saw nothing that I did not recognize. I installed the 25.1 apk downloaded from github again, flashed the patched boot image again, and... same result (Magisk just shows as N/A).

I do notice that if I attempt to install Magisk 25.1, I get the full app (Settings / Apps shows Magisk as 23.42 MB), but if I install 24.3 (working perfectly until a few hours ago), it initially shows as 22.80 MB, but the first time I attempt to start it, it crashes immediately, and then the icon changes to the generic Android icon, and the size in Settings / Apps changes to 224 KB.

The device (a Teclast T10 tablet with the exact model number of E3C5) has the latest stock firmware (1.05_20180306) built from Android 7.0.
 
Last edited:

n.p.

Senior Member
Jul 25, 2013
100
14
I have made some progress here without understanding any reason why.

I randomly noticed this post directed torwards another user, and I had a similar problem with the inability of TWRP to mount data.

Did you at least attempt to:

-- The first thing to try is if somehow your internal storage became encrypted when using a legacy screen lock method.
-- Go to your Android device’s Settings > Security > Screen Lock, and change your screen lock method to either Pass or Pin.
-- Create a new one.
-- Reboot into TWRP, and it should ask for a password – enter the pass or pin you just created.
-- TWRP will attempt to decrypt your device’s internal storage, and if it succeeds, you should not have further issues.
-- However, if this does not solve your issue of “unable to mount data, internal storage 0mb”, continue with the rest.
-- Reboot your device into TWRP again.
-- Navigate to Wipe > Advance Wipe > Data, and choose Repair or Change File System.
-- Press Repair File System to see if this fixes the issue. If not, continue.
-- Press Change File System, choose Ext2, and swipe to confirm.
-- Now switch back to Ext4 and swipe to confirm.
-- Go back to TWRP main menu, then the Mount menu, and check if your partitions can be mounted now.
-- If you are still unable to mount your partitions, you need to repair Internal partition, which will most likely wipe your storage.

I have never had a screen lock on this device, but I decided to go through the repair steps, which did completely wipe everything from the system (I do have recent backups of all of the important apps, but might have lost some other things I don't care too much about). So I set up USB debugging again, and installed the Magisk 25.1 apk again. Much to my surprise (without flashing anything additional), it showed Magisk 25.1 as installed, though it did want to reboot to complete the installation. I verified that Magisk remained installed after the reboot (it did), but then In went into settings, enabled Zygisk, and rebooted again. That brough me back to the previous state (no Magisk installed and TWRP could not mount /data). I could only proceed by reformatting /data (again), setting up USB debugging (again), installing Magisk (for about the 20th time today), and noting (again) that the app shows Magisk 25.1 as installed without any additional flashing (though, again, with another reboot required).

Obviously, I will avoid Zygisk for now, but I would appreciate some enlightenment regarding a way to recover from this in the future (without having to reformat data), and guidance on the timing of the ability to use Zygisk safely (I do have an app on this device that I need to hide root from).
 

flostie74

Member
Jun 29, 2022
21
0
Hi maybe somebody can help me here. I installed magisk on my LOS. I downloaded the 25.1 apk and renamed it to .zip and flashed via recovery. So far so good. But iam unable to see any packages. It just shows "no modules installed". Am i missing something?
 

zgfg

Senior Member
Oct 10, 2016
7,619
5,020
Hi maybe somebody can help me here. I installed magisk on my LOS. I downloaded the 25.1 apk and renamed it to .zip and flashed via recovery. So far so good. But iam unable to see any packages. It just shows "no modules installed". Am i missing something?
Did you have any module installed - it should be showing

On the other side long ago, since Magisk v24, Magisk app does no more connect to Repository. Its in the Changelog and really been asked and answered hundredth of times here

You can install a module if you already have it downloaded (from eg GitHub). Or search back to find about Fox Magisk Module Manager app
 

rodken

Senior Member
Jan 11, 2010
1,001
391
Hi maybe somebody can help me here. I installed magisk on my LOS. I downloaded the 25.1 apk and renamed it to .zip and flashed via recovery. So far so good. But iam unable to see any packages. It just shows "no modules installed". Am i missing something?
Maybe, uninstall Magisk by TWRP - then reinstall Magisk again.
 

flostie74

Member
Jun 29, 2022
21
0
Did you have any module installed - it should be showing

On the other side long ago, since Magisk v24, Magisk app does no more connect to Repository. Its in the Changelog and really been asked and answered hundredth of times here

You can install a module if you already have it downloaded (from eg GitHub). Or search back to find about Fox Magisk Module Manager app
Okay so there is no online installer of modules anymore? Thanks for the clarification.
 

razes

Member
Sep 13, 2016
34
1
I've flashed recently CSC file and lost the root. I updated MAgisk app up to 25.1 version (not a zip file just apk) but still no root. I have flashed Magisk 25.1.zip file in TWRP recovery. Now the phone is rooted, but I unable to start Magisk app. It just stuck on the start (The Mask). I tried to uninstall Magisk app via Application manager, and reinstall it following by reboot. Still Magisk unable to start. I don't remember whether MAgisk was unhidden before the update and zip installation. What should I do next?
Should I rename the Magisk.apk to uninstall.zip and run this file in TWRP. Then install Magisk apk and install zip file from within Magisk App? If so, what the best way to install MAgisk App; via TWRP or File Manager?
Samsung Galaxy S5
Marshmallow 6.0.1
 
  • Like
Reactions: Whosondephone

Top Liked Posts

  • 5
    Some Insight on the New Cat and Mouse Game...

    Since many are asking:
    Is there a fix for this? ... Can't pass MEETS_STRONG_INTEGRITY.
    I'm posting this WOT. 🤪

    I predict some will like it, some won't... You've been warned! 😜

    FWIW, Play Integrity MEETS_STRONG_INTEGRITY is akin to SafetyNet Evaluation type HARDWARE with CTS Profile match...

    Banks could have used this before (w/ S/N API) but haven't as it would have excluded too many users/devices/customers... Nothing has actually changed with new PI API; MEETS_STRONG_INTEGRITY will exclude the same group, so it's doubtful they'll rush to require this verdict...

    Basically, the means to enforce Hardware key-backed Attestation has already been here w/ either of these attestations, but banks don't want to exclude all those w/Android 7 and below, or many w/ broken keymaster 3+ implementations in Android 8+ devices (CTS Profile match with HARDWARE Evaluation type / MEETS_STRONG_INTEGRITY won't pass with locked bootloader), eg most OnePlus devices (nb. Keymaster may have been fixed in OnePlus devices launched with Android 12+)...

    I'm guessing the banks may well leverage this at some point if the time arrives when they feel there is a sufficient critical mass of devices w/ working hardware-backed keymaster (ie w/ hardware keystore, A8+) to trade against the number of modded (bootloader unlocked) devices in use especially if they deem Google slow to close the fallback-to-basic-attestation loophole that has allowed modders to bypass hardware based attestation to CTS Profile match enforcement (by triggering fallback to BASIC Evaluation type as well as bypassing enforcement) and also to allow its counterpart, MEETS_DEVICE_INTEGRITY verdict. (Nb. This verdict should not properly be obtained on modded devices, and it requires the same attestations as S/N as well as the same tricks to trigger fallback to BASIC attestation and bypass enforcement) The incentive to use this foolproof means is also certainly being weighed constantly against the cost / need to use their own custom means of sophisticated 'root' detection...

    Google also, as other authorities have commented, appears to be waiting for some 'acceptable' percentile / critical mass of such devices in use to be reached also, before they swing the 'big hammer' that is Hardware-backed Key Attestation enforcement and that will definitely spell the endgame for modders' use of bank apps, and possibly for OnePlus users and others whose devices have broken keymaster*

    *Nb. There are exceptions, eg Asus ROG Phone 3, where broken keymaster actually results in PI MEETS_STRONG_INTEGRITY and S/N CTS Profile match with Evaluation type HARDWARE regardless of bootloader status instead of the converse...

    It seems likely to me that OnePlus and other devices with broken keymaster can be spared if Google do prevent on-device triggering of fallbacks to basic attestation use simply by using device info contained in the cryptographic attestation sent to Google servers instead of userspace model props etc now used, to bypass enforcement at the server end. If they do this it would be a concession as modded OnePlus etc may then still be able to pass CTS Profile match / DEVICE_INTEGRITY while other modern modded devices won't...

    This would, however, be a way to swing the hammer a bit sooner, and either way, as can be seen from the above, they may be forced to do this once banks do indicate a willingness to enforce
    MEETS_STRONG_INTEGRITY in order to stop a landslide that would prevent all stock locked Android 7 and lower devices using bank apps etc... Or maybe they'll just let the landslide go and force bank app users to upgrade devices...

    Hopefully this gives some insight regarding what pressures may finally force Google to properly deploy (ie. strictly enforce) Hardware-based Key Attestation on devices that support it...

    Personally, I think Google has exercised great restraint, possibly out of some regard for the modding community since I can't see any other compelling reason not to have properly enforced CTS Profile match with HARDWARE Evaluation type where supported or Hardware attested MEETS_DEVICE_INTEGRITY sooner, unless the matter of ensuring that the API properly sees hardware identifiers (ie. these cannot be spoofed, which I believe would again require cryptographic server-side attestation that the device doesn't indicate the presence of hardware keystore) for bypassing hardware attestation enforcement in devices launched with Android 7 and earlier is proving difficult (but I'm fairly sure this mechanism will be a simple matter for Google and probably already in place)... 😛

    It may well be that Google is benevolently holding off but is using/will use MEETS_STRONG_INTEGRITY uptake data as tha natural indicator of the banks propensity for reliable HKA... My bet is that if Google doesn't have immediate plans to move to srtict HKA enforcement for MEETS_DEVICE_INTEGRITY, then they will when the banks themselves move to use the even stricter MEETS_STRONG_INTEGRITY verdict...


    👀 🤠
    4
    I had root, a few apps still recognize it, updating to the newest magisk manager shows n/a for magisk installed. Do I just grab my boot IMG out of my ROM and do it sgain? Will I keep all my data and info...?
    Did you have Magisk App hidden when updated?... Classic trap... Supposed to work, but bit like a pot-luck dinner...

    You're probably suffering from DACFRAS*, which is NOT fatal but all the clinics are full...

    Check in device settings, Apps for your old hidden App... Default name is 'settings', or its what you named it... Uninstall it, and presto!

    *Dual Apps Competing For Root Access Syndrome...

    😜 PW
    3
    Honestly we are almost at the point where we should move these discussions into a standalone thread specifically for Play Integrity.
    2
    ... updating to the newest magisk manager shows n/a for magisk installed....
    Experienced this issue on a fork of Magisk too. https://forum.xda-developers.com/t/...third-party-magisk-fork.4460555/post-87255925
    Did you have Magisk App hidden when updated?... Classic trap...
  • 7
    By the way, there is another thread with detailed OP instructions for the new Magisk v24/v25:

    And a thread that was opened for hiding root with the new Magisk:

    Those new threads were opened because of this old and cluttered thread.
    Unfortunately, people still report/ask here (and in parallel complain that thread is too big to read☹️)
    6
    Its trivial to sniff or even MITM a desktop, or even just run WinPE and reset admin password and use the users own saved passwords in their browser, heck even export their passwords....

    In any event the biggest risk vector is social engineering

    Chasing root phone users only gives them a "feelgood", it does nothing to stop genuine misuse and fraud, at all.....

    I dont see Google or a bank sending out a representative every time someone makes a transaction to see if theyre genuine....trying to control the device is attacking the wrong end of the transaction and is ultimately pointless
    They're not chasing root users. They just want a guarantee that the device is secure, and they have good reason to. Rooting by nature compromises device security.

    I'm not saying your opinion is invalid; in this context however, it is irrelevant, because regardless of how you may feel about the situation, it's not going to change.
    5
    @pndwal You can build Magisk app with custom name and label as you want
    MagiskHide is still effective to hide root from banking apps. It's not dead if you don't care about safetynet stuff.


    Shamiko is taking off your panties on the basic of MagiskHide. So MagiskHide is still better.
    You believe Shamiko too much, It can't really hide zygisk, only fix the zygisk detection of Momo. However, I can't blame it because that was the nature of zygisk and it will never be fixed.
    Still not sure what you're trying to tell me...

    I think we agree on most of this stuff (except your apparent impression that Shamiko Devs have some sort of sexual agenda, or that it's users are somehow prone to 'self abuse'... I won't use the other term either...).

    If you think I have misrepresented any facts regarding Magisk, Shamiko or other, please say it plainly... I think what I provided for the sake of clarity was accurate... 🙁 PW
    5
    Latest Official TJW public Stable (release) Magisk build:

    Magisk

    2022.7.20 Magisk v25.2​

    Maintenance release fixing various issues.
    • [MagiskInit] Fix a potential issue when stub cpio is used
    • [MagiskInit] Fix reboot to recovery when stub cpio is used
    • [MagiskInit] Fix sepolicy.rules symlink for rootfs devices
    • [General] Better data encryption detection
    • [General] Move the whole logging infrastructure into Rust

    Full Changelog: here

    https://topjohnwu.github.io/Magisk/releases/25200.html

    🎉🎊 PW
    5
    did all that, flashed uninstall.zip, uninstalled the Magisk app, flashed the original boot.img from LineageOS payload.bin...

    End result: root apps don't have root, "secure apps" (banking, etc.) complain about the phone being rooted.

    Example: CF.lumen stating "Could not aquire root access". But then the banking app is claiming the phone isn't secure and closes. Same for a State ID certification app I use.

    This is a disaster.

    With Magisk uninstalled and original boot you have no more Magisk

    But you don't pass SafetyNet (bcs your Bootloader is still unlocked and you still run custom ROM and you are no more hiding it by eg using Magisk module USNF), hence banking apps do complain about 'root' (they probably don't say "root" or use the meaning vaguely)

    If you want to get rid of Magisk and with that you want to pass SN and banking apps, you would need to go back to stock and relock the bootloader
    For the record.

    A few months ago, testing something.. :unsure:

    I was surprised to see the official Lineage build(s) were not user builds.
    Since they are not user builds, they can/will be considered compromised and not properly locked down.
    Some apps will report root or a custom rom.​

    It was pointed out to me (by a cm/los dev I highly respect) that the official Lineage (cyanogenmod) builds have always been debug builds.
    • Switching to user builds would be extremely difficult and way too much time and work for the maintainers.
      Reminder. Most are volunteers that freely give us their time and knowledge.​
    • Some devices might not be able to be supported as a user build.
    • Would limit what you as the user can do with the device.

    Cheers. :cowboy:
  • 1084
    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