yashsingh1/xdaforums huggingface dataset:
[Magisk] pndwal:
So you could use your own patched image this (official) way?... I thought you mean you needed pre-patched image downloaded from a 'Nothing' forum... 🤔

Did patching on device seem to work?... Did you see Direct Install option after temp booting magiskpatched.img?... PW
[Magisk] pndwal:
Big change in Magisk documentation...

Main page Useful Links now includes a new Building and Development section (build.md, for developing Magisk itself)... This has some information moved from main page readme.md, and from old Native Development doc (native/README.md) which is now deleted...

In Developer Guides (guides.md, for developers using Magisk), clarifications on permission contexts etc have been made.

👀 PW
[Magisk] paper88:
First i patched the stock image in the manager and then i flashed it over fastboot. -> Magisk was not working

Then i checked the Nothing ROM Forum site and downloaded the patched image and flashed it. With this it worked, so maybe the manager didn't patched my stock image correctly, idk 😅
[Magisk] osm0sis:
Simply using ash will fix the local vs. typeset issue since local is a shell built-in command, but to ensure all commands are running as expected (e.g. something else on the path could behave oddly) you should use ash standalone.
[Magisk] HippoMan:
Makes sense, given the variations among shell implementations regarding "local"/"typeset" as well as other constructs.

And there might even be variations in "ash" among different busybox versions, and so it would be best to use the busybox that's specifically packaged with Magisk ... if indeed it continues to come with Magisk nowadays.

If not, it would be useful to know the exact recommended busybox version to install. This is not only for "ash", because busybox supplies many common utilities, and perhaps one or more of these might also be utilized.

PS: Ah, I now see above that @osm0sis indeed specified the recommended busybox version.

<rant>

And thanks again, Google, for continuing to make it require more and more person-hours of software diagnosis and development effort on the part of so many people, simply for the purpose of being able to run a rooted device without crippled apps.

</rant>
[Magisk] badabing2003:
No he needs to, here's why

The script uses util_functions.sh
[Magisk] KevinT3:
Having some problems with zygisk after updating magisk version to 26.1, zygisk freqently becomes disabled and can only be fixed by uninstalling and installing magisk all over again. Anyone know what could the problem be?

Device is Oneplus 8T, os is Lineage latest.
[Magisk] ctcx:
So the mystery of the errors in pndwal's case was finally solved.

@badabing2003 :

Just in case, in order to wholly catch up like you said, I think it'd be exactly since page 2794 of this thread; this is, 4 thread pages ago from here, where I tried to begin answering that immediate last doubt of yours back then, followed by pndwal's corrections and the rest of the saga.

Thanks.
[Magisk] badabing2003:
Thanks for the catch up references, it will make it easier.
[Magisk] HiWhatName:
Hey, I'm having problems finding any documentation on how to use magiskboot to add CommandLine arguments to my boot.img.

There isn't any offical documentation on what "mode" is supposed to be. And from the .cpp source code I can't seem to understand it either. Any help appreciated : D

Tldr; How can I use magiskboot to disable SELinux(androidboot.selinux=permissive)?
[Magisk] J.Michael:
My first guess is you would want to add a kernel command line argument like I see in desktop Linux. Something like "SELinix=permissive". You would have to check source or documents for your kernel.

As for "MODE": the only references to that term in the document you cited are in the section for "cpio", so maybe it is somehow related to cpio modes. Or maybe the cpio archive has subdirectories that somehow relate to SELinux modes. I don't know. How many cpio archives are there in a boot image? Have you looked at their structure?
[Magisk] ipdev:
Hi all. 🙃

Question.

Is anyone running the "CI" or personal builds of Magisk on an ARM (v7a) device?

If so..

Does the Magisk patched boot image boot after the "Update ODNK requirement to r25.3" commit?

---

I ask because (apparently) I have not update Magisk on my Nexus 7 2013 (flo) in a few weeks.

Last night I just updated it using the direct install option like normal.

