yashsingh1/xdaforums huggingface dataset:
[Magisk] zgfg:
You didn't need to uninstall Magisk app, just updating the app would suffice

You only needed to Restore Magisk app if Msgisk app was Hidden

Now, "something went wrong" but seems that you again have Msgisk (not app) and your modules

Check in Terminal emulator Magisk version and do you have root:

magisk -c

su

Test also your modules - some LSPosed module, Play Integrity if you have PIF, AdAway (root) if you have

You can try to reboot and then to open Magisk app and to reinstall the app if it would still fail to open
[Magisk] woj_jas666:
The thing is i tried to reboot multiple times and always after magisk installation , magisk icon magiaclly disappears and i cannot find it , also i removed this "hidden" shortcut so i dont know what to do , this is my output from terminal
[Magisk] zgfg:
From the screenshot you have Magisk Canary 27002 installed. As said, check your modules, they should be running

su asks for permission - seems you never granted root to your Terminal Emulator

Now you mention "hidden link" - does it mean that you previously had your Magisk app hidden?

This is unfortunately an issue that is as far as I remember present for four years or more - BEFORE upgrading Magisk, ALWAYS Restore/un-hide Magisk app if it was hidden.

And on every Magisk update, users who did not make it, report problems and ask for help :-(

If you didn't , now you need to find your old hidden Magisk app and you must uninstall it now. If you didn't change its name, default name for hidden Magisk app should have been Setting. You could also find it by checking the package names - hidden Magisk app must have a scrambled package name

If you didn't further hide that hidden Magisk app by HMA, then use TB Checker (download from Playstore) and run Root check - under Root Management Apps it will show you the name of your Hidden Magisk app

Then find that app in your native Settings, Manage Apps and UNINSTALL it and reinstall your new app
[Magisk] woj_jas666:
My hidden app was caled "magic" and i also cannot find it (i also unistalled it)

this is what root checker is showing not:

Is there any easy way of removing magisk data or bringing this shortcut back to work ?

Im 99% sure app name was either Magic or magic
[Magisk] zgfg:
Then open your native Settings, Apps, Manage Apps, find that Magic it and there you must have some Uninstall oprion

Usually, Settings allow tp search, first for App to find App mgmt, then for magi to find any app with that substring (case not sensitive) in the name

Otherwise, then Factory reset - it will uninstall all apps you have. However, you will also loose your modules, and other Magisk settings (minor compared to the need to install and configure all apps and everything from scratch)

Magisk keeps its data - but that is not Magisk app, Magisk app installs like any other app to /data/app (there you could manially find it by package name but you don't know that either) - at /data/adb

You may try renoving that, but f you really have the old, hidden app remaining, that will not remove it. However, it will remove the Magisk database, so you can try that (less troubles than factory resetting)

To eemove that folder you may use root explorer (like MiXplorer) - but you must have had it installed from previously, and you must have granted it previously the root privileges. Now, without having a working Magisk app, you cannot grant root privileges annymore (like with su in your previous post where it also missed root grant)

Or delete that adb folder from TWRP or any other custom recovery. However, that cust rec must properly support decryption of /data - for eg A14 phones I doubt you will find that

PS: From your screenshot, TBChecker did not find any root mgmt app. You either previously used eg HMA (Hide M Apps) and hid that hidden/scrambled Magisk app or you don't even have it (and sometging else went wrong).

Either way, deleting /data/adb, or factory resetting that will reformat the whole /data will help
[Magisk] badabing2003:
In TB Checker, Run Xposed Check

Then look for fail , it would tell you the package name

Example:

Uninstall package

adb shell pm uninstall -k --user 0 <PACKAGE_NAME>

Replace <PACKAGE_NAME> with the one reported.
[Magisk] boggdy:
How do you use AA? I don't have a problem to connect via cable. When I try to connect using a wireless transmitter... It won't do it.
[Magisk] batyliit:
hello, i plan on installing ElementalX Kernel on my Galaxy S9 Exynos, i have read in the forum that it unroots devices, the creator of the kernel says that he flashes magisk with twrp. It that method still safe to use? My magisk is system-as-root, do i just redo the initial root process (flash through odin/wipes data/i'd rather not), or is it even possible for the kernel to unroot system-as-root? any help is appropriated
[Magisk] J.Michael:
Does the author of the kernel mention Samsung?

Do you understand the process of replacing a kernel?

I do not see how you can just wave a "kernel" at TWRP and have TWRP replace the existing kernel. I can imagine *some* TWRP performing this magic, but I doubt that *all* TWRPs are able.

The easiest (for me) is for you to just try following the instructions. Not so easy for you if you are forced to wipe data.

Maybe it would help if you describe what you have been told to do, and what you have already done.

Do you have a TWRP?

Is Magisk installed in recovery?

What do you do to replace a kernel?

If "replacing the kernel" involves using @osm0sis' Android Image Kitchen to pull apart the boot image and then reassemble it with the new kernel, and you normally use Odin to flash anything, then I think you would just build a new boot image, make a new AP.tar file with the new boot image replacing the old one, and use Odin to re-install the ROM, using your new AP.tar instead of the original.

I believe that whether flashing with Odin wipes data is determined by which CSC file you use. I think CSC_HOME does *not* wipe data. You might want to read a few posts to make sure.

Once you have it running with the new kernel, I think you just use whatever process worked before to install Magisk.
[Magisk] pndwal:
Magisk deprecated the custom recovery installation method basically because a) It introduced issues from another custom mod that Magisk Devs can't control or fix, and many issues with flashing via TWRP etc have been attributed to Magisk. The .zip installation from custom recovery method is fine however, as long as the custom recovery is actually fully compatible with the device. It will require additional installation by Direct Install in Magisk app since sepolicy rule directory detection was refactored in Magisk as .zip via recovery now only partially sets up Magisk root... The Patch and flash method can be done entirely with Magisk and stock tools. And b) Because Patch and flash works for all devices; .zip installation from custom recovery could not work for Legacy SAR A-only devices lacking B/L support for ramdisk in/boot partition (these all launched with Android 9) for example.

Well, it is for Magisk purposes only... Your device originally booted with Legacy ramdisk method on A8, same w/ A9 but gets updated to what Google calls 2SI booting with A10+... 2SI is a form of SAR, but Google uses SAR only to refer to devices originally launched with SAR (Magisk calls L-SAR) as they are stuck with that method, ie. they are not automatically updated to 2SI w/ A10+ like Legacy ramdisk devices...

Unless you are rebuilding AP binary with custom kernel, that would restore your stock kernel...

Not sure what you mean here... Unroot is done by flashing stock or un-patched images... boot.img contains both kernel and ramdisk for your device... Magisk is installed in ramdisk w/o touching kernel these days AFAIK... Either way, flashing stock boot.img will unroot your device.

Hope it helps. 🤠 PW
[Magisk] woj_jas666:
So If my com.topjohnwu.magisk shows pass i should do

adb shell pm uninstall -k --user 0 com.topjohnwu.magisk/CODE] ?

On Xposed check i do have everyghing set as passs
[Magisk] woj_jas666:
Is there any way of completely removing magisk and installing modules again ? What will happen if i flash with stock module now and reflash with magisk modified one ?
[Magisk] zgfg:
Just by dirty flashing your ROM (without Factory reset), it will remove Magisk from Boot but everything it previously installed to Data (modules, its database, Magisk app) remains on Data

Next time you flash Magisk to Boot, Magisk will find its old stuff...

So, as I told you. If you want to fully get rid, Factory reset (if you cannot manually remove things by use of TWRP)
[Magisk] pndwal:
Just looked back at your problem... Issue is probably quite simple... You have R (release) 27002 Magisk core/mask installed which is Canary 27002, but you tried to install R 27000 App which is 'Public' (Stable/Beta) 27.0...

Magisk daemon now checks version no.s and signing keys, and forcibly removes older Apps to ensure compatibility (and prevents easy downgrading) as well as Magisk Apps signed differently to combat issue of downloading modified builds from unauthorized sources... Since Daemon version is 27002, it's forcing uninstallation of 27000 App... You can't install current Stable/Beta App with newer release (Canary) 27002 core/mask already installed...

Just try installing Magisk Canary App from main GitHub page. (Click Magisk-Canary button.)

If you really want to downgrade to current public Stable build, instal Debug (D) build (current is 27002) App then core/mask by Direct install... Debug builds bypass version checks (allowing downgrading or installing CI builds or unofficial Magisk forks w/o restoring images)... Next, install public 27.0 App and take Direct install to downgrade core/mask to 27.0 (27000).

You should get access to Magisk configuration via app w/ 27002 installed or after downgrading core/mask, but I put more info here on bypassing version detection and restoring clean configuration also:

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

👀 PW
[Magisk] woj_jas666:
ok, trying to install , will keep you posted

@pndwal @zgfg

Guys thank you so much !!

@pndwal solution helped, everything is working again !!

Last question, when im trying to hide Magisk app again , im trying to put any label into this application , im getting popup message -> error , how can i fix it ?
[Magisk] pndwal:
What message/error?... 😬 PW
[Magisk] woj_jas666:
Just This

I click (i will translate)

Hide Magisk App -> I add new name like "MagiskHidden" -> Then im getting "Error" on the bottom , thats it
[Magisk] woj_jas666:
Looks like its some magic bug which is resolved on debug channel.

Steps to resolve:

1. Set the update channel to Canary or Debug and then click on Install the App to reinstall it.

2. Hiding app working correctly
[Magisk] pndwal:
Ah, so you got it sorted... Guessing you now have Canary 27002...

For your understanding, Hide the Magisk App function is clearly calling stub from online repo per update JSON... Stub apk used by 27000 (27.0) is v38...27002 builds (both release [Canary] and debug [Debug]) use v39: eg, https://github.com/topjohnwu/magisk-files/blob/master/canary.json

27002 properly can't hide with v38, (a fix to ensure compatibility actually just came with v27002:

Always update stub APK when upgrade, topjohnwu committed on 15 Mar.)

