yashsingh1/xdaforums huggingface dataset:
[Magisk] Newtonsart:
Hello, I'm not able to execute command su to obtain superuser rights in. It's kind of getting stuck. I also tried in other shells and it doesn't work.

Here I post some screenshots:

It worked with v23 but this happens with last alpha versions
[Magisk] pndwal:
Fine for me; Last Alpha on RN8T:

Is it checked on in Superuser in Magisk App? PW
[Magisk] gabardal:
Hey, so which were your previous settings? I see you didn't hide the magisk app...
[Magisk] Newtonsart:
Yeah, it is checked
[Magisk] pndwal:
Are Apps allowed under Superuser access in Magisk App settings? PW
[Magisk] Newtonsart:
Yeah, everything has superuser rights. The problem is that it is getting stuck
[Magisk] pndwal:
Only ones needed for S/N full pass are manually added SafetyNet service in Google Play services (com.google.android.gms.unstable) to MagiskHide list (Check 'Show system apps'.), and Universal SafetyNet Fix module + Riru (needed for v2.0.0)

Nb. Some devices apparently additionally need the main service in Google Play services (com.google.android.gms) manually added to MagiskHide list.

Nb. 2. I haven't needed fix for September Google changes causing ctsProfile attestation failure; my device is so far unaffected.

I have a few other modules enabled:

No, I generally don't bother as my bank app doesn't check for Magisk App. PW
[Magisk] pndwal:
Other root apps working ok? PW
[Magisk] Shxckz:
i actually tooked the apk from github, see the post above, its feeb9 without the repo :P

can i find a telegram link for the group?
[Magisk] zgfg:
Did it pop-up asking you to grant Superuser for Termux

Maybe it doesn't if it was granted for v23. Then check in Magisk apk, Superuser: look for Termux, long tap and Revoke. It should pop-up again (like first time)
[Magisk] zgfg:
Magisk alpha

You can view and join @magiskalpha right away.

t.me
[Magisk] Newtonsart:
Yep, everything other root app works great.

Did it, still same problem.

I also tried SUI but still same issue
[Magisk] pndwal:
https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85589389

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85592555 👍 PW
[Magisk] pndwal:
Try clearing Termux app data, and if that doesn't work I'd try w/ all Magisk modules disabled... PW
[Magisk] Newtonsart:
Tried. Nothing... :(
[Magisk] pndwal:
I don't have much else really... su command working Terminal Emulator? Tried uninstall / reinstall?... PW
[Magisk] simika:
while this method worked for my Poco M3 PRO

but.. there are some differences from your "quote " to the official statement:

(see the picture)
[Magisk] zgfg:
It was not my "quote" and I didn't write any instructions.

I just pasted the URL into my post - however, Forum automatically added unfurl="true", resulting that you see it as 'quoted' (unfurled)

Now again the same url (but with extra work from my side, with editing and manually blocking unfurl in the URL tag):

https://t.me/modulesrepo/2017

If something is wrong in the guide, please complain there🤓

PS: And I did put also another URL into the same post, linking to the guide/post from USNF thread. Again, I didn't 'quote' but it was also automatically unfurled by Forum
[Magisk] Newtonsart:
I tried with different terminal emulators, none of them working. I think the problem is a bug error in magisk alpha versions because the last alpha version that worked for me was 1eb83ad8-alpha-29
[Magisk] DiamondJohn:
Have you tried a simple adb shell from a desktop computer? what does it respond with?

Also try which su;and then try an ls -l <XXX>; (where "<XXX>" is whatever was returned by the which statement) using the file it returned in the above which statement. These two will show you where it is trying to execute su from, and the ls -l[ ..../ICODE] will show the permissions.
[Magisk] grujea:
Confirmed to be working also for my Galaxy S10 running on Evolution X 5.9.1 August security patch.

Thanks a lot!
[Magisk] pndwal:
Solutions for:

- Cannot pass SafetyNet with correct settings.

- Cannot restore Play Protect certification with full SafetyNet pass.

- Cannot restore latest Play Store version despite download starting.

FWIW, I did some testing re. SafetyNet on latest Alpha fork Magisk today.

I removed SafetyNet service SafetyNet service in Google Play services (com.google.android.gms.unstable) from MagiskHide list. - I had previously manually added this to pass S/N as TJW commits in Magisk remove it / disable it's being set by MagiskHide toggle.

This, as expected, resulted in failed ctsProfile attestation in SafetyNet.

Restoring former setup proved unexpectedly difficult however.The following may help others facing several issues:

1) After restoring SafetyNet process to MagiskHide list, wiping Google Play Services and rebooting, SafetyNet was still failing and other measures failed to help. 😕