This time, it would not boot the patched image. I called it quits for the night.

This morning, I went back though and found I had to drop back to my 26.Apr build to get it to boot on my flo.

- My deb (LTE version) is still on 6.Apr Magisk build. So it gave me a window for testing when it stopped working on flo/deb.

The above commit is the only difference between my 26th and 30th builds.

Starting with the the 30th build, the patched boot image is smaller.

-rw-r--r--. 1 ip ip 7292928 Jan 1 2009 boot_lineage-20.0-20230507-deb.img
-rw-r--r--. 1 ip ip 7292928 Jan 1 2009 boot_lineage-20.0-20230507-flo.img
-rw-r--r--. 1 ip ip 550147417 May 7 18:27 lineage-20.0-20230507-UNOFFICIAL-deb.zip
-rw-r--r--. 1 ip ip 542392300 May 7 18:26 lineage-20.0-20230507-UNOFFICIAL-flo.zip
-rw-r--r--. 1 ip ip 7528448 May 13 12:43 magisk_26001_20230406-boot-flo20230507.img
-rw-r--r--. 1 ip ip 7528448 May 13 13:16 magisk_26001_20230418-boot-flo20230507.img
-rw-r--r--. 1 ip ip 7528448 May 13 13:21 magisk_26001_20230426-boot-flo20230507.img
-rw-r--r--. 1 ip ip 7524352 May 13 13:26 magisk_26001_20230430-boot-flo20230507.img

---

I only have this issue on my Nexus 7.

(Granted I do not have another arm device setup to test on currently.)

My other devices are arm64 (v8a) A/B devices and have no issues running newer builds.

Even the one I ran this morning.

Cheers all. :cowboy:
[Magisk] J.Michael:
Don't change your terminal emulator settings. Just open a window and type a few commands. "cd" is "change directory", so after you type "cd ~" you will be "sitting" in the directory defined as your "home" directory. You should be the owner of the directory, and therefore free to put files in it, and then use those files.

