yashsingh1/xdaforums huggingface dataset:
[Magisk] xabier-bo:
Hi

I have a question, I guess for the more experts here

I would like to delete the unnecessary magisk_backup files and keep the latest.

I need to extract the latest stock boot image (recovery images have not been published yet).

My problem is that the magisk_backup_xxxxxxxxxxxxxxxxxxxxxxxx folders and files (at least in my device) don't have a date.

Is there anyway to figure it out? That is if the name sequence has a logic that could be helpful.

This are the folders I have:

magisk_backup_3ee..., _4dc..., _11c..., _030..., _bdd..., _ed1...

I've been searching but I haven't an answer.

Thanks
[Magisk] 73sydney:
a good root capable file manager (like Mixplorer) would show you dates for files and folders

alternately install a terminal app

su
cd <to folder>
ls -lt

which would give you the folders/files listed by date

my personal fave terminal app is this one (download via clicking Download APK NOT Download Store App) as it has an Android SU button to save you typing su, and it has a built in properly usable terminal friendly keyboard

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
[Magisk] zgfg:
Using MiXPlorer, taking Properties and reading everything I want/need - see the screenshot

Hence I clearly see which one is the latest and I safely delete the rest
[Magisk] badabing2003:
Date should do it, but if you want to be super picky about it those xxxx-es are SHA-1 hash of the source boot.img file (or whatever file you patched), hence you can tell which factory image they came from / belong to.
[Magisk] xabier-bo:
Ok, I'm not a developer, but I guess that if Magisk Config 25.2's SHA1 is 11c2649ebbd089b73462b8d1d4b4cfe1d5bbbf16, the latest backup should be the magisk_backup_11c... one
[Magisk] xabier-bo:
Yes, I had not MiX explorer installed in this device and with mine it showed no date (?)

Thanks!
[Magisk] xabier-bo:
I serendipitied it :ROFLMAO:, but many thanks!

Now it's clearer in case anybody faced a similar issue
[Magisk] revengineer:
I have tried all of these instructions and none of them worked; the Bonvoy app still detects root after following each set of instructions. I have hidden the Magisk app, installed the Safetynet modded fix by displax, and installed the shamiko module. I have cleared the app's data and cache, also cleared google play services data, rebooted in between at least 20 time, all to no avail. If there are any other tips to follow, please let me know.

EDIT: It looks like the multi-quote did not work. There were two other posts near the quoted one and I followed those instructions as well.
[Magisk] J.Michael:
You did not say that you put Bonvoy in Magisk's deny list and made sure that Magisk was *not* enforcing deny list.

Some people report that "freezing" or disabling or uninstalling the Magisk manager app eliminates some detections. (You cannot reboot between uninstalling Magisk manager and testing detection -- recent versions of Magisk inject a manager if none is present.)
[Magisk] revengineer:
Thank you for your response. I confirm that Bonvoy is on the deny list with all sub options enabled and that denylist enforcement is disabled (because this is how shamiko works). I have now tried your suggestion to freeze the hidden magisk app and this did not work either; root is still being detected. I may try completely uninstalling magisk but this would be a huge hassle.
[Magisk] J.Michael:
Not "uninstall Magisk", "uninstall Magisk manager app". There are some reports that the presence of a Magisk manager app is detected.
[Magisk] revengineer:
Got it thank you for the clarification.
[Magisk] pndwal:
Marriott Bonvoy app?... Seems to good for me and did nothing special:

Have you checked deviceIntegrity using Play Integrity API Checker app?... PW
[Magisk] revengineer:
I am stumped! I ran YASNAC, and it passes basic integrity and CTS profile match.
[Magisk] pndwal:
Not YASNAC... That's for SafetyNet which is depreciated since June and apps are migrating to new Play Integrity API...

Check deviceIntegrity using Play Integrity API Checker app as I said... deviceIntegrity should pass w/ @Displax USNF fork however... It adds support for Play Integrity...

Nb. Don't worry about strongIntegrity... You can't have it... Unless you wire me a lot of moolah... 😝 PW
[Magisk] zgfg:
@revengineer

Are we talking about:

Marriott Bonvoy: Book Hotels - Apps on Google Play

Travel and Book 8,000+ Hotels Worldwide with the Marriott Bonvoy™ app.

play.google.com

