yashsingh1/xdaforums huggingface dataset:
[Magisk] V0latyle:
The caveat to this is if OEM Unlocking is enabled in Developer Options. I'm not sure if this is a bug; the Pixel devices can be flashed this way even on a locked bootloader.
[Magisk] zgfg:
Interesting

I wrote "shouldn't" since I had experience from my phones (but I never had Pixel) that even for flashing the stock ROM via Fastboot, both OEM Unlocking must be allowed and BL must be unlocked
[Magisk] Lughnasadh:
Are you referring to when using Android Flash Tool to flash? If this is the case, Android Flash Tool actually unlocks the bootloader (with the prerequisite that OEM Unlocking is enabled) during the process so it can flash the image. If, however, you flash an image via flash-all, for example, with OEM Unlocking enabled but with the bootloader still locked, you won't be able to flash the image.
[Magisk] V0latyle:
Thanks for clarifying. I was under the impression that the AFT used the same process as we are used to with fastboot, but this makes sense.
[Magisk] treier57lol:
Okay, the phone boots, but the prop doesn't get applied. I tried both Systemless hosts and MHPC on both boot stages, but they don't seem to do anything. getprop sys.oem_unlock_allowed still returns 1, and with MHPC, it says the prop was "not yet set by this module." With late_start, it seems to boot; then it crashes when I unlock my phone and throws me back to the LineageOS boot screen for a few seconds, and then goes back to the lock screen.
[Magisk] martyfender:
I know this is device dependent, but I am surprised that you were able to root it with the bootloader locked.
[Magisk] Lughnasadh:
Think you might be quoting the wrong person. The person I was responding to couldn't root their phone because their bootloader was locked.
[Magisk] zgfg:
Seems that you would need a Zygisk based module that only changes the prop sys.oem_unlock_allowed for your package com.swedbank

PS: Seems that you could do that with the following module, by modifying its dynmount.sh:

GitHub - HuskyDG/magic_proc_monitor: A Magisk/Zygisk module allows user to run script whenever app process start

A Magisk/Zygisk module allows user to run script whenever app process start - HuskyDG/magic_proc_monitor

github.com
[Magisk] martyfender:
Sorry, it was @TheNixck . I am going through chemo therapy and I think I have one of the side effects: chemo brain lol!

​

​

​
[Magisk] Lughnasadh:
Fight the good fight 💪👊
[Magisk] zgfg:
Sorry to hear and take care👍
[Magisk] Fishawy:
You got this mate. Stay strong.
[Magisk] m0han:
Sorry to hear that. Wishing you strength to tackle the situation.
[Magisk] HippoMan:
Seems like you're hanging in there and staying positive. Keep up the good fight!
[Magisk] pndwal:
Didge says Bye...

I was very sorry to see yesterday's MHPC commits:

Update FUNDING.yml

Didgeridoohan committed yesterday

Bye.

Didgeridoohan committed yesterday

and the update of @Didgeridoohan's OP in [MODULE] [DEPRECATED] MagiskHide Props Config - SafetyNet, prop edits, and more - v6.1.2 thread:

This project was a mainstay of Magisk modification, giving John Wu's Magisk applet resetprop, an advanced system property manipulation utility, the terminal based UI that made prop manipulation accessible to Magisk users in general...

Each option has been elegantly implemented to make what would otherwise be an arduous exercise involving user creation of custom boot scripts the no-brainer that we know so well!

What a project, what a plethora of uses...

@Didgeridoohan's Last post in that thread was back in February:

... well clearly no clearing has occurred in Feb. or later... 🙁

@Didgeridoohan's last XDA post, only weeks later, was a response regarding his officially endorsed comprehensive Magisk Troubleshooting Wiki:

So no further updates to that either, but whatawiki!!! - Still a principle go-to for any non-lazy Magisk user w/ any issue!...

... So as a foreigner living in Didgeridooland, I'd like to wish the Didgeridoo man from Sweden all the very best with real life, and to thank him for such elegant contributions to the Magisk modding community...

I hope you can visit Didgeridooland soon Sir! ... I have a boomerang with your name on it... 👍👏 PW
[Magisk] rodken:
At least he's leaving the door open for someone to take the helm.
[Magisk] zgfg:
Awaiting for 👍