Leason (for now): Check channel isn't calling JSON for older versions when taking Hide (or Restore?) the Magisk app, ie. if using Canary, don't take Hide or Restore the Magisk app with channel set to Stable or Beta...

Nb. Stable or Beta channels will always point to older build versions than Canary and Debug...

Nb. 2. I don't know why stub is still being called online... There were previous fixes to make installation 100% offline (ie. to retrieve stub.xxx.apk embedded in current binaries) so this may be a regression?... But I see stub .apk is still linked in JSON so I may be missing a reason it needs to work this way... Logically, App should pull stub from current binaries as it does for current binaries used for patching images however, and not rely on channel set (or GitHub repo/network)... I expect this may be fixed (again) in future.

👀 PW
[Magisk] mrgbuzz:
I just tried installing Magisk 27.0 and now my phone wont load past the initial boot logo. I had pulled the image from the initial install and flashed this. It shows in fastboot devices but that's all I can do. is either reboot to fastboot or see the boot logo.

Any advice or suggestions? Thank you
[Magisk] pndwal:
Is it a bright pink phone?... Cos I don't think we can root bright pink phones... 😉 PW
[Magisk] mrgbuzz:
🤦‍♂️ oops. forgot some details.

Poco X5 pro (redwood)

EvoX rom latest 9.0 (android 14)

