yashsingh1/xdaforums huggingface dataset:
[Magisk] pndwal:
Yup...

Yup, but users should be aware of this requirement as it affect all special boot modes accessed via key combo on their device...

Eg. you will need a USB connection while using any special boot modes accessed via key combo, eg recovery, download/Odin or safe modes, on Samsung devices with Android 11+ (OneUI 3.0+). - Connecting an active charger, a usb headset, or to a PC while doing key combo all reportedly work for Samsung devices...

But this would only boot to recovery. 😜

Magisk daemon actually detects the extra mandated physical button release to trigger boot to system using magiskinit in /recovery ramdisk since it's hijacked recovery for this purpose, so I doubt adb booting would work... However, reboot to system from OS is supported (property boots system via patched recovery) in many devices using Recovery mode Magisk.

🤠 PW
[Magisk] andrepd:
Hi, I've installed Magisk 25.2, downloaded from github. But the app says "Magisk Installed 25.0 (25000)" and "App Latest 25.2 (25200) (33) Installed 25.0 (25000)"... Even if I tap the "Update" button, it downloads and installs, but stays on the same version!

What is the explanation for this? Any help would bebappreciated!
[Magisk] raziel024:
Samsung A12 SM-A125M here, already rooted following this guide. Now I need to unroot the device, wonder how can this be actually done, so I've the following questions:

Can I unroot the device just by using the "Uninstall" option in Magisk app? If so, do I have to select "Restore images" or "Complete uninstall"?

Apps data will be deleted by doing step 1?

Thanks in advanced for any help.
[Magisk] J.Michael:
I don't know what a "data app" is.

Having sat through horror stories, I would advise deleting the /data/adb folder while you have Magisk installed, before uninstalling Magisk -- just in case you ever try to reinstall Magisk, and the current contents of /data/adb are incompatible with the future version of Magisk.

But maybe that's covered by "complete uninstall". Try searching this thread, somebody may have said something.
[Magisk] J.Michael:
I thought I read that when Magisk gets control, it tests for whether the buttons are being held down -- no mention of Magisk actively testing for "release". What would it test? Does the system maintain some stack of button events? The instructions indicated that you had to release the buttons between the time the "system" had decided to boot from recovery and the time Magisk woke up.

I thought it was the same principle as Magisk providing a "reboot" command that managed to reboot the Magisk in recovery.
[Magisk] bnsmb:
I'm thinking about compiling magsikboot for running on my Laptop with Linux (Fedora 36)

Does somebody have experience with this? Or is the effort for this too great?

regards

Bernd
[Magisk] VStephen:
Infinix Hot 8 X650B
[Magisk] VStephen:
I will just use SuperSU instead
[Magisk] zgfg:
There are like cheats sheets on the Net with all adb and fastboot commands

ADB commands for rebooting to System, Bootloader or Recovery:

adb reboot

adb reboot bootloader

adb reboot recovery

Similar commands for Fastboot:

fastboot reboot

fastboot reboot recovery

Of course, one must have a recent adb and fastboot server (exe on Windows) and some (older) devices may not support all combinations

You can also execute adb reboot or fastboot reboot and then, when device starts rebooting, press (keep pressing) the required key combination (like Vol+ for rebooting to Recovery and Vol- to Fastboot)

Instead of through adb, commands can be also executed from Terminal emulator, with su:

reboot

reboot recovery

reboot fastboot
[Magisk] J.Michael:
@pndwal When I said "Magisk wakes up", what I meant was "Magisk starts running".
[Magisk] VStephen:
I attained root by installing twrp and flashing magisk latest even when ramdisk was no it works
[Magisk] Lughnasadh:
And my favorite... adb reboot sideload
[Magisk] bnsmb:
Answering myself:

There are already magiskboot binaries for x86 in the Magisk apk file that can be used on machines running the LInux OS : see How to process Android boot image files on a PC running the Linux OS
[Magisk] pndwal:
Ok... But as I understand it, by hijacking recovery ramdisk magiskinit runs immediately (replacing init as the first program to run). So bootloader starts 'Magisk processes' effectively before any other process, and magiskinit itself is actually updated to "read input device events from the kernel to detect when a user holds volume key up to toggle whether system-as-root mode is enabled" or if "magiskinit will boot with ramdisk instead of cloning rootfs from system, which... will boot to the recovery".

