yashsingh1/xdaforums huggingface dataset:
[Magisk] rodken:
I suggest that you consult with this thread regarding this matter.
[Magisk] jons99:
well the recommended way is to unroot but since I don't like it what I do which is probably not recommended and you can try at your own risk is get the latest main components apk I think s+ april is the latest then update from settings reboot and before it reboot on you install the main components apk and it won't reboot you need to do it fastly
[Magisk] badabing2003:
Some cursory comments.

MAGISK_APK=$(pm path com.topjohnwu.magisk) # If hidden, replace with package name

Keep in mind that, if Magisk is hidden, even if you have the correct package name, you only have the stub, which is not enough to create a patch.

../busybox unzip -o ../pf.zip

PF copies this to /data/local/tmp, you're expecting it to be there, but I don't see where is the copying part.

Not all systems have busybox, so you have to account for it.

If you're on x86_64, then you need to copy x86 version, that's one of the checks that PF does.

The other check is for this special Magisk by @Namelesswonder which provides 32 bit functionality to 64 bit only phones, you still want to copy the 32 bit Magisk if the Magisk in use is Magisk Zygote64_32, if you don't care about those, then your check is enough.

I find that this is enough to check for SYSTEM_ROOT

SYSTEM_ROOT=false
grep ' / ' /proc/mounts | grep -qv 'rootfs' && SYSTEM_ROOT=true

For Pixel devices, I never needed to bother for Recovery mode, did you do any testing on a device with recovery mode? I'm curious about your results.

SHA1=$(./magiskboot sha1 "$1" 2> /dev/null)
cp -f new-boot.img /sdcard/Download/magisk_patched_$SHA1.img

You want to add 40 character SHA1 to the filename?

just add | cut -c-8
[Magisk] ctcx:
Thanks for all your input again.

The points in order:

---I think the copy part would be this:

cp "${MAGISK_APK#package:}" /data/local/tmp/pf.zip

And yes, first check if busybox is available

---Yes, after all of that your zygote tests would be more complete...