Solution was to uninstall Universal SafetyNet Fix module, wipe Play Services data then reinstall USNF module. --> Full SafetyNet pass. 🙂

2) After restoring full SafetyNet pass, Play Protect now said Device is Not certified and wiping Play Store and Play Services data wouldn't fix this strangely (it always had for me previously). 😕

Solution was to uninstall all updates to Play Services and Play Store then wipe data for both --> Play Protect Device is certified 🙂

3) After restoring Play Protect Device is certified, Play Services and Play Store would only partially update leaving Play Store at v22.xxx, and no amount of Wiping Play Store and Play Services data / rebooting would fix this. 😕

Solution was to wipe data for both Play Store and Download Manager before clicking on Play Store version number in settings to force update. Update completes after closing and reopening Play Store --> "Google Play Store is up to date", v26.9.22-21. 🙂

I hope this testing helps others facing the issues encounterd here. 😛 PW
[Magisk] pndwal:
@Newtonsart, I'm guessing this is for you... 😀 PW
[Magisk] J.Michael:
Have you ever renamed the Magisk app?

Did you uninstall the renamed app before installing the new version?
[Magisk] zgfg:
I would summarize:

(For the moment) stay with the old Magisk (up to Alpha f98c68a2, 31 or earlier, or the official 'v23') and forget the latest MagiskHide related changes (that TJW in one or another way, 'agreed' with Google🤭)

Unless and until there will be a real neccessity to update (like an mportant fix, useful new feature, support for new Android or devices)
[Magisk] pndwal:
mmm... may be a bit drastic...

But I do agree that there's no compelling reason to take updates other that to keep pace with latest TJW and other commits.

I have no problem with current Alpha and have actually been pleasantly surprised to see that SafetyNet can still be easily passed, possibly due in part to unique commits in this Alpha build. For example I mentioned this Interesting one labeled Alpha only:

https://github.com/vvb2060/Magisk/commit/0d8f54ce10c3afb00f54698a851018d4cd1efb1e

which changes MagiskHide properties incl. for sensitive props in 10 files. I'm guessing this may be restoring MagiskHide settings removed by TJW and allowing MagiskHide to work for SafetyNet pass...

Also, the issues I encountered above were of my own making involving testing after removal of SafetyNet process from MagiskHide list, and may not be at all specific to Alpha builds... Actually, I posted the solutions since I believe it's likely that non-Alpha users will also experience them.