So the point is the same: release of keys will not occur before "Magisk woke up" either way... It either occurs in the first 3 secs, or after magisk's count (detection window) has elapsed. This detection is precisely what determines how / what to boot...

... also, "system" simply doesn't 'decide to boot from recovery'... The bootloader loads ramdisk (in recovery) into memory per key combo and injected magiskinit determines how to proceed...

Sorry, but if there are actually such instructions that say this, please link them... I'll need to revise my understanding in that case, but I don't believe they exist... 😝 🙂 PW
[Magisk] J.Michael:
I don't know what words you want to use for each stage of the process. When the device is powered off, and you hold the power button, it triggers some program that is capable of loading another program. Some number of bootloaders later, something loads the contents of a partition and executes *that* blob of code. The choice of whether to boot boot or to boot recovery is often based on other buttons. Each step takes time. Some steps are probably artificially delayed.

The installation instructions say

I took that to mean I had to hit the tiny window between a bootloader deciding to load and execute the recovery partition, and the code of the recovery partition getting control. The window is a little bigger if a substantial part of the recovery Android has to initialize before Magisk code gets control. I didn't know that Wu had made it a little easier by giving me another three seconds.

I'm not sure what we're arguing about. It can be made to work, but I had a hard time.
[Magisk] pndwal:
Who's arguing? ... That's not the point to me! 😜

I said I didn't think that an adb command would work for booting system w/ Magisk via recovery, you protested, I looked back at commits / actual mechanism and have already said my basic assumption was wrong:

and that:

I am happy to have gained a clearer understanding of processes at work here, and I did also point out some flaws with your understanding...

What I wrote is technically correct as far as I can determine however, and can be verified...

I now suspect that your original suggestion re. adb reboot recovery may in fact work! (Sorry for my premature comment based on my misunderstanding of how Magisk hijacks recovery. 😕 )

You have the advantage over me in that you appear to have a device w/ Magisk installed in recovery ramdisk to test... Is that a Galaxy S10 or other?... I've only read technical details on this, but I'd be happy to know especially:

1) if 'Reboot to recovery' taken when booted to system w/ Magisk via recovery (eg from Magisk menu) actually has a different result to 'Reboot' (I suspect it won't)...

2) if adb reboot recovery from ADB on PC w/ USB debugging enabled taken when booted normally to system (w/o Magisk) actually does reboot to system w/ Magisk via recovery as you originally suggested... I now suspect this will work for reasons stated. 🙃

... I may get round to running Magisk as recovery on my Xiaomi A only legacy SAR device just to test these things... eventually. 😜... Kind regards, PW
[Magisk] VStephen:
My phone Infinix hot 8 x650b has ramdisk value as no so I installed trwp...

Then installed latest magisk app rename to zip then flashed from twrp adding disable force encryption.zip in the quee it worked fine
[Magisk] pndwal:
Nb. It cannot generally be assumed that zip installation from recovery (can only install Magisk in boot partition) when Randisk = No will work (because bootloader support for this is is not used for stock setup, therefore often (usually?) doesn't exist), but in your case there were indications that it would work as I mentioned:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-87646629

Glad it works for Infinix hot 8 as Magisk in recovery ramdisk is fraught...

Did you disable Enforce encryption just to use TWRP?; Nb. It may possibly be better to keep encryption and install Magisk using recommended App install method... PW
[Magisk] mattcross:
Gurus, encountered error and accidentally flashed 25.2 over hidden Canary. Magisk Manager is showing no root with Superuser and Module grey-out, but Basic Root Checker said I am still rooted. Planning to upgrade the firmware at the same time. Can I flash newer Stock Rom over the current setup and re-do the root access later?
[Magisk] J.Michael:
It sounds like you had a hidden Magisk manager app -- that is probably why your visible Magisk manager app says Magisk is not installed.

We like to believe that flashing a complete ROM will eliminate Magisk and start you from scratch, but if you do not wipe data, you could have conflicting Magisk crap in /data/adb -- incompatible modules, even the Magisk database itself could be incompatible. If you want to start over, you should delete /data/adb while you have root, before flashing a new ROM. (Or wipe data.)
[Magisk] mattcross:
May I know how do I get to data/adb? I have TWRP installed.
[Magisk] 73sydney:
in TWRP:

(tap) Advanced -> File Manager -> data -> adb -> folder in bottom right -> delete, then swipe

top tip: dont forget to then go to /sdcard and delete the TWRP folder before rebooting (apps look for the TWRP folder to detect root/modification) - if you forget, you can always do this via the file manager in ROM itself, for me its just an automatic thing to do this in TWRP itself anytime i boot there
[Magisk] pndwal:
In release builds, Magisk's root daemon will enforce certificate check and check daemon version. Any older version Magisk Apps as well as Apps w/ non-matching signatures will now be rejected and forcefully uninstalled...

If you have recent canary, you have this issue as current stable version is actually lower than Canary; effectively you are trying to downgrade...

You likely also have issues mentioned above, and should at least uninstall any Magisk App installed, both Magisk and 'Settings' or whatever you renamed stub APK to... If you can't see it in launcher drawers, check in device settings, apps per name you set...

Next, in order to downgrade from late Canary to stable you can either

1) Reinstall the Canary app. Nb. Installed = N/A issue should be resolved. Next, take Uninstall Magisk (red button in App), Complete Uninstall, then you'll be able to do initial Stable Magisk installation (patch a boot image, flash w/ fastboot from PC etc) as you are now fresh installing rather than downgrading...