I had magisk running on this phone already. I needed to do a clean install of the rom. So was starting all over again.

mrgbuzz said:

I just tried installing Magisk 27.0 and now my phone wont load past the initial boot logo. I had pulled the image from the initial install and flashed this. It shows in fastboot devices but that's all I can do. is either reboot to fastboot or see the boot logo.

Any advice or suggestions? Thank you
[Magisk] pndwal:
So patched boot.img only and flashed via fastboot?... What's 'initial install'?... Do you mean your took OTAs or updates since installing and prior to flashing Magisk? 🤠 PW
[Magisk] mrgbuzz:
As I was coming from an older rom version , I had to a full clean install. All went ok with this.

I then installed magisk apk, patched the boot img and flashed this through fastboot. Which is where I've gotten to with the boot logo.

TY
[Magisk] zgfg:
Flash back the original / not patched img back.

Newer phones/ROMs may require to patch and flash init_boot.img, not boot.img

It's dangerous to flash permanently, it's better to boot temporarily (observe the option "flash" is omitted):

fastboot boot <img file>

If anything goes wrong (first time many things can go wrong), you just reboot the phone and and no harm/brick remains

If you have a Pixel, better use PixelFlasher tool (separate thread) - now seeing that you have Poco, so not relevant
[Magisk] pndwal:
So assuming boot.img is from current ROM (still not entirely clear... You don't mean boot.img from original installation by 'initial install' do you?), you could have issues with modules becoming incompatible especially if ROM upgrade also updated Magisk version...

Flashing unpatched boot.img from current ROM should restore booting but will leave Magisk configuration in /data/adb...

Check Magisk FAQ for ways to recover from bootloop if caused by modules... [Edit: Missed that it's a clean installation] Please say if you suspect mismatched boot.img... 🤠 PW
[Magisk] mrgbuzz:
Yes, boot.img from the current rom.

I got as far as patching the boot img using the magisk patched file. followed the flash instructions for this and since then I am stuck on the boot screen.

Hope this makes sense.
[Magisk] zgfg:
Clean installation should mean Factory resetting (hence wiping Data), then old modules are gone and they cannot cause bootlops
[Magisk] pndwal:
Ah yes... His phone should not have init_boot.img however... That's for GKI, from A13 LV... PW
[Magisk] J.Michael:
Have you tried flashing the un-patched, original, boot image from the current ROM? Does that get you back to being able to boot Android?

If that works, look at the image files in the ROM. How many have names including the string "boot"?

If "boot.img" looks like the right image for you to be patching, start over: take the unpatched boot.img and patch it with Magisk. Then try @zgfg's suggestion of *not* flashing, just one time boot with patched boot.img:

fastboot boot patched-boot.img
[Magisk] mrgbuzz:
Hi, yeah I flashed the ROM again. Will try again with Magisk and see if this works. Ty
[Magisk] pndwal:
Clean flash (with factory reset/data wipe this time too)?

Suggest try with Canary next time... In case there's already a fix.

Also, fastboot boot doesn't work on all devices but fastboot flash should...

👍 PW
[Magisk] gloops100:
Hi all,

Magisk is installed with some module.

Root is OK.

Magisk is hidden.

But some apps are still detecting the root.

How to solve this please ?

My config :

- Xiaomi fold 3 , Android 14 (hyperOS)

- Magisk 27

Modules :

- PIF v15.9.8

- shamiko v1.0.1 (300)

- Zygisk v1.9.2
[Magisk] Mister Floppy:
I tried getting superuser permission by running the "su" command in many terminal apps (Termux, Termius) after having granted su access to them in the magisk manager, all to no avail: each time a message is popping up saying "recv_fd: msg_flags =m 0, msg_controllen(0) != 24"

Device: Pocophone F1

Android version: 9

Magisk version name: 27.0

Magisk version code: 27000

Magisk log:

02-20 23:05:23.386 2478 2478 I : Magisk 27.0(27000) daemon started

02-20 23:05:23.386 2478 2478 I : * Device API level: 28

02-20 23:05:23.399 2478 2480 I : ** post-fs-data mode running

02-20 23:05:23.399 2478 2480 I : * Mounting mirrors

02-20 23:05:23.476 2478 2480 I : * Initializing Magisk environment

02-20 23:05:23.546 2478 2480 I : * Running post-fs-data.d scripts

02-20 23:05:23.554 2478 2480 I : * Running module post-fs-data scripts

02-20 23:05:23.557 2511 2511 I : BuiltIn-BusyBox: exec [post-fs-data.sh]

02-20 23:05:26.139 2511 2511 I : zygisk-detach: exec [post-fs-data.sh]

02-20 23:05:26.158 2511 2511 I : zygisk_lsposed: exec [post-fs-data.sh]

02-20 23:05:26.184 2511 2511 I : safetynet-fix: exec [post-fs-data.sh]

02-20 23:05:26.201 2511 2511 I : ExSDCard: exec [post-fs-data.sh]

02-20 23:05:26.241 2478 2480 I : * Loading modules

02-20 23:05:26.242 2478 2480 I : BuiltIn-BusyBox: loading mount files

02-20 23:05:26.243 2478 2480 I : zygisk-detach: loading mount files

02-20 23:05:26.243 2478 2480 I : terminal_systemizer: loading mount files

02-20 23:05:26.243 2478 2480 I : zygisk_lsposed: loading [system.prop]

02-20 23:05:26.245 2478 2480 I : safetynet-fix: loading [system.prop]

02-20 23:05:26.245 2478 2480 I : ExSDCard: loading mount files

02-20 16:05:26.735 2478 2901 I : ** late_start service mode running

02-20 16:05:26.736 2478 2901 I : * Running service.d scripts

02-20 16:05:26.739 2478 2901 I : * Running module service scripts

02-20 16:05:26.739 2478 2901 I : youtube-jhc: exec [service.sh]

02-20 16:05:26.750 2478 2901 I : BuiltIn-BusyBox: exec [service.sh]

02-20 16:05:26.772 2478 2901 I : music-extended-jhc: exec [service.sh]

02-20 16:05:26.780 2478 2901 I : zygisk-detach: exec [service.sh]

02-20 16:05:26.819 2478 2901 I : zygisk_lsposed: exec [service.sh]

02-20 16:05:26.835 2478 2901 I : safetynet-fix: exec [service.sh]

02-20 16:05:26.957 2944 2944 I : zygisk32: replace nativeForkAndSpecialize

02-20 16:05:26.957 2944 2944 I : zygisk32: replace nativeForkSystemServer

02-20 16:05:27.199 3209 3209 I : zygisk64: replace nativeForkAndSpecialize

02-20 16:05:27.199 3209 3209 I : zygisk64: replace nativeForkSystemServer

02-20 16:05:27.219 2943 2943 I : zygisk64: replace nativeForkAndSpecialize

02-20 16:05:27.219 2943 2943 I : zygisk64: replace nativeForkSystemServer

02-20 16:05:28.140 2478 2480 I : denylist: initializing internal data structures

02-20 16:05:42.820 2478 2480 I : ** boot-complete triggered

02-20 16:09:21.524 14498 14498 E : open /sbin/.magisk/pts/ptmx failed with 2: No such file or directory

02-20 16:13:56.698 15529 15529 E : write failed with 32: Broken pipe

02-20 16:15:53.325 16697 16697 E : open /sbin/.magisk/pts/ptmx failed with 2: No such file or directory
[Magisk] zgfg:
Never seen in the Magisk log. Seems it was logged 7 minutes after booting was completed - does it correspond to your time of using Termux?

Btw, check k do you have /sbin (many devices will not have) - log complains that dir does not exist

Have you tried any other more simple and out-of-the-box ready Terminal Emulator
[Magisk] Mister Floppy:
Yes, that does correspond absolutely to the time of using Termux.

The /sbin folder with its subfolders /.magisk and /pts does exist - but there's no "ptmx" file or folder in it (see attached screenshot)!

I've tried it with another out-of-the-box ready Terminal Emulator ("Another Term" from the Google Playstore), and that didn't work either, same error message ""recv_fd: msg_flags =m 0, msg_controllen(0) != 24" appears when running the "su" command.

Other users have reported the same misbehaviour, too, see:

https://www.reddit.com/r/termux/comments/1ayxo4u

If I remember correctly, v26 of "Magisk" did not not have this issue, but I don't want to try to downgrade from v27 because I fear that could mess up further things.
[Magisk] zgfg:
A short test. Can you download (just download NHTerm apk and install, no need for Store App) and run (no need to setup profiles or anything)

NetHunter Terminal | Kali NetHunter App Store - Android App Repository for Penetraton Testing and Forensics

Kali Linux command line shell

store.nethunter.com

See the screenshots. Android is 'normal' terminal' you need to use su if you wish.

AndroidSu already starts with su

Grant the root
[Magisk] Mister Floppy:
I tested it both ways:

After having granted root, with

1. Option "Android" selected and running the "Su" command

-> error message "recv_fd: msg_flags =m 0, msg_controllen(0) != 24" is popping up

2. Option "AndroidSu" selected

> a message is popping up just for a fraction of a second, but it's impossible to read it because the app immediately is crashing, showing a toast message "Window 1 No title"
[Magisk] zgfg:
Hmmm, I don't know. I have never had problems. Currently on Canary 27002, previously 27001 (should be al pair to Stable 27000, etc), A13.

Using Magisk, TE, su for 8 years, on various phones and ROMs (back from A6)

You could check if it was reported to Magisk Issues on GitHub. To report, you'll need Magisk Debug version
[Magisk] pndwal:
Saw your GitHub issue on this back in February... Got closed simply because you need to follow template (ie. didn't put 'version code: 27001' in the text body)...

A week before, @wandersonkalil made a similar issue anyway: Terminal Emulator not getting root access #7794 and made PR to fix: request Fix terminal emulator not getting root access due to missing /tmpfs/.magisk/pts/ptmx #7795

... Vv closed it... Seems due to @wandersonkalil's issue with Magisk's isolate pts feature...

Then this fix seemed to get overshadowed by another (related?) saga where @wandersonkalil had earlier opened this issue: Add Multiplexing feature Support into MagiskSU #7738 Then tried to implement a PR fix: Add Multiplexing feature support into MagiskSU #7744... Vv closed citing communication difficulties...

@wandersonkalil opens another PR: Add multiplexing feature support into MagiskSU #7796... Shana was going to take over implementation after build issues:

https://github.com/topjohnwu/Magisk/pull/7796#issuecomment-1959868674

... Seems she didn't start then, so original user opens another PR: Add Multiplexing feature support into MagiskSU #7897 in March... Vv closed it 4 days later with no further comment apparently...

I don't know where that's going, why GitHub members haven't been able to cooperate on producing proper fixes or if they even realise this may affect other devices... I suggest you re-open your original issue with "version code: 27002" in the text body so bot doesn't close it, and it should get attention... Be sure to install Debug (for verbose logging) 27002 before including any logs... 👍 PW
[Magisk] pndwal:
Further, you have tried with Magisk 27002 right?... PW
[Magisk] Mister Floppy:
I did what you suggested. Now let's see if the Github guys will find a fix for it.
[Magisk] xxdarer:
Sorry for interrupting any discussion above!

Could anyone help me have a look at this test module? The module is created under the guidance of gpt4o. On installing modules written by gpt4o, Magisk always result in unzip error.

I am running Magisk 27.0 on Android 13. I think there is something fundamentally wrong that gpt4o is unaware of.
[Magisk] zgfg:
Bad guidance ;-(

You're missing META-INF stuff
[Magisk] xxdarer:
Thank you so much for this quick reply! You are absolutely correct.

I am going to have a word with gpt4o now.
[Magisk] zgfg:
Btw, follow a link from Magisk app to GitHub and read the Dev documentation there - structure, files, etc are described there
[Magisk] xxdarer:
Okay. Thank you for this advice. This is very helpful.