yashsingh1/xdaforums huggingface dataset:
[Magisk] zgfg:
It crashes for me right on opening (when it updates Online modules tab) if there is a single module to update

100% reproducible for me, on both my phones

Tested several times:

- Uninstall and install an older version for some module

(or manipulate with versionCode in module.prop files in /data/adb/modules...

- It could be a module from Alt Repo or eg Shamiko (not on Repo but upgradable by updateJson)

- Then open Fox MMM v2.1.0 and wait to update Online tab: it will crash

- Update all modules in Magisk app, then Fox v2.1.0 opens correctly (no crash)

Btw, installing a module now works but I can test only as Install from local storage or as installing a new module from Repo

Upgrading a module cannot be tested since in that case Fox app crashes even before it displays that there is an Upgradable module

Again, I doubt what kind of regression testing they do (if at all)

[BUG] V2 1.0 crashes EVERY time when opening if there is an Upgradable module · Issue #19 · Androidacy/MagiskModuleManager

Just observed on both my phones (Xiaomi A11 and A12) 100% reproducible If there is a single upgradable module, v2.1.0 crashes when opening I have submitted several crash reports by mail If I upgrad...

github.com
[Magisk] pndwal:
Yes, I understood that location was the issue...

@J.Michael was wondering about why I hadn't got # prompt after su call... I hadn't realised earlier and assumed had su... I was explaining how UID conflict in Magisk prevented SU (with no messages either), but how the different results between attempts marked 1) & 3) above seem strange...

So that's what I've done successfully per my next post above... Did need to resolve the SU issue however as chmod wouldn't work without # prompt...

@badabing2003's method seems to work fine... Might try yours sometime too. 👍

👍 PW
[Magisk] pndwal:
I don't often fire up PC these.days... Suits me to do stuff I can on device. 👍 PW
[Magisk] pndwal:
... seems to confirm what I understood too... (so hidden app itself can use tools from stub data to patch, but only with root since hidden app will fail even to open without it I guess.)

👍

Getting on it...

🙂 PW
[Magisk] pndwal:
Here you go:

:/ $ su
:/ # chmod 755 /data/local/tmp/test2.sh
127|:/ # data/local/tmp/test2.sh
data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
- System-as-root, keep dm/avb-verity
- Encrypted data, keep forceencrypt
-------------------------
SYSTEM_ROOT: true
KEEPVERITY: true
KEEPFORCEENCRYPT: true
RECOVERYMODE: false
PATCHVBMETAFLAG: false
ISENCRYPTED: true
VBMETAEXIST: true
:/ #

👍 PW
[Magisk] Nekromantik:
Hello

I'm using pixel 7 Pro on stock May firmware.

On Magisk 26.1 and installed USNF 2.4.0 MOD 1.2 and denylist unmount.

I'm in UK and use starling bank app which used to work fine until last update and now it detects root all of a sudden. Anyone in UK also got this issue? Any fixes?
[Magisk] trunkenstein:
Hi,

maybe someone here can help me, I'm using LineageOS 20 by englezos on a Xiaomi Mi 9T Pro.

After updating to the newest version I'm unable to install magisk (or at least, the app doesn't see it).

Previously I would flash the magisk.zip via adb sideload, reboot one or two times and the magisk manager was able to see magisk (as well as "Ramdisk: yes").

Today, after installing the OTA update, I've tried everything, from patching the boot.img (which contains a ramdisk, but only after patching) to different magisk versions, sideloading etc. to no avail.

I'm using the original recovery provided with the rom (so, LineageOS recovery).

Also, everything (Sideloading, flashing patched boot.img) works without any erros but without magisk being installed!

Anyone got an idea to solve this problem or provide more information?

/EDIT: For the next person searching information: Found the problem, an old version of the magisk manager was still installed, but with a different name. After deleting this "hidden" manager app everything works.
[Magisk] J.Michael:
@pndwal Are you sure a hidden Magisk manager app cannot run without root?
[Magisk] Homeboy76:
Did you try this:

Pass Safety Net with SafetyNet Fix

Download File(s)..

<<Edit - removed link>> to Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix

<<Edit - removed link>> to Fox2Code/Fox Magisk Module Manager...

<<Edit - removed Installation Instructions>> for Displax's safetyNet Fix

Settings for Magisk

Open Magisk App

Tap the Setup icon.

Scroll down to App and set the

Update Channel

to Canary.

Scroll down to Check Updates and

enable

it.