2) If you wish to downgrade using Direct install, the solution is to first install latest official Debug build, both App then core Mask using Direct Install. Nb. Canary was built as debug but is now built as release, Debug is the new debug build...

This will bypass the new signature and daemon version checks allowing you to downgrade or even run CI test builds from John's actions runs or forked builds signed with a different dev's/ builder's keys...

Of course you will next be able to install 25.2 (Stable) App and then downgrade Magisk (mask) to this packages binary using Direct Install also without issue. 🙂

Just be aware that downgrading means you will be loosing any fixes / enhancements in Canary since 25201.... in case your device might need them... 🤠 PW
[Magisk] mattcross:
@pndwal @73sydney @J.Michael , thank you so much for the prompt reply. Somehow, a few clicks around Magisk and I am able to get it up and running again. It is no longer hidden and the original Canary is restored. It is now offering 25205 as update. I have yet to click on this. Current plan is to: -

a. Delete adb data via TWRP

b. ODIN the new firmware (will this remove or cause conflict to TWRP?)

c. Flash custom ROM on external flash drive via TWRP

d. Get root

Are above steps valid? Cheers!
[Magisk] pndwal:
So I assume you now have matching 25205 Canary app....

Some things here depend on device, ROM, whether Magisk installs to ramdisk in boot or recovery (is Ramdisk = Yes or No?)...

Please give details... 🙂 PW
[Magisk] 73sydney:
Samsung?...for my S20+ 5G at least....

a) flashing CSC and not HOME_CSC portion of stock ROM will take care of this (i.e. flashing HOME_CSC will retain data)

b) ODIN will always only flash what you send via it, if thats a stock Samsung ROM and you include AP (on my device, thats going to include recovery.img) and it will overwrite TWRP with stock recovery. So if you got TWRP on it last time i suspect you know how to get it back on there again - if not then the device specific threads and topics on TWRP and or rooting for your model is the best place to go for step by step on installing TWRP/decrypting data (if you wish) and preventing overwriting of TWRP via stock recovery (these usually done via a "multi disabler" zip of some sort)

c) depends on b)

d) root via TWRP is still how i do it (let the magisk-xxxxx.zip do all the work for you, im lazy)....

i.) make a copy of magisk-xxxxx.apk and rename to magisk-xxxxx.zip

ii) flash magisk-xxxxx.zip via TWRP

ii) then reboot

iii) install magisk-xxxxx.apk (to get a full magisk app install)
[Magisk] VStephen:
I had to ... Cause after installing twrp it says phone encrypted input password.. so I reflashed stock recovery factory reset then flashed twrp again
[Magisk] zgfg:
When TWRP asks for pin/pass/pattern, you have to enter your Android screen unlock pin/pass/pattern

Storage is encrypted and TWRP needs that to be able to decrypt

Protection introduced long ago by Google for A10/A11+ (for some devices even with A9)
[Magisk] VStephen:
Never knew... Thanks
[Magisk] J.Michael:
@pndwal Can Magisk forcibly uninstall a hidden manager app?
[Magisk] mattcross:
My apologies for the lack of details. S21 Ultra Exynos. CVH7 firmware. Plan to upgrade to the latest CVIF. Then TWRP. Use that to flash BeyondROM. And then get root via Magisk.
[Magisk] 73sydney:
I run Beyond ROM on my S20+ 5G, so know where youre coming from