---No, the Moto osprey turned to be, as already mentioned in a previous post of mine, Type I turned Type IV with Android 10-based custom ROM. I did a bit of "confidence" after all what I read and searched, but actually have no RECOVERY mode devices (don't know if they can even be still gotten nowadays). I'd certainly need someone else's help for that; sorry for this again

---Ye, I forgot to cut the SHA1 part, thanks
[Magisk] badabing2003:
I'm sure you know, just to be clear, that copy is copying the apk, if busybox is not available, you still need to find a way to put it in /data/local/tmp/ so that you can unzip the apk.
[Magisk] HippoMan:
Even without busybox, every Android device has an available "cp" executable.
[Magisk] badabing2003:
busybox is needed for unzip, not cp
[Magisk] ctcx:
General question:

By any chance, does someone happen to have a RECOVERYMODE device?

One of those which Magisk reads "Ramdisk = no" and thus need ugly recovery patching; according to Magisk docs these ones should have been released during late 2018/early 2019, are A-only, Type III device, etc...

Thanks beforehand.

@badabing2003 :

Just to clarify, efforts with the "script" above were aimed to try making the thing as general for all devices as possible and not just for Pixel devices; in hopes of contributing with something small if you didn't mind.

As far as I understood, you mentioned that with something like this

MAGISK_APK=$(pm path com.custom.package_name)

I'd only get the stub, but not the entire needed "apk". Then how would I get it?

Also, just for random comment, maybe also due to my ignorance, but I'm still yet to see mobile devices -phones and tablets- with the same x86_64 architecture as PC desktops and laptops...

At least at local store here they still don't sell them... Maybe we're just poor

Thanks again.
[Magisk] badabing2003:
Of course I don't mind, it's better for the community, your efforts are appreciated, the back and forth makes me scrutinize my code and improve it. Don't stop.

PF handles this the following way.

By default, the package name of Magisk is assumed to be com.topjohnwu.magisk

But the user has the ability to change / set it in UI,

PF checks against the known Magisk package names

self.config.magisk not in ['', 'com.topjohnwu.magisk', 'io.github.vvb2060.magisk', 'io.github.huskydg.magisk']

, and if the value does not match, then it warns the user that a hidden Magisk cannot be used to create a patch, and asks the user to unhide it.

On the other hand if Magisk is not installed at all, it offers the known Magisks available for the user to choose to install one of them.

Emulators for sure, some Chromebooks.
[Magisk] HippoMan:
Oh ... sorry for misunderstanding.

But my device also has /system/bin/unzip ... not from busybox.

But perhaps that's not standard in all Android releases. I'm running crDroid, and maybe they offer more in /system/bin than the standard.
[Magisk] Human Person:
Hello, I updated to 26.1 from the latest stable magisk release, 25.2 I believe. I updated the app, then did a direct install to patch the boot.img. I proceeded to be stuck at the Motorola boot logo, I entered fastboot and reverted to the stock boot.img. To my surprise it still won't proceed past the boot logo.

What else does magisk touch when doing a direct install via the app?

My usual script to revert to stock is as follows:

fastboot --set-active=a
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash vbmeta vbmeta.img
fastboot flash radio radio.img
fastboot flash bluetooth BTFM.bin
fastboot flash dsp dspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash recovery recovery.img
fastboot flash super super.img_sparsechunk.0
fastboot flash super super.img_sparsechunk.1
fastboot flash super super.img_sparsechunk.2
fastboot flash super super.img_sparsechunk.3
fastboot flash super super.img_sparsechunk.4
fastboot flash super super.img_sparsechunk.5
fastboot flash super super.img_sparsechunk.6
fastboot flash super super.img_sparsechunk.7
fastboot flash super super.img_sparsechunk.8
fastboot flash super super.img_sparsechunk.9
fastboot erase carrier
fastboot flash bluetooth BTFM.bin
fastboot oem fb_mode_clear

fastboot --set-active=b
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition_b gpt.bin
fastboot flash bootloader_b bootloader.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash radio_b radio.img
fastboot flash bluetooth_b BTFM.bin
fastboot flash dsp_b dspso.bin
fastboot flash logo_b logo.bin
fastboot flash boot_b boot.img
fastboot flash dtbo_b dtbo.img
fastboot flash recovery_b recovery.img
fastboot flash super super.img_sparsechunk.0
fastboot flash super super.img_sparsechunk.1
fastboot flash super super.img_sparsechunk.2
fastboot flash super super.img_sparsechunk.3
fastboot flash super super.img_sparsechunk.4
fastboot flash super super.img_sparsechunk.5
fastboot flash super super.img_sparsechunk.6
fastboot flash super super.img_sparsechunk.7
fastboot flash super super.img_sparsechunk.8
fastboot flash super super.img_sparsechunk.9
fastboot erase carrier
fastboot flash bluetooth BTFM.bin
fastboot oem fb_mode_clear

fastboot --set-active=a

The flashfile.xml also specifies erasing userdata, metadata, and ddr, but I've never had to do that before in the case of bad module or a bad ota/magisk upgrade.

So I'm wondering, what's my course of action to get the device a. bootable and b. retain userdata
[Magisk] Nergal di Cuthah:
Sounds like a old module that's incompatible with 26. Try restarting the phone in safe mode. Can't tell you how to but i know you can. Or did i miss that you tried and it wouldn't
[Magisk] jons99:
dude if you just want to flash your stock boot img why not just fastboot flash boot.img? why run all this script that will always set your slot to a? I have a feeling your flashing an old rom with your usual script try flashing the latest rom for your device
[Magisk] Human Person:
Read the post, I flashed just the stock unpatched boot.img initially. Surprised it didn't work, that script is just a full rollback. I generally only run it when testing different roms

The rom being flashed is just a backup of rom from the device. Another device is currently running the same rom as well without magisk, so something clearly happened during the direct install of Magisk's upgrade. Android 11 in case anyone is wondering.
[Magisk] Human Person:
Strange that it'd still be a problem after removing the patched boot.img and replacing it with the stock one. That should remove root and nullify the modules

Also unable to boot into safe mode via recovery on this model of phone, I have dealt with incompatible modules before.

The process has been revert to stock boot, fully boot into stock rom, restart into safe mode (only available when fully booted into the stock rom), enter bootloader, reflash magisk's patched boot.img, boot device from bootloader, enter safemode, then remove/disable offending modules.

I'm stuck at step two for some reason. I can't boot into the patched or stock boot.img anymore after a direct install of magisk 26.1. I'm wondering if the use of FoxMagiskModuleManager has something to do with it
[Magisk] Memozit:
İf i patch boot at Magisk and i flash boot.img, my phone enter bootloop as 2-3 second loops

My phone: Omix X400
[Magisk] pndwal:
Normally nothing else, unless you'd patched vbmeta.... You didn't perhaps take initial direct install with recovery mode selected by mistake?... That would have patched /recovery...

So you didn't run this yet?... Not sure about set active = a either... Normal just flash current slot.

Dirty ROM Flash (no wipe/format/factory reset) should restore booting system... If patched recovery from direct install, just flash /recovery...

If issue was altered recovery or other partition Magisk should flash fine now... If it was incompatible module and still bootloops, find a way to delete/data/adb contents or enter fastboot mode using key combo from powered off state (Nb. Magisk must be installed for daemon to detect recovery mode and disable modules). See Magisk FAQs for fastboot method (if USB debugging is enabled)...

🙃 PW
[Magisk] Human Person:
I have ran the script. Which would have also flashed the stock recovery. Still hanging at the boot logo. For whatever reason the model of phone I'm using only boots to slot a, despite having a/b slots. If slot b is left active it will bootloop, even straight from the factory. I flash both slots because it works, it acts as a sanity check

I just select 'Direct Install (Recommended)' within the magisk app after upgrading the app itself to 26.1. ADB is active but no external devices are authorized. How would I enter adb shell from recovery? It seems I only have access to fastboot and adb side loading of updates.

Thanks for the help!
[Magisk] pndwal:
Not sure why active slot would change anyway... Generally you'd just patch per John instructions and active slot is just used... Active slot should only change during reboot after a stock OTA update and revert if update fails...

Straight from factory inactive slot is usually shipped with factory preoptimised system app .odex files, which formerly took up ½ /system partition, on inactive /system_b partition and these are moved to /data on first boot / setup...so can't boot that slot till first update unless user installs an OS and swaps active slot manually...

Can you confirm you actually have recovery partitions?... Normally you don't on A/B devices... those that do have a and b recoveries...

Also, please say which Moto device...

So seems you've now wiped data anyway (?)...

Can you use stock method to clean install factory fastboot ROM? (It's doubtful recovery was the issue, but seems some partition(s) are not accepted... Could be due to your unusual approach... 🤠 PW
[Magisk] naagiovanna:
hi everyone, when I try to re-install magisk 26.1 in the app, it always failed and says: /dev/block/mmcblk0p33 is read only

what seems to be the problem?
[Magisk] pndwal:
Very general info. 🙁

Are you speaking of in-app direct install after.zip installation in custom recovery??

Have you ever succeeded with direct install before? What device? ROM?... Guessing may be Huawei... 😬 PW
[Magisk] naagiovanna:
yes, that's what i'm speaking about

No, I've never succeeded with direct install before. also, my device is realme c25 and i already installed corvus custom rom
[Magisk] pndwal:
Flashing with fastboot? Tried disabling verity/verification in vbmeta per Installation Instruction page? Stock ROM?

Interesting device... unusual(?) UNISOC Tiger T610 soc... Not sure if there are issues rooting with this... PW
[Magisk] Didgeridoohan:
Of course it does... I've been running Nougat with Magisk since it came available for my device. There might be compatibility issues with Pixel though.
[Magisk] KyeWalker:
Latest phh release I can not pas SN still.

Cm13, magiskv8, phh superuser r266, superuser r266 hidesu and yes the little box to hide magisk is ticked
[Magisk] loserskater:
Don't think it's supported as I haven't seen any commits for slot-based systems.

Need to wait for the next release of magisk. There's an update to magisk hide that should allow you to pass sn.
[Magisk] KyeWalker:
Thanks buddy, must of miss read the dev's post (face palm)
[Magisk] waylo:
Why would you expect that to pass? The new version of magisk isn't released yet. Phh's hidesu hasn't passed for most for weeks.

Edit: loserskater beat me to it
[Magisk] Gigaify:
Pardon my ignorance but I seem to be having an issue after installing v8 I'm running the OnePlus 3 with the latest official build of oxigen Os. Flashing back to v7 fixes my issues. Would like v8 for the payment bypass. Thanks for the help in advance.
[Magisk] andrew2432:
Isn't passing sn, waiting on the update!!!
[Magisk] Gigaify:
So i didn't mess up? That's a first. Haha thought it was something I did wrong. Every time it would reboot to recovery
[Magisk] andrew2432:
Ohh that may be something differnt to look at then. We are all [im]patiently waiting for v9 .

That's potentially a different animal than just passing SN. Do you have the most updated version of your recovery? I've not known magisk to have many compatability issues
[Magisk] knpk13:
In addition to the other answers, Im pretty sure FlashFire has not been updated yet for compatibility with the Pixel.
[Magisk] CrazyCypher:
A closed source version of Magisk that has Magiskhide should be made so they couldnt look into it for SafetyNet...

---------- Post added at 03:05 AM ---------- Previous post was at 02:59 AM ----------

If we want to pass it with xposed we should still have supersu and suhide? or is there an alternative?
[Magisk] Gigaify:
Did a clean uninstall, flashed v8 and latest sure from the official thread. After reboot it just keeps jumping back to recovery. (Yep running the latest) flashing v7 allows me to boot to my device.
[Magisk] Captain_Throwback:
Yes (if that still works).

No.
[Magisk] crazymanjinn:
After upgrading to phh-superuser-magisk-r266, magisk hide is no longer functioning. Undoing everything and then reinstalling doesn't seem to fix anything.

Immediately, I notice a couple oddities in /magisk/.core/magiskhide:

angler:/magisk/.core/magiskhide # ls -al
total 40
drwxr-xr-x 2 root root 4096 2016-11-10 19:19 .
drwxr-xr-x 5 root root 4096 1970-06-04 20:06 ..
-rw-r--r-- 1 root root 216 2016-11-10 18:15 add
-rw-r--r-- 1 root root 0 2016-11-10 19:19 enable
-rw-r--r-- 1 root root 79 2016-11-10 18:15 list
-rw-r--r-- 1 root root 233 2016-11-10 18:15 rm

First, the permissions on the scripts are all missing the execute bit. If I add it with chmod, the scripts then fail due to hidelist not existing:

angler:/magisk/.core/magiskhide # ./list
./list[4]: cat: /magisk/.core/magiskhide/hidelist: No such file or directory

If I create this file, I can use all the scripts, but they have no actual effect. This was previously working on phh-superuser-magisk-r259, however if I go back to stock and then re-install everything with that version, I'm now seeing the same behavior, so I'm not sure what else to try to fix this.

Currently running:

magisk v8

phh-superuser-magisk-r266

magisk manager v2.1

nexus 6p 7.0.0 (NBD91K, Nov 2016)

Any kind of logs I can look at to figure out what's going on here?
[Magisk] gstanke:
You could read the few pages prior to your post. Magisk is currently being updated.
[Magisk] knpk13:
Wait for magisk v9. Magisk hide will work then.
[Magisk] Alxoom33:
Lol,? magisk doesn't work, is it being updated? ;p). Really...it's not in the OP...

You want me to read the entire thread! If only Google would make a tool to search such things...it would be great. Nah, I'll just ask. Nobody else would have asked this question...LMAO.
[Magisk] broomer68:
That would only work if magisk idea was not in the open, and would start to be completely encrypted. But then it would attract a lot attention of Google and they would take greater care of understanding and improve safetynet to un-encrypt or decrypt as the main purpose is an untampered phone.

Verstuurd vanaf mijn ASUS_Z00A met Tapatalk
[Magisk] waxler9311:
Does anyone know if V9 will support the Pixel and Pixel XL?
[Magisk] Captain_Throwback:
I don't know for sure, but I doubt it since [MENTION=4470081]topjohnwu[/MENTION] doesn't have a Pixel device to test on...:rolleyes:
[Magisk] pndwal:
I know some devices, eg Huawei, use read only /boot while booted and don't allow patching boot from system (ie. Direct install is broken)... You may need to patch corvus boot.img from App, then flash separately... Guess you have TWRP? - flash .img from that or using PC/fastboot.

Corvus ROM may be the issue too.

🙃 PW
[Magisk] zgfg:
Fixed and I just tested in the AA MMM v2.0.2 Action build:

fixes #2 · Androidacy/MagiskModuleManager@8600360

Previously known as Fox's Magisk Module Manager (FoxMMM), this app helps users find, install "Magisk Modules" - powerful little zips/apps for your device that plug into the Magisk fra...

github.com

Tested:

- updated module from Repo

- updated module by JSON (module N/A on Repo)

- installed module from local storage
[Magisk] SnowyDog:
Hello guys,

I have a Honor View 10 BKL-L09 running Pie, EMUI 9.1.0.364 (C432E5R1P13), rooted with Magisk 26.1 and Systemless Hosts (v1.0) and Universal SafetyNet Fix (v2.2.1) modules installed. Magisk is in hidden mode, Zygisk installed.

With this model of phone, Magisk is in Recovery and so I use the VOL+ and POWER key combo to always start in Recovery to enable Magisk. I don't have TWRP or any other custom recovery installed.

Everything works fine, except that I'm getting occasional reboots. I'm unable to pin down an exact trigger but it happens most often when I open any app that is not already running in the background. The reboot never occurs if I have Magisk disabled (if I don't boot into Recovery) or when an app like Waze or Spotify is running.

I have factory reset and wiped the device many times, have gone back to stock ROM and have repeated the Magisk installation using the instructions from @topjohnwu using ADB and FASTBOOT to flash the patched recovery image.

Does anyone have any suggestions as to why this is happening? I did wonder if it is something to do with apps checking for root, but generally such apps even refuse to run due to root, or just present a warning. It's not particularly these 'trusted' apps that cause the reboots anyway.

Thanks for any thoughts or advice to help me solve this issue. Thanks!
[Magisk] jons99:
go to /sys/fs/pstore and see if you have ramoops file in there after it reboots

if you do upload it here maybe we can see what's wrong
[Magisk] pndwal:
I have Xiaomi Redmi Note 8T, Ramdisk = No so may be able to test something for you... However I have Magisk in boot because bootloader accepts added ramdisk...

Device will be much the same as devices like Galaxy S10 that don't accept boot mode Magisk (still A-only gen 1 SAR), applicable difference being bootloader compatibility with ramdisk in boot which the system cannot test for...

Just a technical point; while Magisk App hides recovery mode for Ramdisk = Yes devices, it could actually work on many devices.

You could use magiskboot and patch magiskinit to recovery on any device with recovery partition(s), including some A/B devices, and boot system with Magisk root via recovery if you wish to as these partitions all contain ramdisk to boot the recovery OS. You would most likely need to make some code adjustments as Magisk's recovery mode is built only to accommodate legacy SAR booting, but a ramdisk is all that's technically needed and every device has recovery ramdisk(s); for most A/B devices these recovery ramdisks happen to reside in the boot partitions however, and Magisk already hijacks them in boot mode... The only reason Magisk doesn't make recovery mode more generally available is there's little point.

Please can you say why this can't work? (Am I missing something with the use of scripts to execute?)...

Of course I'm taking about stub app with populated data, not initially installed stub... Because in practice patching using hidden stub Magisk App works fine...

There are frequent issues with Direct Install using Magisk in stub however as Magisk still fails to remove the full app after populating stub data sometimes/on some devices leaving users with dual Apps and Magisk Installed = N/A... This has been improved somewhat, but I feel that the last issue regarding this was closed prematurely as it still occurs.

🤠 PW
[Magisk] pndwal:
Doubt it's related to your issue (which @jons99 has offered to help with), but FYI official USNF is broken... Most are using @Displax's fork with fixes:

https://xdaforums.com/t/module-mod-universal-safetynet-fix.4553699/

👀 PW
[Magisk] gsmdb:
I've p20 with android 9 and had the same problem with random reboot and my advice is, don't use magisk 25+. You must use the good old 23+ to huawei phone. Its stable (zygote version) and still hide root very well with zygote modules
[Magisk] xdaroot1nox:
the problem is magisk delta isnt uptodate not shamiko
[Magisk] zgfg:
Magisk Delta does not need Shamiko - never did

You can install SafetyNet Sensitive Props from Husky (instead of USNF) and App Data Isolation.

Search on GitHub
[Magisk] xdaroot1nox:
what do you mean by doesnt need? If I need/want to use the new version of Shamiko, then I cant use Magisk delta.
[Magisk] zgfg:
It was always advised not to use Shamiko with Delta - don't know much more why

And I never need, hiding worked better than with official Magisk
[Magisk] ctcx:
...Not sure if your device actually lands in this category (from here):

But just in case, what I'd need help with specifically is to confidently replicate Magisk UI's "Ramdisk = Yes/No" with this part:

Thanks again.
[Magisk] Human Person:
I understand that that shouldn't change, doesn't hurt anything to flash both. The device is the Moto G Power 2021. I have a recovery_a and recovery_b, both were flashed successfully during the script.

Where did I say that? Any sensitive data will be still intact after running that script

Why would partition(s) not be accepted? There's no indication during the flashing of stock partitions.
[Magisk] SnowyDog:
Thank you for this suggestion. I checked but don't have the ramoops file, so I guess it's not a kernel crash.
[Magisk] SnowyDog:
@gsmdb thank you for this suggestion. I have gone back to Magisk 23.0 and I'm tentatively optimistic, have been using it a lot with no reboots yet. Thank you, much appreciated!
[Magisk] J.Michael:
@pndwal I think when @ctcx said "stub apk is insufficient for patching", he meant stub apk treated as zip and unpacked did not yield scripts he counts on extracting from Magisk apk to support his script to patch from command prompt.
[Magisk] ctcx:
It was not me, but badabing2003.
[Magisk] SnowyDog:
@pndwal thanks, yes I did realise this. It's not a huge issue for me as just hiding root is enough in my case, but I'll look at displax's fork thank you.
[Magisk] pndwal:
🤔 The only fundamental difference is the inexplicable inclusion of support for a boot ramdisk in bootloader which system cannot see... Booting via ramdisk just works... PW