Scroll down to Magisk and enable

Zygisk

.

Enable Denylist

Tap

Configure DenyList

=> Tap 3 Dot Menu => Check ✓

Show system apps

=> Check ✓ Google Play Store, Google Pay, Google Wallet etc.

(Optional) Scroll down to Superuser and enable

Enable Biometric Authentication

.

Get Device Certified Clear Google Play Store, Google Play Services, Google Pay, Google Wallet, etc. data

Turn Airplane mode on

Open Settings

Tap Apps & notifications

Tap see all...

Tap three dot menu

Tap Show system

Scroll down to Google Play Store

Tap Storage & Cache

Tap Clear storage

Note:

Repeat the 3 steps above

for Google Play Services, Google Pay, Google Wallet, etc.

reboot

Turn Airplane mode off

Check Device Certification, It may take 24 hours for Device Certification
[Magisk] badabing2003:
Thanks for the test, though I don't understand why you got those errors, what version of Magisk you have?

Seeing that @ctcx had this in his script

$RECOVERYMODE && echo "Ramdisk value = no" || echo "Ramdisk value = yes"

RAMDISK value is always the inverse of RECOVERYMODE, which I have never had True

Perhaps a more representative test would be seeing both values

RECOVERYMODE true and false depending on the mode,

I just don't understand why RAMDISK is the inverse of RECOVERYMODE

I can confirm that this is the case, I posted this image in a previous post.
[Magisk] Nekromantik:
Thats the module i already use UNSF 2.4.0 MOD 1.2 which is from disaplex
[Magisk] Homeboy76:
I know that's the module you are using. Have you tried numbers 3, 4, and 5 to pass Safety Net?
[Magisk] Nekromantik:
yup i pass safty net and device is certified but only this one app that started detected root
[Magisk] Homeboy76:
Ok.
[Magisk] ctcx:
Because RECOVERYMODE flag is, by design, intended to indicate whether recovery.img patching is needed or not?

RECOVERYMODE=no ==> There IS ramdisk inside boot partition ==> patch boot.img

RECOVERYMODE=yes ==> There IS NOT ramdisk inside boot partition ==> patch recovery.img

I actually did confirm all of this back when I was doing my tests by comparing script results and app UI results, by comparing both patched images.

...I thought this detail was already a given...
[Magisk] 3ast:
Yo I need hell
[Magisk] Nergal di Cuthah:
Huh? Obviously you mean help not hell but maybe start with what's wrong. And what device you're using
[Magisk] pndwal:
Well, designed to indicate if an factory ramdisk in /boot is supplied, Ie. whether recovery.img patching is LIKELY TO BE needed or not...

👍

Sorry, but there MAY be ramdisk inside boot partition!:

RECOVERYMODE=yes ==> There IS NO OEM supplied ramdisk inside boot partition

==> patch recovery.img

Or

==> try patching/booting boot.img*

* If boot is patched there WILL now be a 'manually added' ramdisk containing magiskinit inside boot partition. Magisk adds this for those cases where ramdisk in /boot is still supported by bootloader... Magisk will still indicate No [OEM supplied] ramdisk [in /boot].

... This is the 'given' that is often overlooked... 🙃 PW
[Magisk] pndwal:
Alpha fork... Testing native bridge Zygisk loading.

So you mean why RAMDISK=No while RECOVERYMODE=false?

Well because I have Magisk in /boot...

You may not be fully understanding that we DO (ALWAYS) have ramdisk in /boot whenever it is patched by Magisk despite RAMDISK=No; patching with Magisk creates an effective ramdisk space whenever one is missing:

This ability was added in Feb 2019 here:

https://github.com/topjohnwu/Magisk/commit/e72c6685edf81706617a3444575c4500b9b8fe6c

This ramdisk is expected to fail to initiate on most devices as they have no need for bootloader compatibility, but Xiaomi and other devices can use it for boot mode Magisk since bootloader compatibility (inexplicably) exists...

Please see post above also.

🙂 PW
[Magisk] pndwal:
Not sure but it makes sense... @badabing2003 pointed this out; I didn't test... PW
[Magisk] ctcx:
@pndwal , @badabing2003 :

Yes, sorry, my bad, I had forgotten about the -already discussed- special cases "some few devices which can be patched in boot partition, even when they theoretically should not".

Trying to fix myself:

Magisk DOES find ramdisk inside boot partition ==> RECOVERYMODE=no ==> patch boot.img