Just checked, for me also detecting root (Magisk Canary, in DenyList, Shamiko, USNF-mod, even hiding Magisk app from Bonvoy by use of HMA)
[Magisk] revengineer:
If you are referring to the tool by Nikolas Spiridakis, I installed this app and it checks green for device integrity and basic integrity. As you predicted, strong integrity fails.
[Magisk] revengineer:
Yes that's the correct Bonvoy app, and it looks like we are have the same setup for this app.
[Magisk] pndwal:
Yup... So all good there... Could be some per device detection esp. since @zgfg apparently can't bypass detection either... Please say device and ROM (incl. Android version) and Momo results...

My setup:

Xiaomi Redmi Note 8T, stock MIUI, A10.

Latest Canary Magisk, Hidden Magisk app, Shamiko v0.5.2 (120), @Displax USNF

App in denylist, nothing set in HMA...

🙃 PW
[Magisk] revengineer:
Device is a OnePlus N10 5G with stock Android 11 ROM at current patch level, i.e., OxygenOS 11.0.8.BE86AA. What is Momo please?
[Magisk] zgfg:
I tested on my second phone:

- A11 (first one was A12)

- Magisk Delta with MagiskHide (instead of official Canary with DenyList)

- also Zygisk, Shamiko, USNF-mod

Here, I also have LSPosed and HMA but didn't bother to configure for Bonvoy (NB: I never do Hide Magisk App, @pndwal probably does but for sure he does not run Magisk Delta)

And Bonvoy opens here - see the screenshot

Btw, both my phones are Xiaomi, with Xiaomi.eu (but this second one is on End-Of-Line, hence it remained on the year old ROM and security patch, only Google Play Services are updated - @pndwal has probably a similar phone and ROM, maybe even older)
[Magisk] pndwal:
This (just use for some comparison... Don't worry too much about all detections...):

App from TG... Link here:

https://github.com/canyie/Riru-MomoHider#test

Edit: Nb. This is not the latest version... Use the TG link given and search for "Momo" to locate latest... Currently, scroll down to Aug 12 for v 4.4.1

👍 PW
[Magisk] pndwal:
Yup...

But to qualify this remark for others, Hide the Magisk app function is not needed for forks like Delta anyway since app certificate (signing) etc differ and most banks only detect TJW Magisk... It may be quite important on official Magisk builds...

Yup: I put details in post above... PW
[Magisk] zgfg:
I wouldn't bother with Momo - my Momo screenshot from the phone opening Bonvoy is attached (more detections than yours)

On the other phone where Bonvoy detects root, Momo looks even 'better' - does not complain about Partitions mounted abnormally

Btw, both my phones pass Ruru, Oprek, TB Checker, S-Check
[Magisk] zgfg:
Yeah, true - Delta has different package name (although banking apps could also start looking for its pkg name)

But I need HMA for other purooses: to detach YouTube (because of ReVanced) and AndroidAuto (because of ScreenAuto)...
[Magisk] revengineer:
Here are my momo results:
[Magisk] zgfg:
For su you need to checkmark Momo in DenyList

Btw, broken TEE is interesting - related to that, not to Bonvoy, can you pass Play Integrity with Strong Integrity?

And does Key Attestation (can be also found on GitHub) report Bootloader locked or unlocked?
[Magisk] revengineer:
The Relevant screenshots are attached.
[Magisk] revengineer:
And as stated above, play integrity does NOT pass with strong integrity.
[Magisk] zgfg:
Something is really bad with your TEE
[Magisk] revengineer:
I do not know what would cause this.
[Magisk] pndwal:
Don't worry... It's OnePlus... Most have broken keymaster, and this may contribute to why banks aren't using strongIntegrity across the board... Newer OP devices may be fixed but OP was in no hurry!... It's not the issue...

... I must work now... Will check back later... PW
[Magisk] revengineer:
Thank you so much for the assistance today. Need to break too now. If you have more idea, I will monitor this thread.
[Magisk] pndwal:
... Up to date with Shamiko? PW
[Magisk] pndwal:
... Bit of testing over lunch... It's not detecting Debugging mode...

Question: Did Momo Zygisk detection disappear for you simply by adding Momo to denylist?

... Quick google search shows Bonvoy is definitely detecting some apps... One user solved detection by removing Official TWRP app (me.twrp.twrpapp)... Do you have this?...

If so you can either uninstall it or try hiding it from Bonvoy using LSPosed Hide My Applist module... I recommend v3.0.4 beta; I put something about this and 'dirty tricks' used for detection in a recent response here:

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

I'd say if you have TWRP actually installed (I don't), app will very likely be looking for TWRP folder(s) also... Many find the can simply rename that...