https://xdaforums.com/t/module-magi...re-forked-and-ready-to-go-live-again.4510729/
[Magisk] rodken:
Were you successful in running with the latest beta?
[Magisk] zgfg:
Didn't test that forked MHPC
[Magisk] pndwal:
The instructions apply to legacy SAR and 2SI devices (A9+ Launch version) and are not oboslete... The caveats etc should be followed for Galaxy S21... This is a 2SI boot type device (what John calls 'SAR for Magisk purposes')... Note: the only devices needing Magisk in recovery ramdisk (Recovery mode Magisk) were A-only legacy SAR, all A9 LV AFAIK (although some A/B legacy SAR devices launched with A7 & 8 also).

This may be so, but w/ A9+ Sammy users are patching whole AP binary and John says that requires flashing with CSC (+ other binaries) for full data wipe the first time Magisk is flashed (ie if device is returned to fully stock even w/ B/L left unlocked data wipe is mandated again)...

However I'm not 100% sure failing to wipe data w/ first Magisk install is still risky (or that unrooting / restoring stock AP binary w/o full data wipe can still cause brick) on all modern Sammy devices since we no longer patch vbmeta generally (ie AVB is retained) since magiskinit injection refactoring...

John did say the wipes are needed for SAR (A9 LV) and that refactoring affected only 2SI (A10+ LV + A8 LV and earlier running A10+), so I suspect he hasn't changed instructions since full data wipe is still important for initial Magisk installation on all A9+ Sammy units...

Sammy users may know for sure... PW
[Magisk] 73sydney:
I feared as much when i saw the Retired prefix turn up on his badge recently, but this really underlines that he is leaving us for goodsies....and i mean really. I went to try and shout him a beverage or two via his paypal link and even the account is gone :(

This is a sad day, but i hope he is doing okay

And i too shall only be happy to shout him a coffee or beverage of his choice should he ever visit our fair city

Thanks for everything @Didgeridoohan - the modules, the wiki, the hints and guidance (but never spoonfeeding!) when making my own modules, and you know, arbitrating between myself and some other folks on here :) I suppose some other poor sod will have to get long overly descriptive complaints against mods from now on :)
[Magisk] 73sydney:
/me tries not to start nuffin over the unnecessarily long process of patching the entire massive AP binary on a Sammie, again...

Wheres that gif (that one that defs never got me in trouble before)

<please picture a claymation gif of a clay man flogging a dead clay horse>

or

see here (coz i just found it in my archives and uploaded it specially)
[Magisk] pndwal:
I see @Displax already spoofs this in his forked USNF

Hide "Enable OEM Unlock" setting

Displax committed 2 weeks ago

Seems the need for 'sleep' value may be your issue:

# To make sure that system does not overwrite this props during long booting
sleep 15

# Hide "Enable OEM Unlock" setting. Safe to change after "boot_completed"
resetprop sys.oem_unlock_allowed 0

Guess you could use his fork or edit service.sh for your official USNF...

Looks like this isn't getting into separate patchset (@Displax complied) slated for next release for reasons Devs discussed here:

[NEXT RELEASE] Separate patch set

#240 by Displax was merged 4 days ago

... and here:

Added sys.oem_unlock_allowed prop reset

#226 opened on Oct 19, 2022 by TheJebForge

... and @huskydg suggested a different method that may be better there...

👀 PW
[Magisk] treier57lol:
Good news, I got the prop set using MagiskHide Props Config. I added sys.oem_unlock_allowed to the custom props section, set it to 0, and used the "late_start service" boot stage. The trick was to add a one-second delay after "boot completed." It works perfectly now and persists after reboot. This should work for all the Baltic region Swedbank apps.
[Magisk] huskydg:
Detect sys.oem_unlock_allowed is too dirty
[Magisk] zgfg:
Check in your Developer options does it mean that OEM Unlock is then disabled (or not)?

(Although it should be re-enabled when you boot without Magisk or with MHCP re-enabled)
[Magisk] treier57lol:
OEM unlock doesn't even show in developer settings. I believe LineageOS hides the option on purpose.
[Magisk] AndrzejDwo:
I'm a samsung user myself. I have some different generation samsung devices, and I never had to wipe my data after first magisk installation. I never used patched AP method either because it is hindering imho.

The thing is that John doesn't recommend using custom recoveries, and samsung lacks fastboot, so he made his recommended rooting methods Independent.

For me TWRP is mandatory when i decide to root my device and for that to work I have to format my data after first installation just to remove encryption which TWRP dosn't like on sammys.

On my current device - S21Ultra, after flashing TWRP together with patched vbmeta.img, rooting is as simple as flashing magisk.apk.

Samsung somehow forgot to update their devices to A/B so we divide them to those with or without ramdisk. Those with ramdisk are rootable by flashing magisk.apk in recovery, on those without ramdisk we have to use patched recovery method or custom kernels with 'pre-built' magisk.