It seems to me that the only real loss at present is the removal of official repo access (incl. it's as access to module documentation), but we may well see a resolution for this in some form sooner or later... And of course repo may well get disabled server-side in any case. PW
[Magisk] Newtonsart:
/system/bin/su seems to be a symlink to ./magisk which doesn't exist. This is so strange

Edit: magisk exists in /system/bin

The permissions are -rwxr-xr-x which doesn't makes sense because I should be able to execute the su command
[Magisk] Didgeridoohan:
Just for reference, "./" basically means "execute in the same directory". So the su symlink points to the magisk binary in the same directory...
[Magisk] simika:
no no.. i'm not making complaining lol.. i'm just saying that it was slightly different and the " original " has been working!
[Magisk] zgfg:
/system/bin/su -> ./magisk

"Same directory" should mean same as su (not the current working directory = pwd), hence:

/system/bin/su -> /system/bin/magisk

It can be also inspected by MiXplorer (as on the screenshot)
[Magisk] Newtonsart:
Yeah, i have the same permissions as you
[Magisk] cater2:
The 2 modules give problems in samsung apps (Galaxy Store, Smart Switch, Dynamic Wallpaper; Galaxy store doesn't update and I can't login, smart switch is unstable and doesn't download, Dynamic Wallpaper doesn't download them; only back working , if you uninstall the safetynet module )
[Magisk] Eng.Raman:
Magisk 9bf835e8-alpha Released.
[Magisk] pndwal:
Latest @vvb2060 Alpha Magisk Changes (*) (Chinese translated):​

Magisk (9bf835e8-alpha)​

[General] Based on 9bf835e8, the content that has been merged upstream is no longer listed

[App] Correctly process any data from magiskd

[App] Support SharedUserId

[App] Delete the backup file after restoring the boot image

[App] Built-in current version update log

[App] Use the local version when the stub cannot be downloaded, now it can be used completely offline

[busybox] Fix the default shell path

[MagiskHide] Expansion update

[App] Remove the hard-coded gms version number and * update the snet.jar version to 18.

* [App] Allow the log page to be opened when Magisk is not installed. Although there is no content, clicking the save button will save the app log

* [App] Switch to the modern time API of Java 8

https://github.com/vvb2060/Magisk/b...d41a1567497/app/src/main/res/raw/changelog.md

Download:

https://github.com/vvb2060/magisk_files/tree/be43b0a80a0657f332bbcb286b109663a63ebc9c

Notes on commits:

This branch is 14 commits ahead of topjohnwu:master.

https://github.com/vvb2060/Magisk/commits/alpha

vvb2060:

Alpha only

- Changes 10 files. MagiskHide related.

TJW:

Update AVD support …

- Support arm64 AVD images

- Support setup on Windows

Open source fully obfuscated stub

Target SDK 31

- --> Android 12

Add support for legacy ARM32 zImage

- Compatibility for zImage/32-bit systems (A-only SAR), eg Moto G7 Play, Xiaomi Redmi 7a,

- https://github.com/topjohnwu/Magisk/issues/1674

- https://github.com/topjohnwu/Magisk/issues/2827

Remove all non-Magisk hiding code …

- Magisk no longer interferes with any signals/info that were not created or caused by Magisk itself.

👍 PW
[Magisk] DiamondJohn:
ooopss... sorry, yes your right, I actually thought I explicitly and purposefully quoted his post, but it was late at night, and I was in a rush. Sorry.

You didnt actually answer my question. What does which and [icode[ls -l return from an adb shell? You answered a different question.
[Magisk] ipdev:
@DiamondJohn

Since the last time confused some with linked files.

Lets go all in and see what version of magisk su is calling. :sneaky:

---

@Newtonsart what do you get when you run.

ls -laZ $(readlink -f $(which su));

Edit:

Thank you to @BillGoss for pointing this out. :)

If you are using Termux check with.

ls -laZ $(readlink -f $(which -a su));

Cheers all. :cowboy:

PS.

magisk32 (32-bit device)

magisk64 (64-bit device)
[Magisk] Chandru123:
OnePlus 8 Pro, Attestation passed with latest alpha, I was using the xPrivacyLua method and it works. I just installed the new file over the old and then direct install.
[Magisk] BillGoss:
Don't forget that in Termux su is a shell script that then calls the actual su. So it would also be a good idea to see the output of which -a su to see what is being called.
[Magisk] zgfg:
Do you use any other root app, and does that app correctly obtain Superuser rights?

E.g., install a new app and test would it pop-up asking you for the root grant. And next time you restart the app, would it automatically obtain the root rights?

Reboot - Apps on Google Play

Reboot menu (needs root)

play.google.com

Root Checker - Apps on Google Play

Root Checker - Easy and Quick Way To Verify Root Access

play.google.com

Instead of Termux app, can you try Terminal emulator from Kali store:

https://store.nethunter.com/repo/com.offsec.nhterm_2020040100.apk

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

© 2010-2019 Kali Linux, F-Droid, and Contributors

store.nethunter.com

When you run, it offers three mods for the terminal emulator:

- Kali (don't use/not working since you have no Kali Nethunter installed)

- Android (plain/normal terminal emulator)

- AndroidSU (app automatically calls su when opening the window, you don't need to type su)
[Magisk] cater2:
I tried MagiskHide Props Config. I chose Galaxy A20. That was a guess, for one closer to my Galaxy M12. Did not pass the CTS attestation test...

Honestly I don't know how to choose, a model closer to my galaxy M12, if anyone can do this favor I would be grateful

thanks
[Magisk] DiamondJohn:
To be clear, all of what I am suggesting should be done outside of termux. I am trying to take it out of the equation. My suspicion is that it may be the cause of the error/issue.
[Magisk] Newtonsart:
Which su shows me /system/bin/su

ls -l /system/bin/su shows me /system/bin/su ./magisk

ls -l /system/bin/magisk shows me the permissions and something more. (Sorry, I don't remember the output, I'll post it as soon as I get home)

Opening AndroidSU terminal gets the same issue

As I said before I tried with different terminal emulators and Its the same issue.

Yesterday I tried su command using adb and I got, again, my terminal stuck. I had to force close the terminal of my computer because Ctrl+C wasn't doing anything.

I'm attaching an screenshot of the termux and the adb permissions. They are showing this [Shared User] thing before the name.

Older versions weren't showing me those names that way.

Thanks for all your collaboration and your help on fixing my issue :)
[Magisk] zgfg:
Just shortly - apart of su in terminal emulators I asked you for two completely different apps (like Reboot and Root checker) - to test does root granting for you work in general
[Magisk] Didgeridoohan:
Besides changing the model you'll also need the Universal SafetyNet Fix (v2.0.0 should work on Samsung). From v2.1.0 of USNF you won't be needing to spoof the model with MagiskHide Props Config, it'll do it dynamically only for Play Services.

If you're on a custom ROM you'll also have to use a certified device fingerprint.
[Magisk] camperbh:
So I just installed the latest alpha, safetynet was passing on v23 but now it won't even pass basic integrity. Any ideas why?
[Magisk] pndwal:
Ok, so the critical question is did either of the modded SafetyNet Fix modules actually give you ctsProfile pass? - I was assuming one or other worked but that the mod caused you issues.

If one worked, then there is no reason why the corresponding original module plus MHPC w/ ANY force basic option should not work. Even changing model prop to "cream cheese" will work as it's a simple mismatch w/ real model that causes fallback to basic attestation. (Nb. even when evalType says Basic, other Hardware attestation can be occurring and needs to be made to fall back to basic by a different means than the one currently responsible for evalType Basic result.)

If you have an uncertified ROM (eg China stock or a custom ROM), you may need to spoof a fingerprint in MHPC also.

Also these model prop change fixes are not working for custom ROMs that already manipulate props in custom utils like Pixel Experience...

If you had some other solution working for SafetyNet pass before September, please let us know which. If you had none, we need more details... PW
[Magisk] Newtonsart:
Yeah, root works for everything except su command.

These screenshots shows how it's asking me for root permissions and the root checker
[Magisk] pndwal:
https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85601417

And other solutions to possible issues:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-85602337 👍 PW
[Magisk] Chandru123:
Guys small correction, The company portal which I was using failed google certification in spite of the safety net success. I tried all possibilities with XPrivacyLua by using v23, previous alpha build and the current alpha build. Nothing helped to resolve and the company portal failed certification. So went with the @Displax universal safety net mod fix and now everything works with latest alpha build.

So I would try the mod zips given by @Displax first before going to the XPrivacyLua Method!

Thanks to @Displax once again.
[Magisk] camperbh:
Ok I'm just extremely stupid. I had com.google.android.gms.unstable hidden before updating so it didn't cross my mind to check if it was hidden after updating. Turns out it unhid itself. Now everything works perfectly, a thousand thanks.
[Magisk] DiamondJohn:
Actually, your image showing what the shell is showing up as is very strange. What ROM / version of Android are you running? Sorry if it as already in one of your posts. Too lazy to read the loooong path.

An idea occurred to me. The "hang" you are seeing sounds like what happens when it is awaiting the yes/no response from the interface with the question to grant root or not ie it sounds like the pop-up with the question is not showing/ returning. Have you tried setting it to automatically allow root? and thus bypassing a possibly failing pop-up.

I havent specifically used any root checking app. But from my understanding as a dev of root apps, these are simply a wrapper to starting a shell requesting root, or attempting a root command in a spawned shell. ie its again another layer to confuse the issue on top of simply getting root in a shell, not a magical new path. The only question is which command or how it would be starting a rooted shell.
[Magisk] zgfg:
Yeah but as you see, root granting works for him for everything except when using su in the terminal emulator

I also asked him to try another terminal emulator - if something is wrong with Termux paths or whatever, but he said (earlier answer) that he tried the alternative terminal but no avail
[Magisk] DiamondJohn:
Take any and all additional apps out of the equation. I remember a few years back people were having granting root issues with a root app I distribute here on XDA. After a lot of back and forth and accusations I as doing something wrong, it came into clarity they were running the beta version. And not surprising, in the next release the issue disappeared.

I am still very dubious of what it is showing up as within the UI for plain-shell. Mine is com.android.shell
[Magisk] pndwal:
Well, I't didn't just un-hide itself! 😜 And it was quite expected with new commits from John Wu being merged in Alpha once again...

You should probably read back a bit here since you are using Alpha fork.

This now includes Johns latest commits, and he has stated that he cannot be involved in the root-hiding business as a 'Googler', but also said that 3rd party hiding mods would be 'trivial' to produce.

Since then he has reversed such hiding measures including the adding of that SafetyNet process to MagiskHide list w/ MagiskHide toggle-on, and sensitive-props changes etc in his main Magisk branch.

MagiskHide is still available for use in userspace, and Restoring SafetyNet process to MagiskHide list still works, but this may in part be due to @vvb2060's additional Alpha commits such as 'Alpha only' one I mentioned here:

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

Others are also rising to the occasion of John's future builds with stripped back MagiskHide functionality, eg @kdragons latest early release USNF module already restores 'MagiskHide features' John is removing as well as fixing the latest ctsProfile failures due to Google changes. (Nb. this fix is better than many others due to props changes targeting only Google Play Services instead of being applied globally.)

🤠 PW
[Magisk] Newtonsart:
I'm using Android 11 one ui 3.1 with latest Android security patch (latest update for my phone, a samsung galaxy note 10 lite)

Just tried to grant root permissions as the automatic response it didnt work so I removed the superuser permissions from termux. I tried it again but still not working.

What do you mean with plain shell??

Adb shell for me is android.uid.shell as you can see in the screenshot of the post below
[Magisk] zgfg:
But again, root works for him for the 'normal' apps, hence not an issue due to the beta version or something

I have no idea what blocks him the su in terminal - btw, if I Deny root for my terminal then when I type su then I immediately get a toast that root was denied, and my su/terminal does not get stuck
[Magisk] Newtonsart:
The thing is that su isn't being denied it just seems to work. I'm attaching a video that shows the full process.
[Magisk] zgfg:
You probably meant: seems to be waiting (or so)

No better ideas but check that you are not using termux app from multiuser mode, check also in Magisk app settings the timeout request and so

You could even try putting automatic response to grant (although I doubt it is Magisk waiting for you and not responding, but try anyway)
[Magisk] Newtonsart:
How can I see if I'm using termux from multiuser mode??

And the automatic response is set to grant as Diamond John told me
[Magisk] Didgeridoohan:
I'll bet towards it being the [SharedUser] thing that's the culprit here...
[Magisk] Newtonsart:
Yep, I think that's the problem too, but idk why is that or how to solve it
[Magisk] Didgeridoohan:
As @zgfg said, it's multiuser. I've never played with that, so can't really help. Maybe uninstalling the app for all users and then ony install it on your user... A websearch is bound to give some hints though.
[Magisk] zgfg:
Don't know if whoami or id commands can give an insight (for me it's u0_a339)

You could also try playing with Multiuser options in Magisk app - screenshot
[Magisk] Newtonsart:
The problem is the su command or android shell, not termux in my opinion.

I tried it with all the options of multiuser mode, but none of them worked

This are the outputs of whami and I'd commands
[Magisk] zgfg:
Similar for me (where, ofc, su works for me) - only that my context even shows untrusted app

Did you check if Magisk and logcat/dmesg logs show anything interesting
[Magisk] DiamondJohn:
SUGGESTED to try.;) I am running the stable version of magisk. If you are running beta, you are running a knon buggy release.

I am currently running a Pixel, which would be pretty close to stcock android. All my previous phones (mostly LOS) also had the shell as com.android.shell The fact that the dev went to rename the app, makes me think they feel its well beyond AOSP.

I also think its a beta version issue. I was simpy putting up ideas to hopefully help... but failed... There is something that this UID shell does that is different enough to noty ork with the Beta nmagisk. As I said above, one of my apps did not ork with a previous beta, but that was fixed by later releases.. MAybe a logcat? may gove a clue, but I dont think it will give an answeras to how to work around it. I think newer releases will be the only choice. Another big waste of time, would be to find a whole replacement shell, not a skin/overlay, such as I *think* Termux is.

Another think Yu may wish to try is my TeMeFI app. That is ALLLLLL about shell commands. See if that triggers a root request? I really dont think it will if ADB doesnt, but if it does. To uninstall cleanly, there is a self destruct in the config menu.
[Magisk] DiamondJohn:
havnt tried thios with magis, but maybe give it the full path to magisk followed by su.

C:\Java\x86\Android\android-sdk\platform-tools>adb shell
shell@sunfish:/ $ which magisk
/system/bin/magisk
shell@sunfish:/ $ /system/bin/magisk su
root@sunfish:/ #
[Magisk] Newtonsart:
-rwxr-xr-x 1 root root u:object_r:magisk_exec:s0 211208 2021-09-09 10:33 /system/bin/magisk

That's the output, and my device is 64 bits
[Magisk] Newtonsart:
Worked, It executed a sudo command correctly

Nope, not working