Magisk DOES NOT find ramdisk inside boot partition ==> RECOVERYMODE=yes (default) ==> Trial and error: patch boot.img or recovery.img, see which one works.

The second case is where I had tried suggesting to display a kind-of "warning" in the PF script, specifying to try both, or something...

pndwal:

If you happen to have at hand the zip for the ROM you currently use, how is it actually? Does it have boot.img, recovery.img, actually both, or none of them?

Thanks again.
[Magisk] m0han:
Seems you have submitted several crash reports by mail and others have faced the same issue too. Androidacy has responded, which I suppose you're aware of.
[Magisk] zgfg:
Of course, I'm aware of. I'm just surprised that you were not aware of (did you simply try the app) when you yesterday posted about the v2.1.0 release and its claimed 'fixes' and 'improvements' , that it again had a new and a serious flaw

Every new v2.x version

they released is useless. App can not be used for its main purpose: installing and/or updating modules

They don't do any testing. Issues are reported, they fix in Action builds (actually, first they claim that it's not reproducible and that it affects only 0,1% of users or so, then some users point them to the exact race condition or so from the logs and then they fix) and then again they release next version with the same or a similar showstopper bug

Hence I don't care about that app anymore. I have uninstalled from both my devices and I don't intend to test their fix in the new Action build and specially not to install v2.1.1 when it comes

I have v1.1 apk saved and if I need, I will install that last good version
[Magisk] J.Michael:
@pndwal If you put "set -v" as the first line of "test2.sh" (2nd line if 1st is "#!/bin/sh"), we could see where those error messages are coming from.
[Magisk] m0han:
I'm happy with v0.6.7. Releases after this are many times bigger in apk size. Any idea why?
[Magisk] pndwal:
Actually every A-only legacy SAR Xiaomi device can use boot mode Magisk AFAIK, and a number of other devices despite John's statement that he's only aware of this in Xiaomi...

To be clear, as has been established, Magisk doesn't actually find (or look for) ramdisk in boot!... It simply identifies A-only legacy SAR devices for Ramdisk=No (RECOVERYMODE defaults to yes) since it is known that factory OS has no need for ramdisk in /boot in these devices as kernel directly mounts the system partition as rootdir and recovery ramdisk is in /recovery... (In A/B legacy SAR, Magisk is actually 'hijacking' a recovery ramdisk which now resides in /boot partitions.)

This means that a ramdisk in /boot is NOT ruled out; there may well actually be a ramdisk there, but it will be a 'manually' added one, NOT an OEM supplied one...

Also (and critically), bootloader support for ramdisk in /boot is NOT ruled out either...

All A-only legacy SAR devices have both boot.img and recovery.img...

This is the problem for Magisk with these devices; having /recovery partition leaves no ramdisk in /boot as it's still in /recovery (see above re. A/B use of recovery ramdisk in /boot)... Magisk must always add one to use boot mode Magisk, and this still requires bootloader support which, logically, is expected to be lacking.

Welcome. 🙂 PW
[Magisk] Fishawy:
Same, v1.1 with a modified signature to avoid updates.

I understand from Telegram that the developer gave up on the project due to his illness, and they took over. Releases have been catastrophic since.
[Magisk] pndwal:
Here you go:

Spoiler content hidden.

🙂 PW
[Magisk] J.Michael:
@pndwal

Is "typeset" mentioned in your "grep_prop"?

I don't get those errors, but my Magisk is 4y old.
[Magisk] pndwal:
Please help me with grep_prop usage...

It doesn't appear here however:

Spoiler content hidden.

Wow... Magisk 19.1?! 🤪 PW
[Magisk] J.Michael:
I meant the function "grep_prop()" in util_functions. It's called from "getvars" with "/cache/.magisk" as the last argument, and I think that's the point at which you get those error messages that seem to come from "typeset".

Magisk 20.3. Maybe only 3yo.
[Magisk] Nekromantik:
anyone else can help with starling bank app?
[Magisk] Nergal di Cuthah:
https://xdaforums.com/t/solved-banking-app-detecting-magisk.4576421/#post-88425549

The last few posts in this thread should help
[Magisk] Nekromantik:
thanks just seen but no workaround works atm

cant install older apk on p7 pro
[Magisk] pndwal:
Please treat me like an idiot and give a syntax example to type in TE... 😬 PW
[Magisk] J.Michael:
What's "TE"?

I don't know what it is I should give you an example of.