Anyway... this post is a perfect example of tl;dr posts xD (my kids would fall asleep 4 sure)....

Cheers

PS I skipped some steps not to make it even more tl;dr

PPS flashing full firmware with odin using CSC file (not home csc) is enough to unroot samsung device (data will be wiped)
[Magisk] pndwal:
Ah yes... as stated by John...

But my question for Sammy users is simply 'Assuming AP in-app patching/Odin flashing for initial Magisk installation (not custom recovery installation), is flashing with CSC (for full data wipe) still needed w/ all A9+ Sammy devices?'... And 'If not, what devices are exceptions?'... PW
[Magisk] ipdev:
Not sure about custom roms but, on a few devices (stock roms) I have tested setting sys.oem_unlock_allowed 0 after boot complete.

When checked, the prop returns 0 but, the toggle is still on under developer options.

Just by opening the developer options menu, the prop is set back to 1 since the toggle is still on.

Cheers. :cowboy:
[Magisk] AndrzejDwo:
I might be wrong but i think it's related with the first time flashing verified boot disabled vbmeta. That would mean it's mandatory for all A9+ sammy devices. During AP patch only 2-3 files got patched: vbmeta, boot and eventually recovery. I'm not familiar with that method but I'll try to find some more informations.

cheers
[Magisk] pndwal:
Thanks... So vbmeta AVB stripping was required since A9 for all Sammy devices?... I assumed it may only have been for 2SI (A10+) since Magisk used to do it for old magiskinit injection in fstab, but that's changed...

Anyhow, if it was a rule from A9 for Samsung, vbmeta may be the only real reason for wiping data... 👍 PW
[Magisk] AndrzejDwo:
Yes, all samsung devices shipped with P require stripped vbmeta.

cheers
[Magisk] anglach:
Currently using this rom with my S7 edge and couldn't root with superSU so need to use magisk. But the problem is when I patch boot.img from rom, adb just can't find patched boot.img and pull it over. Tried c/p'ing it into adb folder and using fastboot flash command but it just keeps on waiting for device.

I tried to convert .img into .tar for odin but it's also stuck in SingleDownload/Nandwrite phase. ROM I use doesn't have AP, BL or any other files besides the boot.img which just gets stuck. TWRP also doesn't work with "update process ended with error 1".
[Magisk] huskydg:
If your ROM is RW, you can try installing Magisk directly to system partition. This might work or not work. If you really need this, then pm me
[Magisk] J.Michael:
Do you get a message that adb can't find the file?

I don't think "waiting on device" is a sign of "can't find file", I think it's a sign of the device is not connected / recognized.

With Samsung, I don't think you ever have fastboot as an option, I think you need to use Odin.

How did you install this ROM? You would use the same procedure to install Magisk, except that you would use Magisk to patch the equivalent of the boot image before installing.

Describe what you got that constituted "this ROM": ZIP file, tar file, img file?
[Magisk] ipilcher:
Call me stupid, but I can't figure out the installation instructions for my OnePlus Nord N200 (dre), running LOS 19.1. The device does have a boot ramdisk, and I've extracted boot.img from the LineageOS ZIP. The device also has a separate vbmeta partition (judging by the presence of vbmeta.img and vbmeta_system.img within the LOS ZIP).

After reading the Patching Images section of the doc, I'm simply not clear on which steps I need to do. Do I need to patch/flash the boot partion, the vbmeta partition, or both?
[Magisk] zgfg:
Usually you don't need to patch vbmeta - it was discussed previously here

Anyway, that's something you would do (in case of separate vbmeta) by fastboot, hence you can always do that later, if without that steps things won't work

Hence, patch the extracted boot img by Magisk app and flash by fastboot as described there

Make sure it is really a boot.img from your currently using ROM - if anything goes wrong, just flash the not patched boot.img over

But if your boot.img is not from your ROM, then you would brick the phone, no matter if you flash that boot.img or the patched-boot img

---

In fact, instead of permanently flashing by:

fastboot flash boot <patched boot img>

just temporarily (one time) boot:

fastboot boot <patched boot img>

and if system boots and Magisk shows installed, then flash permanently - or even easier, take Install Magisk from the app, but this time Direct install

If it didn't boot or something, simply reboot (you didn't permanently flash yet)
[Magisk] ipilcher:
Nice!

Thanks!
[Magisk] Arealhooman:
Btw after this, can you make it enforcing.
[Magisk] J.Michael:
Make what enforcing?