You'll want to do everything i described in my previous message, most notably multi-disabler...please advise if youre up to speed with getting TWRP installed and doing multi-disabler ...data decrypted etc...

for @pndwal's and other benefits:

Beyond ROM is a (lightly) debloated stock Samsung ROM, released monthly (usually) and users are encouraged to flash latest stock monthly ROM as base before flashing Beyond ROM via TWRP (though you can force install on mismatched base if you know what youre doing, and your region isnt OXM compatible (allowing you to use another regions ROM from same OXM base) and your local carrier or unbranded ROM is slow to release or behind - i download the German (DBT) stock ROM as its OXM compatible and our carriers and even unbranded XSA here in Australia are often a month (or more) behind) . You can dirty flash from one Beyond ROM version to the next (without updating stock base) if youre feeling saucy (im a clean flasher from eons back personally)
[Magisk] pndwal:
Like your style... You're the master ROM Tester... 👍

Still, if encryption issue was not that users TWRP won't decrypt but rather simply that password wasn't entered, [edit: this applied to different user above, but] why the need for multi-disabler?...

Guessing there's some other issue with ROM when debloated etc?... PW

Edit: or is latest Beyond Rom A13 and TWRP decryption isn't working with that?...

Edit 2: interesting... Seems only unofficial TWRP may be available for this, and only up to 3.6.2 A11 branch... I'm guessing that if latest 3.7.0 A12.1 branch got ported to S21, decryption may be working...
[Magisk] 73sydney:
the multidisabler does one major other thing, apart from decryption, namely preventing stock recovery overwriting your just flashed (via ODIN) TWRP, its only used each time when flashing stock ROM via ODIN...so on Beyond, if you do the clean flash method, once a month - hence why lazybones here uses his AIO flashing zip

the process for clarity flashing stock and to install TWRP and decrypt data:

1) crack open ODIN, *disable auto reboot

2) load stock firmware files in their corresponding slots

BL in BL Slot, AP in AP, CP in CP, CSC in CSC (or HOME_CSC in CSC - if you want to keep data)

3) chuck TWRP .tar in USERDATA slot

4) flash all

5) with cable still plugged in, reboot device into recovery mode (if you misses it, you'll have to go back to ODIN and flash just TWRP in USERDATA (again) and retry catching recovery mode (again)...its a ball ache....

6) In TWRP, format data

7) flash multi disabler - data decrypts and stock recovery is blocked from being reinstalled and overwriting TWRP

optional flash other zips like bluetooth library patcher etc, and magisk

reboot into system

* unless using an automatic AIO zip in USERDATA like i and a few others do that does the TWRP install, format data, install multidisabler, patch bluetooth library and patch bootlogo. in which case its all hands off until it boots into system and into setup wizard, like magic

so multi disabler is applied on stock ROM, and is already in effect and in fact enables use of the debloated (stock) Beyond ROM...which is flashed as a zip from TWRP (not ODIN)
[Magisk] pndwal:
I don't believe it needs to because the stub is basically an empty / tiny app, and unlike full Magisk App it contains no binaries until these are populated into its data... The populated stub (incl app data) is about the same size as an installed Magisk app...

When a user tries to downgrade or install builds with key certificates not matching John's I guess daemon will simply not allow stub's app data to be populated with the new Magisk builds binary... I haven't examined the commits carefully and frankly I can't be bothered; you can easily follow the links below and discover how this works for stub .apk if you wish...

Edit: I just appended Other relevant commits to post linked ... See especially "Enforce dyn APK signature in stub app".

You will find that such builds are rejected however; they simply won't load in stub data and full Magisk .apks will install initially but are forcibly uninstalled immediately afterward just as stated.

I put info about this change including the two commit links and effects on users here:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-87131043

John made comments about enforcement of app signatures in main GitHub page in May:

https://github.com/topjohnwu/Magisk#signing-and-distribution