I think I'm wasting your time. I was hung up on the error messages "typeset: cache/.magisk is not an identifier". And I forgot that I had a copy of your "util_functions.sh" in one of your posts.

Now I think there is a flaw in util_functions, and everybody (I'm looking at you, @badabing2003 and @ctcx) has been ignoring these error messages. Except, when I run it on my tablet, there are no error messages. So, I don't know anything, and I'm going to drop it until a shell scripting expert expresses an interest.

Thank you for your patience.
[Magisk] m0han:
Terminal Emulator?
[Magisk] pndwal:
Yup, I meant Terminal Emulator...

All good... I'm learning a lot too... Will be interesting to see if util_functions needs a fix... 👍 PW
[Magisk] PiXinCreate:
I now feel like, for the devices the support bootloader unlocking, should be allowed to lock bootloader while having root by patching AVB that increases the security be default.

I think I've posted in thread before regarding banking apps not working on GrapheneOS having bootloader unlocked and rooted. I want root on GrapheneOS and the banking apps are detecting that the device is rooted.
[Magisk] ctcx:
I did try reviewing util_functions.sh script -at Github- once again the very first time the errors were mentioned, but found nothing weird (though again, I'm no expert...).

And adding to it, neither I get those errors; but I don't use a terminal emulator app (don't like to for all these things in general), but adb shell. For now, at most what I can think of is, maybe the terminal emulator apps themselves are different among themselves and could be related to these errors?

Also, just in case, I have been testing with Magisk 26.1, version 26100 from Github apk.

By the way, I noticed @badabing2003 has been strangely absent during last days... Hope he didn't get covid...

Thanks again.
[Magisk] badabing2003:
Sorry folks.

I've been absent indeed, I see the messages go by, but I haven't caught up to them to analyze and respond, I've been very busy, hopefully over the weekend I'll have some free time and catch up.

@pndwal thanks for the test, I should have at least got back with that even if I have not analyzed the results.
[Magisk] pndwal:
FWIW, I just tried running script from Termux (supplies Linux environment in addition to Terminal Emulator) and got same results...

Next, fired up PC and tried from ADB shell... Same again:

PS C:\adb> adb shell
willow:/ $ su
su
willow:/ # /data/local/tmp/test2.sh
/data/local/tmp/test2.sh
/data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
/data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
/data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
/data/local/tmp/test2.sh[6]: typeset: /cache/.magisk: is not an identifier
- System-as-root, keep dm/avb-verity
- Encrypted data, keep forceencrypt
-------------------------
SYSTEM_ROOT: true
KEEPVERITY: true
KEEPFORCEENCRYPT: true
RECOVERYMODE: false
PATCHVBMETAFLAG: false
ISENCRYPTED: true
VBMETAEXIST: true
willow:/ #

... Nb. Please recall that I am currently using Alpha Magisk from @vvb2060... PW
[Magisk] ctcx:
Then virtually only things that come to mind for now are either Magisk version, or the shell your current ROM uses?

Just for a note, LOS uses Bash as shell.
[Magisk] ctcx:
In a very apart general point, I really should have noticed since long ago, but this thread is named "general support / discussion" as originally intended by TJW; yet it seems we have been using it mostly for "development", probably hindering users who come seeking real support?

Is it ok to keep posting here, or should "support" and "development" stuff be split in totally different threads?

Thanks.
[Magisk] pndwal:
Stock A11 MIUI... PW
[Magisk] pndwal:
It's technically only for public Stable and Beta too, but original Canary thread has long been locked... It's pretty much any general Magisk matters now it seems... 🙂 PW
[Magisk] kullurumanoj:
Hello All, I just wanted to check if anyone with root access is able to see the NFC option in the Cred app. I'm using magisk, shamiko, hml and zygisk lsposed setup. All other banking apps are working fine except for the nfc feature in the cred app. I have read from their blog that NFC isn't available for rooted device users. I have added cred app to hml, lsposed which is hidden. I have eben tried reinstallation but no luck there too.

Any help with this is really appreciated. Thanks in advance.

CRED: UPI, Credit Cards, Bills - Apps on Google Play

exclusive payment experiences: UPI, bills, cards, secure money transfers

play.google.com
[Magisk] J.Michael:
which sh
ls -l $(which sh)
set | grep -i sh
sh --version

My system has a /system/bin/sh which does not accept a "--version" option, yet I have an environment variable

KSH_VERSION=@(#)MIRBSD KSH R56 2018/01/14 Android

and I thought I read that "ksh" accepted a "--version" option.

So, I don't know what shell I am using, but it would make sense that @pndwal is the only one getting these "typeset" errors if he is also the only one using the shell he is using.
[Magisk] paper88:
Hello together

I own a Nothing Phone 1. A while ago i updated from 1.5.1 to 1.5.2. I restored the images downloaded the ota and reinstalled to new slot. After pressing restart, the phone restarted 3 times like a bootloop and after it started again the phone was still on 1.5.1. After I installed the update again and rebooted the phone over the OTA Screen and not magisk. Since then root in the background is somehow installed, because I see the IOS Emojis. But in the Magisk App I just have the patch file and no direct install option.

Few minutes ago I updated to 1.5.4. Everythingi booted the patched img. Still cannot install magisk, I also tried to flash the img but still no option in magisk. The same was on slot a currently, now im on slot b.

Does anyone have an Idea?
[Magisk] Nergal di Cuthah:
Did you previously hide magisk app as another name and forget to unhide before upgrade.
[Magisk] ctcx:
@J.Michael , @pndwal :

For some ridiculous luck/coincidence, cousin was around and he accepted lending me a bit his Redmi 9A with MIUI 12 based on Android 10, on condition that I don't install/uninstall anything. No problem, we only push stuff to /data/local/tmp directory anyways, then clear everything.

...still unable to reproduce pndwal's errors (using util_functions.sh from Magisk 26.1 26100 apk).

Now seriously what on hell is going on there then...

EDIT: re-checked Github... at least there, nothing has changed in util_functions.sh since latest 26.1 apk release.
[Magisk] paper88:
I hide it and named it MM and yes I didn't unhide it.. was this wrong?
[Magisk] Nergal di Cuthah:
Yup, uninstall second magisk app then open hidden and it should be fixed
[Magisk] paper88:
I havent installed the hidden app anymore. After I couldn't install magisk I deinstalled the app and downloaded the manager again, since then its unhidden
[Magisk] J.Michael:
Do you still have an app named MM?

Uninstall the Magisk app you can see, then open thd MM app.

I don't know how you "updated" without uninstalling Magisk. (Read a few hundred posts. There is the Magisk installed in one of your bootable partitions, and there is the Magisk manager app, installed like any other Android app. They are two different parts of the Magisk system. If you still have "root", you have not uninstalled Magisk. If you still have an app named Magisk in your app drawer, you have not uninstalled the visible Magisk manager app. I am suggesting that you uninstall the visible Magisk manager app -- using Android, somehow get to App info, hit the Uninstall button -- and then try running the app named MM.)
[Magisk] paper88:
I checked the all apps from settings and I found an MM App, but it says "not installed for this user" and if I click on it everything is greyed out. Could I maybe try to remove this somehow complete and use the visible manager app?

I restored the images before updating and wanted to use the install After OTA option, but while restarting it didn't update. After I flashed the stock boot img over fastboot and updated the phone over normal OTA progress. After restart i patched the new img and flashed it, but since then I couldnt use the Manager. I thought because I used the "install after OTA" option magisk somehow was installed on the second slot so the module was working. Here was also some logs on another post: https://xdaforums.com/t/nothing-phone-1-rom-ota-nothing-os-repo-of-nothing-os.4464039/post-88410265
[Magisk] HippoMan:
There are many variations of the basic Bourne-like shell (regular sh, ksh, bash, etc.), and even with variations of the same name, sometimes there are differences between implementations for different OS's and different release versions.

The "typeset" command is one of the commands that varies between different versions of the shell. Some shell implementations have "typeset". Some don't have "typeset". And some who have typeset implement it somewhat differently from one another.

For a general, portable shell script, "typeset" is one of the commands which should be totally left out.

Only if you know with 100-percent certainty what OS/implementation/shell-verstion the script will be run against could "typeset" be relied upon to offer consistent behavior.

And even on a single Android device this is not the case. We're likely to find more than one of the following shell versions on any given device: the "normal" /system/bin/sh, the busybox version, the "bash" version, the version that comes with termux, and no doubt other versions that might come with other apps and terminal emulators.

Therefore, I recommend that the script be rewritten to not use typeset.

PS: This is why I always (!!!) cause shell scripts to be run in the following manner on my own Android device:

/system/bin/sh /path/to/script.sh

And if the given script was originally written to run under a different sh-like shell and for some reason doesn't run under /system/bin/sh, I then rewrite the script.

So perhaps the script that you (@pndwal) are running needs to be rewritten.