I think most of our problems come from Android having "SELinux=enforcing" in whatever passes for kernel boot parameters -- if it was "SELinux=permissive" it would be more like Linux used to be, and every man would be master of his own computer.
[Magisk] alecxs:
you know Android is actually java framework, not linux? each app is new "user" have a look into /data/system/packages.xml. SElinux is also running on linux and darwin.
[Magisk] Arealhooman:
Could you make the shortcut with permissive, and then set it to enforcing again.
[Magisk] zgfg:
Whom are you asking for that feature?

If you want it in the official Magisk, you need to submit to the Magisk GitHub page, following the procedure as prescribed there (otherwise the bot or devs will most likely close the submitted issue shortly)

TJW (creator and lead of the Magisk project) does not read XDA for a couple of years (he communicates on Tweater but I doubt you could ask deep technical questions there), specially not this thread and the posts/wishes or even bugs here

If you want to have it in some of the Magisk forks (Alpha or Delta), again you need to ask through their GitHub projects or the corresponding Telegram channels - for Delta there is another thread on XDA (opened by dev) as well as for Alpha (users only but mostly dead thread since there are not many users anymore outside of China and they communicate to the devs strictly on Chinese on TG)

If that's a request for some of the existing modules, similarly

Sorry, we are all practically just the Magisk users here

PS:

1) AFAIK, TJW long ago expressed his concerns about ROMs and apps using Permissive mode, saying it's a bad practice (and nothing for Magisk to deal with)

2) That might be a feature fitting for the Zygisk module - in that case, Permissive mode will be switched to only for the particular app, when running.

However, somebody interested should develop that module, where the Zygisk part must be written in the native code

3) You could try your luck with the following module:

GitHub - Magisk-Modules-Alt-Repo/magisk_proc_monitor: A Magisk/Zygisk module allows user to run script whenever app process start

A Magisk/Zygisk module allows user to run script whenever app process start - Magisk-Modules-Alt-Repo/magisk_proc_monitor

github.com

You will need to edit yourself the included shell script dynmount.sh, it provides you the mechanism to do something (switching to Permissive mode if you wish) when a particular apps starts
[Magisk] J.Michael:
I can't do anything.

You still haven't explained what it is that you want to make "enforcing".
[Magisk] Arealhooman:
I am assking if after making the magisk hide app I can change selinux back to enforcing?
[Magisk] zgfg:
Yes, as was written in the quoted post:

...(Alpha or Delta) ... ask through their GitHub projects or the corresponding Telegram channels
[Magisk] zgfg:
I really don't know if enabling MagiskHide in Delta enforces SELinux mode (maybe a question to ask on the Delta TG channel) - but I don't believe, regarding to the latest Changelogs (screenshot attached)

In the official Magisk there is no MagiskHide (and AFAIK Denylist has nothing to do with permissive/enforcing modes), and I don't see how/why would Hide Magisk app change the SELinux mode

Just my thoughts, I don't use (and would not like to use) ROMs or apps that require Permissive mode
[Magisk] ipdev:
SELinux is not just a simple toggle you can turn on and off. 🙃

Security-Enhanced Linux in Android

- Overview - [source.android] - Link

Implementing SELinux

- Implementation - [source.android] - Link

---

Example:

LineageOS 20 Pixel 5a.

- Add 'sepolicy/' from tag 'android-13.0.0_r1' - [github] - Link

Cheers. :cowboy:
[Magisk] Arealhooman:
There are modules and apps which can toggle it freely
[Magisk] J.Michael:
Everything I know about making SELinux "permissive" or "enforcing":

When you boot android-x86, there is a kernel command line parameter "androidboot.selinux=permissive".

This is android-x86, Android ported to Intel x86, booted on a desktop PC. I always assumed there was a corresponding kernel command line parameter in Android, even though I don't know where to go to fiddle with it.

Maybe if you could explain where you are looking to see either "permissive" or "enforcing", and why you think you want to change it, someone could advise you.
[Magisk] m0han:
https://xdaforums.com/t/app-tool-2-0-official-the-selinux-switch.3656502/ is one. Post in the thread regarding your issue/requirement and wait. 😉

I guess this is not the sole reason he/she wants to change it.
[Magisk] Pro-me3us:
Does anyone know if there is a new Magisk release on the horizon (eg v25.3 or v26.0)?

I need to update an Android project I maintain that includes Magisk 25.2, and I'm wondering if I should hold off for an imminent Magisk update.
[Magisk] 73sydney:
XDA General Rule On Projects:

#1 - Never ask for an ETA

Just afaik theres no imminent new release, the project is now run by a small group of people for whom communication would be at best described as "spotty"
[Magisk] m0han:
But, what happened?
[Magisk] J.Michael:
Maybe the first rule of XDA is you don't tall about XDA.
[Magisk] Arealhooman:
Their post: “

Please note:

I will no longer be participating in this thread, or forum, and therefore there will be no further updates by me to the guide.”

one of the admins said that ina few days they may return
[Magisk] mrjuniork:
People, let's not get this thread sideways again.

I'm sure you are surprised, but things happened and actions were taken. Nothing more to add, especially not here.

So let's get back on topic, shall we?

Thx for your understanding.

Cheers,

mrjuniork
[Magisk] Arealhooman:
I disagree. It stands for Magic Mask

Edit: My browser glitched and showed this as the latest post and I did not see the date 🤦‍♂️🤦‍♂️
[Magisk] yanilata:
Hi all,

I'm using a Oneplus 6 with microG LOS 20 from here https://download.lineage.microg.org/enchilada/

On microG LOS 18 I had Magisk working, but since updating to 19 and now 20 I am unable to get it working.

I patched the extracted boot.img (from the firmware with link above) with Magisk and flashed it to the boot partition and then the phone does not boot up anymore. When I check for magisk in logcat the first hit is

magiskinit: open: /proc/bootconfig failed with 2: No such file or directory

Then a bunch of errors with magiskhideprops (I did not save the log output, if you think it can help I can run it again and post it)

Later it just restarting zygote over and over. So probably something goes wrong with patching the boot.img already? The app logs this:

Spoiler content hidden.

Spoiler content hidden.

Anyone an idea or how I can debug this?
[Magisk] J.Michael:
There is some family of devices that suddenly reoganized ROM distribution / partitions. For that family, you no longer patch boot.img -- there's some other partition that needs to be patched. I think the name was something like "bootinit".

Start by checking the distribution ROM to see what assortment of partition names you have.
[Magisk] Lughnasadh:
You may be thinking of the Pixel 7 series where the init_boot.img is patched since that's where the generic ramdisk was moved to (from the boot.img) on these devices (and other devices that ship with Android 13).
[Magisk] yanilata:
Does not seem to be the case, extracted partitions for lineage-20.0-20230124-microG-enchilada.zip are:

64M boot.img
8.0M dtbo.img
323M system.img
8.0K vbmeta.img
380M vendor.img

I found out something interesting. When I magisk patch the boot image provided with the microg downloads (don't ask me what the difference is but the checksum differs to the one packed in the update) this will also not boot when I flash it to boot. But it DID boot when I booted directly from the bootloader (fastboot boot ...) and Magisk shows it is installed (but after reboot you will loose it again). Then I tapped on install magisk and now there were more options and I did the direct installation. This created and flashed a working boot image and now I have magisk persistent with a working boot partition...
[Magisk] pndwal:
Well done... You've stumbled on a method many use and advocate; obtain temporary root by booting only rooted image, then use Direct install (only available with root) to permanently flash root to boot partition...

Another interesting trick is that one can update by flashing Magisk.zip (renamed .apk archive) as a module ("install from storage")...

Not sure why you couldn't fastboot flash image, but can't preserve ownership errors may relate to AVB issues... Disabling verity/verification per Installation Instructions may have helped, (or the 'ownership' issue may be caused by something else) but frankly I think the method you discovered is actually better... 😜 PW
[Magisk] J.Michael:
When you tried to flash the boot.img that came with the distribution, had you already installed MicroG with its bundled boot.img?
[Magisk] yanilata:
The distribution comes with MicroG and I actually had problems with the bootup before (it was something about gmscore not being in the privapp permissions allowlist), but was able to resolve this by uninstalling microg . I reinstalled it later again via magisk module microg installer revived.
[Magisk] J.Michael:
What is a "MicroG download"?

Does it "include" a boot.img?

What other "boot.img" did you patch that you reported that when you patched the boot.img that came with the MicroG download, "this will also not boot"?
[Magisk] pndwal:
Like @J.Michael, I suspect you weren't flashing boot image as currently installed (ie. It received extra patching or it was simply from a different package)... Direct install (as you did) ensures current image is patched which is critical since it contains the kernel etc as well as generic ramdisk.

If you have twrp and bootable system you can also ensure you use image identical to current one simply by making a twrp backup of boot partition, then extracting the .win backup and patching that in Magisk... You can simply rename *.win to *.img, but likely don't even need to do that... PW