... Notice of daemon version check only appears in changelogs, but I discovered that this check has the same effect... PW
[Magisk] fidani123:
Hi, just installed Magisk downloaded from official github site (https://github.com/topjohnwu/Magisk/releases/tag/v25.2) but virus total gave me warning from two sources (MaxSecure and Symantec). MaxSecure found Android.W32.Bray.h.. What to do?
[Magisk] jons99:
I think you should call the police and tell them magisk is trying to hack your phone in order to get root privilege to your android system they'll know what to do

welcome to xda btw ;)
[Magisk] fidani123:
I root my phones for a decade and know what is Magisk.. You do not worry about that. But this is a first time I see it and could be good than someone give any explanation.. False positive? Or anything else..
[Magisk] J.Michael:
I can't read screenshots. Did you download a Magisk APK to a desktop computer and get warnings from the desktop computer's virus scanners?

I would ignore warnings from a Windows anti-virus program about an Android APK.
[Magisk] J.Michael:
I don't understand why a question about Magisk's ability to detect and uninstall a manager app leads to a discussion of stub manager apps.

Did I misunderstand the reference to Magisk uninstalling older apps? Is it the older app uninstalls itself? So a sufficiently older app would not?
[Magisk] fidani123:
No, it wasn't virus scanner on comp. It was on my phone. Please, can you try this and you will find out what I mean: download latest version of Magisk from official site and use online virus scanner with multipla engines like VirusTotal:

VirusTotal

VirusTotal

www.virustotal.com

and you will see warnings...
[Magisk] zgfg:
Frankly, I don't understand the purpose of the whole discussion

AFAIK, it started with just one more user who did Hide Magisk app, forgot to Restore and claimed that his (new) Magisk app does not find Magisk as being installed (and updated)

And then (correctl me if wrong), there was a suggestion to delete /data/adb folder (through TWRP), etc

First of all, yes it is bad that this problem with the hidden Magisk app related to Magisk update has never been resolved (seems to be ignored by Magisk devs)

Btw, Magisk/TJW does not care about hiding - why he simply does not remove that old option.

There are other ways (better for hiding) to hide an app (HMA)

Second, TWRPs are not generally available for all devices and new Android versions, hence IMO it's not the proper 'resolution' for the problem.

You unnecessarily loose all modules, DenyList, SuperUser grants, etc (I'd waste an hour or two to carefully reconfigure everything, specially my LSPosed modules like HMA, Gravity, CustoMIUIzer).

Plus you still keep having a 'bloatware' app on the phone (that old, hidden/renamed Magisk app)

Instead, one has to find and uninstall his old, hidden/renamed Magisk app. No modules, database, etc would be lost and on the next reboot, new Magisk app will properly find the Magisk

And I don't understand (better to say, I don't accept) users crying that they don't remember how they renamed the Magisk app and/or don't know how to uninstall the app

etc

If 'you' forget your pass on the PC, 'your' Android unlock screen pin, etc - it's 'your' problem - as simple as that

Besides, even if you forgot how you renamed Magisk app while hiding it, there are still ways to find it and to uninstall

It's unbelievable for me that somebody wants to use Magisk but is not able/familiar how to look for an app through the Android Settings or Drawer, and what to click then to uninstall an (user!) app

And sorry, I don't feel guilty for maybe a technocratic view
[Magisk] pndwal:
Because you asked about that!:

'hidden manager app' = stub...

John said:

An enforced check that a new app's Magisk daemon version is not older than the one currently installed works the same way as the certificate check.

If a user has taken Hide the Magisk app option, the original App is obfuscated by replacing it with the stub and then populating it's app data with binaries from the original App before that is uninstalled...

So the "manager app" you are asking about is the stub .apk.

Maybe...

No, it's quite clear that "Magisk's root daemon will enforce this certificate check and reject and forcefully uninstall any non-matching Magisk apps".

Apps are not 'uninstalling themselves'. The root daemon does this which is why you can't byass the check enforcement simply by uninstalling the current App. - You must either update to a (debug) build (incl. Magisk core/mask itself) with the checks disabled, or fully uninstall Magisk... PW
[Magisk] m0han:
Poco X3 phone with AICP A12.1 rom. Ramdisk=Yes. Flashing Magisk renamed to zip works for me. (Just an FYI).
[Magisk] m0han:
Is that a generic thing and only for Samsung? Or, is it one of those 'the master ROM Tester' things ;) ? If not, I'd like to know more. Could you explain or provide info/links?
[Magisk] m0han:
Renaming works too (me to NandBaks and @zgfg to TWRP.bak ;))