Also, if you have other well known root associated apps (Titanium backup, other) that are often detected you should be able to use HMA to hide these from Bonvoy also...

...Hope it helps... Back to work now... Adios, PW
[Magisk] pndwal:
...

Aside from above response, I was just looking for link to latest Momo (because link I gave above doesn't seem to be latest source/version now), and I came across more on the above in a response to your similar questions several months ago... In case you didn't sight that it may help:

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

😜 PW
[Magisk] pndwal:
Momo detector app

OK, @revengineer and anyone interested; I found source for latest Momo detector app and edited original post with instructions:

👍 PW
[Magisk] 73sydney:
Personally i find your sudden promoting of Momo rather sickening

Get back up in your bell tower, and you stay there until you realise the error of your ways...
[Magisk] dr4go:
Why am I waiting for husky now to appear? *uhm* Sorry for the offtopic, won't happen again. 😉
[Magisk] pndwal:
Sudden?... I've mentioned it here ever since I discovered it's existence!... Promoting? Well I've only ever used it for comparison and in processes of elimination; as such it's an extremely useful tool despite its quirks (... reminds me of someone I know)...

Anyway, results in latest case showed need to eliminate only Debugging mode... Done... Next, look for improper detections like apps... Possibly jackpot!... Let's see how this goes down w/ @revengineer and if we can't wish him Bonvoy-age...

Sickening?... Guess that's a compliment... Gotta congratulate you on your sickening sense of style too... You da Master!

🤪 PW

Go directly to jail; do not pass go, do not collect $200...
[Magisk] Schroeder09:
So I've been out of the rooting game for awhile..... I'm on a10 on a Google p2xl with magisk 20.4 with manager 7.3.5. I'm getting ready to move to a p7p and I'd like to do a swift backup to install to the new phone. Swift doesn't see that my phone is rooted and I'm guessing it's because the magisk version is too old. I understand the magisk manager and updating process is different now. How can I update from this old magisk version to the new without messing anything up?
[Magisk] 73sydney:
With the Pixel 2XL heres what i would do - safest route imho (having only just left that device last year), with bonus option #2 if you dont have TWRP installed already, since it does have proper fastboot...

1) You have TWRP installed:

- Do a full uninstall of magisk from within the magisk manager app (note down any modules you may have used first - be aware some/many may not be compatible with newer versions of Magisk) OR if you have the magisk.apk or magisk.zip from the same version you used to install (later versions may not remove earlier versions, ymmv), rename it to uninstall.zip, boot to TWRP and flash it to remove magisk

- Get a copy of the latest magisk from here, make a copy of the apk and rename it to magisk-xxxx.zip

- Reboot to recovery

- Flash magisk-xxx.zip via TWRP, boot into system and install magisk-xxx.apk to complete the full install

2) You dont have TWRP installed:

- Grab a copy of TWRP (the .img version) from here (latest is twrp-3.7.0_9-0-taimen.img)

- Grab a copy of Android Platform Tools here

- Grab a copy of the latest magisk from here, make a copy of the apk and rename it to magisk-xxxx.zip

- Do a full uninstall of magisk from within the magisk manager app (note down any modules you may have used first - be aware some/many may not be compatible with newer versions of Magisk)

==================================================================

OR

if you have the magisk.apk or magisk.zip from the same version you used to install (later versions may not remove earlier versions, ymmv), rename it to uninstall.zip, boot to TWRP and flash it to remove magisk

- Using adb and fastboot (from platform tools) fastboot the TWRP image - i.e. its a one off boot into TWRP - no install needed

adb reboot bootloader

then

fastboot boot twrp-3.7.0_9-0-taimen.img

- Flash uninstall.zip

- Reboot to bootloader and fastboot TWRP again

==================================================================

adb reboot bootloader

then

fastboot boot twrp-3.7.0_9-0-taimen.img

- Flash magisk-xxx.zip via TWRP, boot into system and install magisk-xxx.apk to complete the full install

You could of course do the other method of magisk install (after removing the old one) of grab the stock boot img from the ROM, move it to device, install latest magisk manager, use that to patch that, then flash the new boot.img , but thats more steps, i always let the magisk-xxx.apk, renamed to zip, via TWRP do the work for me...

Of course, most of the info on general magisk install/uninstall and other issues, is of course here:

{{color text="Magisk and MagiskHide Installation and Troubleshooting gu:Magisk and MagiskHide Installation and Troubleshooting guide

didgeridoohan.com

If Swift gives you drama still, consider Migrate, free and has moved every app ive ever used across 3/4 Android versions now (despite a few odd quirks of late, which ive noted in the last few pages of that thread)
[Magisk] soopx:
Hi all - I saw there was a Magisk update and tried to install it through direct download, and since then my phone has been in a boot loop. I can get into the bootloader, but the advice that I've found so far hasn't worked. I don't want to hard reset if I can avoid it.

I have a rooted Samsung S21FE

I can make an ADB bridge, but one article says I should :

* turn off the phone

* connect it to USB

* input "adb wait-for-device shell magisk --remove-modules"

* wait for the command to complete

* power up my device

Currently this command never completes, and I can't actually turn my phone off, since it wants to start endlessly. I'm not sure if it would since it wasn't a module, but magisk itself.

Can anyone give me any other advice? I've tried uninstalling Magisk via ADB, but that doesn't work either, it lets me get into sideload mode, but isn't connected as authorised, despite the fact that I'm fairly certain USB debugging is on. Oh, I've tried deleting the keys, but still nothing
[Magisk] Schroeder09:
Thanks for the detail. Yes I do have TWRP. I'll have to remember how to even boot to it! Haha wow it's been awhile. It sounds like you're describing the old method that has always been used though. Is that right? This is how I remember a typical magisk version working.
[Magisk] 73sydney:
Easiest way to boot to recovery is via (using platform tools):

adb reboot recovery

and yes the rename to zip and flash via magisk and watch it do its shizz is the old method, the pull stock boot.img and patch via magisk manager then flash modified boot.img is newer than what youre probably used to
[Magisk] revengineer:
Shamiko is v0.5.2(120) and should be current).

I think this is because I was testing with an older version of Momo yesterday. The latest version 4.4.1 reports "Found Zygisk" (see below).

Yes, I found this thread as well, but I do not have TWRP installed. I do have of course other root apps installed (e.g., Titanium Backup). Which leads to the next comment...

I will need top look into HMA, I did not need to use this in the past.

Again, TWRP in not installed.

This I will need to try.

I later located Momo v4.4.1. I am at work and cannot easily attach screen shots. However, "Details" now report "Found Zygisk" and this is the only entry. "Suspicious traces" still lists the debugging mode and the broken TEE.
[Magisk] Schroeder09:
Will the new way still work? I was looking into it. I can download the magisk app, but then I have to find the boot.img. I was thinking that should be the boot image from the OTA.zip security patch that I'm currently in (March 2020). I have to find that zip, pull the boot image from it, and then select that in the new magisk app. Is that the new way?
[Magisk] soopx:
oh no... I tried a factory reset and that didn't work ...
[Magisk] 73sydney:
Thats a bummer...somethings wrong if a factory reset wont solve it

Option #2 is to flash stock ROM via ODIN with HOME_CSC in CSC slot to retain data and cross your fingers

Hopefully you keep a copy of your latest stock ROM handy, if not - Frija

description here

and for download

here

Basically download it, run, type model info into Model box, and CSC (region code) into CSC and hit check update

Much prefer this over sammobile or other firmware sites, much faster downloads

I trust you know how to use ODIN....
[Magisk] soopx:
I have used it once before, but if you could link me to a guide I'd be appreciative. I know I had some problems before.

my big worry is that USB debugging is somehow disabled
[Magisk] 73sydney:
New way is more steps....

You can extract the boot.img from the OTA i think

or from current install in a root terminal:

dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
[Magisk] soopx:
This is so bad, I thought the direct download method of magisk was supposed to be pretty bulletproof.

when I try sideloading an older version of Magisk, I get [libfs] error updating for slotselect
[Magisk] 73sydney:
ODIN: https://odin-samsung.com/dload/tool/Odin3-v3.14.4.zip

This covers it well enough i think, theres a billion guides in text or on youtube
[Magisk] V0latyle:
TWRP isn't much use on A/B devices like the Nexus/Pixel series, except when live booted. Since TWRP lives in the boot image, trying to install it concurrently with Magisk doesn't work, at least in my experience. For root, the only thing that is necessary is patching the boot image with Magisk. While this can be done through TWRP, it's recommended to directly patch the file itself, then flash in bootloader.
[Magisk] Schroeder09:
Are any of the items in that command supposed to be replaced with my actual device name or something because that brings back "no such file or directory" in terminal emulator
[Magisk] 73sydney:
Fair point, which method i used could sometimes come down to how i was feeling that flash :)