Those were all lower case ells: "ls" is a program that lists file names (much like DOS/Windows "DIR". The "l" after the minus is an option, meaning "long listing", so more information.

Which terminal type you use probably doesn't matter until you try running a program that manipulates the screen, like "vi" or "emacs". I would leave it as the default.

I keep nagging you to run without "su" because it is safer -- less chance of breaking something when your finger slips; it is the environment in which these scripts are run when you have not installed Magisk.

That brings a new set of problems: as @badabing2003 pointed out, you would have to make a copy of "util_functions.sh". Sounds easy, but when I used Mixplorer to copy the file, somebody wished on me an SELinux context that made the file inaccessible. When I used "su" to copy the file from the command line, naturally I ended up with a file in "my" directory, but its owner and group were "root", and "world" had no permission. So then I had to use "su" again to change the owner and group.

And my last request was to try to find an explanation for the error message you got when you tried "sh test2.sh". Which could very well be another case of the stupid way the shell reports "you have permission to reference test2.sh, but *it* does not have permission to reference util_functions.sh, and it would be too much work to tell you the file that *actually* triggered this message".
[Magisk] badabing2003:
I never expected @pndwal to manually copy that file, that is why I asked him to run as root in /data/adb/magisk

I could have given him a script that would have extracted all the necessary files from the apk and run, but I wanted to keep it simple, all I cared about is the output from those few lines.

As for explanation of the error, I believe it was determined to be due to the shell and how it was invoked, that is all cleared out,
[Magisk] HiWhatName:
Got it to work by adding -h to magiskboot unpack -h and modifying the "headers" file for any1 reading. Thanks anyways : D
[Magisk] J.Michael:
I understood your motivation.

The most recent error was, when @pndwal tried "sh test2.sh", an error message seemed to be saying he didn't have privilege to access "test2.sh". Like I said, it could be that it was a reference within the script that triggered the error, and the details (like whether it was the "cd" command, or the attempt to read "util_functions.sh") got lost, maybe because the actual error occurred in another shell.
[Magisk] badabing2003:
@pndwal @ctcx @zgfg

You are the only ones I know that have devices that fall into the category that we've been trying to test with.

If you could be kind enough to create a patch the normal way in Magisk UI and then create a patch using PF, so that we could compare the differences (if any) it would be great, no worries if you can't or don't have the time / patience.

PF should be taking care of most of the stuff that was discussed recently in this thread, except perhaps RAMDISK no case (which we will find out)

These steps won't flash anything to your phone, it just creating patch files.

The attached is a special PF (next version preview). it is a single executable, just unzip and run.

If you are not on Windows, let me know and I can prepare a version for your platform.

Instructions.

First thing to do is go to File menu and select Configuration, this should bring up ...

If your Magisk package is not the default (hidden or non-official), then replace com.topjohnwu.magisk with the proper package name

Check Offer Patch Methods

OK to close the configuration settings.

Click on browse and select where you have platform tools unpacked on your system, if you don't have it, you can download it using the Green link on the left of that line.

PF should display the version of the platform tools along with console output of the SHA-256

Click on Scan to detect your device, which should be connected to your PC, if your device is rooted and PF detects it as not rooted, that's because you have not granted root rights to adb shell, enable that and rescan.

Dropdown to select your device

If you have the factory image for your phone, browse and select the zip, this is so that PF can extract stock boot.img from it, otherwise you can skip steps 4, 5, 6 and 7 and jump to step 8

Hit Process button so that PF extracts the boot.img / init_boot.img files

Select the extracted boot in the list.

Hit the patch button and you should get the Patching Options (skip step 8)

Only if you skipped steps 4-7 or PF somehow did not like your firmware because it didn't match the pattern it expects from Pixel firmwares, you can select the stock boot.img manually by clicking on the needle icon and selecting the file (you need to have it on your PC).

At this point you should see this.

The instructions in the dialog should be self explanatory (let me know if there is any ambiguity so that it could be refined to be clearer)

If you could create patches with options 1, 2, 4

We would use the one created with 4 (manual) as a baseline and compare it to rooted method and unpacked Magisk app method.

Thanks in advance.
[Magisk] LittlePro:
Does Magisk take care of

Qualcomm Secure Boot ( CSB ) : Enable

&

Secure Download : Enable

. It shows in Odin Download Mode.

The OEM-Unlock setting is unavailable

. Model : SM-A300H.

Please help.

Thanks.
[Magisk] pndwal:
Are you asking if Magisk unlocks bootloader?... No...

Where are you looking for OEM Unlock setting?... Have you enabled Developer Options?... PW
[Magisk] LittlePro:
Thanks for the response.

1. I am asking if installation of Magisk will be successful in these conditions ?

2. I looked for OEM Unlock settings in Developer Options. Also tried the 7 day's date fooling trick : https://www.xda-developers.com/fix-...y-s9-samsung-galaxy-s8-samsung-galaxy-note-8/

3. Fastboot commands are not recognized on this phone.
[Magisk] zgfg:
Generally, unlocked Bootloader is a MUST HAVE precondition for installing Magisk. Don't even think you could install Magisk without
[Magisk] pndwal:
Is firmware stock?... If not, bootloader should already be unlocked...

OEM unlock should show, however in download/Odin mode screen do you see any indication of B/L lock status?...

You may be able to simply dial number: “*#*#7378423#*#*” to activate phone service menu... navigate to Service info, then to Configuration to see Bootloader unlock status...

Key Attestation app (in playstore) may also indicate Bootloader unlock status for you...

When missing in Developer Options, carrier (eg some in America) may have disabled it... It may also already be unlocked...

Assuming ADB bridge set up on PC (USB debugging enabled / USB configuration set to MTP + ADB),

- Connect phone to PC via USB and open a command prompt.

- Enter command: “adb oem device-info” to check ‘Device Unlocked’ state...

Also, seems some Sammy devices apparently can use fastboot as follows:

- Enter command “adb reboot-bootloader”... phone should reboot into fastboot mode.

- Enter “fastboot flashing unlock” – this should trigger unlocking process...

Alternatively:

- Entering “adb oem unlock” may likewise initiate unlocking...

Hope it helps... 🤠 PW
[Magisk] jons99:
it's a samsung they have no fastboot unfortunately
[Magisk] pndwal:
Might be a bit of a myth... Depends on the model... I think even S20 does, and others launched with A10+... And seems many old devices did too... This device launched with KitKat 4.4.4... PW
[Magisk] ctcx:
@badabing2003 :

If you mean Xiaomi devices, I'm afraid that Redmi 9A was not mine, but cousin's; really sorry...

Though, FWIW, that device had the following:

---armabi-v7a

---Ramdisk = yes

---A-only

---zygote32

---2SI SAR

So it was Type IV device. Supposedly released in 2020, and yet still with micro-USB instead of USB type-C...

Though if you still need something else don't hesitate to mention.

Thanks.
[Magisk] badabing2003:
Thanks,

For the discussions from few pages back, was there any unanswered specific question?

I know about the error @pndwal encountered, but I see that is settled now, by using busybox and how @osm0sis suggested, I have already made those adjustments, just checking in case there was something that I missed.
[Magisk] ctcx:
By checking again, only the one of yours back in thread page 2794 precisely, about why RECOVERYMODE was always the opposite to Ramdisk value.

The question was completely answered along that thread page itself, and also a latter adding by pndwal:

Would this be ok? Or do you still need help with testing devices?
[Magisk] badabing2003:
Only if I can have a test on a device that returns RECOVERYMODE = True, if PF also return True, and if the created patch matches the one created by Magisk.
[Magisk] zgfg:
Here you go:

File folder on MEGA

mega.nz

Folder containe the boot.img file from my Xiaomi Mi 9T, Xiaomi.eu 12.5 (A11) - where I had the typeset errors with the script, and that patched images made by your PF methods 1,2 and 4

PF did not like the Xiaomi.eu zip installation file:

2.79 GB file on MEGA

mega.nz

and the folder above contains the error it printed - hence I gave it the boot.img file that I extracted manually (and I always use it when patching the Magisk)

You can reach me by PM👍
[Magisk] badabing2003:
Thanks bud,

Greatly appreciated.

I can confirm that Manual-magisk_patched-26101_tvlbJ.img and MagiskApp-magisk_patched_26101_01a83c37_26f81541.img except for the RANDOMSEED, which is expected.

Do you know why RootedMagisk-magisk_patched_26101_01a83c37_a3ba52c7.img is zero bytes?

Perhaps support file could explain it.

PS: I'm downloading Xiaomi.eu zip to see if PF can do something about extracting boot from it.

Have you tried it as ROM instead of Firmware?

I'll know as soon as down completes, it's a bit slow.
[Magisk] badabing2003:
Just tested loading it as ROM in PF.

It processed fine and extracted the boot.img
[Magisk] zgfg:
I tried once again, method 1 produced 0 bytes, method 2 22 MB as expected

See also RootedMagisk-Error.txt just uploaded to that shared folder on Mega

You can download my boot.img from that folder on Mega and test on your side (or you will find the same in the 3 GB zip when you download

PS: Support file also uploaded
[Magisk] zgfg:
Btw, when I use that Browse and select the Xiaomi.eu OTA zip, how do I change the mode in PF to let it recognize as a ROM file?
[Magisk] badabing2003:
if you turn on advanced settings, The ROM selection shows up.

just browse, select and process see apply Custom Rom row in my previous image
[Magisk] pndwal:
I'll run test soon, when I have time on PC... 👍 PW
[Magisk] zgfg:
See also my post/answer #55984 above (with the support file for 0 MB method 1 patch file)

Btw, I enabled Advanced options, took ApplyCoston ROM (is that the right one?), Browse, selected that ZIP, Process and now it spins forever, saying Please be patient
[Magisk] badabing2003:
The error is the following:

mv: setfilecon:/sdcard/Download/magisk_patched_26101_01a83c37_6e12a291.img,u:object_r:system_file:s0: Operation not supported on transport endpoint

It's failing on this step of the script

mv new-boot.img /sdcard/Download/${PATCH_FILENAME}

You should see the file new-boot.img in /data/adb/magisk

I looked into this to understand why it failed.

If I run with regular shell, the mv works, however if I run it with

export ASH_STANDALONE=1; /data/adb/magisk/busybox ash

as @osm0sis suggested, it is failing, perhaps he can chime in with some insight.

Here's the attempt.

127|redfin:/data/adb/magisk # ls -l
total 26967
-rwxr-xr-x 1 root root 3534 2023-05-02 13:46 addon.d.sh
-rwxr-xr-x 1 root root 6978 2023-05-02 13:46 boot_patch.sh
-rwxr-xr-x 1 root root 2116176 1979-11-30 00:00 busybox
drwxr-xr-x 2 root root 3452 2023-05-02 13:46 chromeos
-rwxr-xr-x 1 root root 162516 1979-11-30 00:00 magisk32
-rwxr-xr-x 1 root root 263920 1979-11-30 00:00 magisk64
-rwxr-xr-x 1 root root 825056 1979-11-30 00:00 magiskboot
-rwxr-xr-x 1 root root 642952 1979-11-30 00:00 magiskinit
-rwxr-xr-x 1 root root 331832 1979-11-30 00:00 magiskpolicy
-rw-r--r-- 1 root root 23158784 2023-05-14 14:17 new-boot.img
-rwxr-xr-x 1 root root 1264 2023-05-14 14:05 pf_patch.sh
-rwxr-xr-x 1 root root 29057 2023-05-02 13:46 stub.apk
-rwxr-xr-x 1 root root 22750 2023-05-02 13:46 util_functions.sh

2|redfin:/data/adb/magisk # echo mv new-boot.img /sdcard/Download/magisk_patched_26101_01a83c37_4e99b093.img > junk.sh

redfin:/data/adb/magisk # export ASH_STANDALONE=1; /data/adb/magisk/busybox ash junk.sh
mv: setfilecon:/sdcard/Download/magisk_patched_26101_01a83c37_4e99b093.img,u:object_r:system_file:s0: Operation not supported on transport endpoint

1|redfin:/data/adb/magisk # chmod 755 junk.sh
redfin:/data/adb/magisk # ./junk.sh
redfin:/data/adb/magisk # ls -l
total 4331
-rwxr-xr-x 1 root root 3534 2023-05-02 13:46 addon.d.sh
-rwxr-xr-x 1 root root 6978 2023-05-02 13:46 boot_patch.sh
-rwxr-xr-x 1 root root 2116176 1979-11-30 00:00 busybox
drwxr-xr-x 2 root root 3452 2023-05-02 13:46 chromeos
-rwxr-xr-x 1 root root 76 2023-05-14 14:11 junk.sh
-rwxr-xr-x 1 root root 162516 1979-11-30 00:00 magisk32
-rwxr-xr-x 1 root root 263920 1979-11-30 00:00 magisk64
-rwxr-xr-x 1 root root 825056 1979-11-30 00:00 magiskboot
-rwxr-xr-x 1 root root 642952 1979-11-30 00:00 magiskinit
-rwxr-xr-x 1 root root 331832 1979-11-30 00:00 magiskpolicy
-rwxr-xr-x 1 root root 1264 2023-05-14 14:05 pf_patch.sh
-rwxr-xr-x 1 root root 29057 2023-05-02 13:46 stub.apk
-rwxr-xr-x 1 root root 22750 2023-05-02 13:46 util_functions.sh
[Magisk] badabing2003:
I might have an idea about it.

I'll get it fixed.

The way PF was designed, you load Pixel Firmware, where it unpacks that becomes your working directory.

If you select a ROM file, it will unpack to the firmware's working directory so that when flashing it will pick up the image from the ROM.

I bet you you have no firmware selected, hence it doesn't have a working directory and it fails,

if would work if you select any Pixel firmware, and process it, then rom processing will work.

I never expected the ROM to be used by itself like that, I'll fix it.

Thanks for discovering it.
[Magisk] samstheman42:
Hey all, I've been out of the loop on Magisk for quite a while, and just recently had the need to hide root from an app, only to find I no longer have access to that part of the app (Magisk Manager v 26.1, Magisk v23.0 (23000).

I'm not sure what lead to that (I run some Lsposed modules), but after some googling I've come to learn that feature is returned in new versions of Magisk. I'm concerned, though, as it seems like there are some major changes and I want to avoid data loss/corruption/phone bricking, etc.

Any feedback on what might be the safest way to upgrade to the newest version from 23.0?

Edited to add:

Found success in disabling the modules I had installed and direct installing through the manager app (for those that may have the same question in the future).
[Magisk] Thehaluzer:
Hello!

I have an

OnePlus 10 Pro

Model: Ne2211

Android version: 12

Build number: Ne2211_11_A.18

I updated magisk and now no root prompts are showing.

Display over app is activated.

Magisk is saying no app is requesting root.

While root apps are saying no root.

I tried to update magisk go canary or beta. But nothing is really helping out.

I'm ready to provide any information i can give if it helps fixing this.
[Magisk] Thehaluzer:
More pictures regard issue above
[Magisk] zgfg:
Your Magisk app is showing that Magisk is not installed (Installed N/A)

If you ever followed this thread and the similar questions and answers posted here, you would have seen that it's unfortunately a classical trap for users who had their previous Magisk app (or Manager as it was called in the really older version of Magisk) hidden

Ie, if you did Hide Magisk app in the past. You had to Restore Magisk app before upgrading Magisk

Or do now: find your old/hidden/repackaged Magisk app and uninstall. Then reboot (in case reinstall the new Magisk app)

Btw, I assume that you didn't just update Magisk app but that you also did update Magisk itself (that we are not talking about the case where Magisk is really not installed, but only that Magisk app is installed as it's showing on the screenshot)
[Magisk] netra3441:
Hello Forum,

I read here since a while, and I am more and more confused.

I use two Samsung Galaxy S7 smartphones with LOS 20 and a Samsung Galaxy A6 10.1 tablet with LOS 19. Also I know how to use TWRP.

I am interested in using Magisk, but really do not understand, wich is the correct way to install wich version of it.

Could anyone please give me a link, where these informations are written?

Thanks in advance!

:)
[Magisk] Thehaluzer:
Hello!