At the height of my time on Pixel 2XL i was ROM testing 3/4 ROM's a week....i dropped by there a bit earlier and development has definitely dropped off.... :)
[Magisk] 73sydney:
sorry, youre right, its 5am here and i should be asleep :)

thats the command if youre booted to TWRP and from PC with (root) adb shell open

also ballsed up the command

dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img

must go to sleep now...the signs are there
[Magisk] V0latyle:
Well, part of the issue is the fact that there is no bespoke recovery partition, unlike Samsung and other A only devices...although Samsung is a terrible example because after all these years they obstinately continue to refuse to follow the recommended Android layout. So, many ROM developers either use ADB via web browser (similar to the Android Flash Tool). They could provide their ROM in zip format; this way it could be flashed via ADB (fastboot update) or flashed via TWRP, which would have to be live booted (fastboot boot twrp.img). But, that brings extra complexity that novices often find difficult, such as not knowing the difference between flashing vs live booting TWRP.
[Magisk] J.Michael:
I think the dd command got mangled. The "if=" is telling where the input is, it should be a partition, check in a terminal whether you can say "ls -ld /dev/block/bootdevice/by-name/boot"

The "of=" is telling where to put the output, it should be a more normal looking location, somewhere you can find it, like "/sdcard/Downloads/boot.img". I don't see any value in jamming it into the /dev tree.
[Magisk] 73sydney:
Yup, as i mentioned i tanked it, lack of sleep....

on booted device....(my S20+ 5g)

find /dev/block/platform -type d -name by-name

result: /dev/block/platform/13100000.ufs/by-name

ls -la /dev/block/platform/13100000.ufs/by-name | grep boot

result: boot -> /dev/block/sda13

dd if=/dev/block/sda13 of=/sdcard/boot.img
[Magisk] J.Michael:
Do you remember installing Magisk?

Did you install Magisk in the recovery partition?

As far as I know, you have to use Odin (or Heimdall) to write to a Samsung. Did you use Odin when you installed Magisk?

You should have the ROM file you used to install Magisk. I expect it to have been a big ZIP file that you unpacked to get 4 or 5 tar files with horrible long names. There should have been (one each) a file named AP, BL, CP, CSC, CSC_HOME.

If you have such a collection of files, and you can get the device into download mode, you should be able to "flash" the stock ROM.

If that gets you a bootable Android, stop there and talk to someone.

The Magisk installation instructions has sections describing how to install on a Samsung.
[Magisk] soopx:
Thanks J.Michael. I've reinstalled the original boot.img using Odin amd I'm just reinstalling all my apps now. Tbh I don't think Ive lost anything important that's irreplaceable, I just know it's going to take so long to get everything back how I like it.

Still, that's better than having a permanently bricked device!

Thanks for your help guys, I was starting to freak out a bit!
[Magisk] J.Michael:
If you flashed 4 files in Odin, you did a lot more than "reinstalled the original boot.img". That may be the only thing that changed, but it is not the only thing you flashed.

You did not say whether you originally installed Magisk into recovery.

You need to be aware of where Magisk is installed. If it is installed in recovery, you cannot use the "direct install" option in the manager app to update; you cannot use the "flash a ZIP from TWRP" option.

You might not need to install Magisk in recovery. Like I said, talk to someone before you reinstall Magisk.
[Magisk] soopx:
Thanks, I'll try and figure that out tomorrow:)
[Magisk] bnsmb:
Hi

>>is there anyway to figure it out?

Late answer .. but nevertheless :

To get the backup of the boot image used before installing Magisk this code can be used (the command must executed by the root user in a shell):

ASUS_I006D:/dev/hP3B # ls -ld /data/magisk_backup_$( grep SHA1 $( magisk --path )/.magisk/config | cut -f2 -d "=" )
drwxr-xr-x 2 root root 3452 2022-11-06 17:14 /data/magisk_backup_1a05ccb9844d3ad4f6d1873dfbf76ebf83a5bdeb
ASUS_I006D:/dev/hP3B #

regards

Bernd
[Magisk] badabing2003:
Just be careful, I've seen cases where the config file did not have the correct SHA1.

If you absolutely want to be sure what SHA1 value of backup you want to keep,

Dump the boot partition of the active slot (assuming that this is patched)

Extract the SHA1 from it and make sure you have a backup of the stock-boot, and if you don't you can extract it from the factory image and transfer it to /data/adb/magisk/stock-boot.img and then run the migration.

For details, there was a quite a bit of discussion about it in earlier posts.