Thanks for the reply.

I have read multiple threads which confirms what you said. But truth to be honest i was unsure sens it's mostly topics about Samsung phones which i came up and my phone id a different one. Do i rather ask for help then do wrong and screw my phone over.

Back to the solution. So i checked the settings for an old magisk or hidden like you said and could not find it. What do you suggest i do? Sens i clearly see that your way more experienced in this then i am. For me this is rocket science.

I don't know how i did update magisk but as far as i can remember i downloaded it from official GitHub. I don't remember updating the magisk itself. Nether do i know how except pressing the install bottom inside the magisk app. But then it asks to patch from file which i again don't know how to proceed from as i don't know what file to use.

I would kindly ask you if you could give me advice to help me out i would really appreciate that!
[Magisk] J.Michael:
How did you install Magisk the first time?

Do you have a terminal emulator app? (Termux is a terminal emulator app; I do not care which terminal emulator app you have.) From the command prompt, try typing "magisk -- help"
[Magisk] Thehaluzer:
Hello!

Thanks for the reply!

I payed an company to root my phone. How they did the root I don't know i only unlocked the bootloader with ADB through a usb to pc i can try install it now see if it works.
[Magisk] Thehaluzer:
Does not seem to work sadly.
[Magisk] J.Michael:
How sure are you that this "company" installed Magisk?