yashsingh1/xdaforums huggingface dataset:
[Magisk] pulpf:
hi my twitter redirects: http://t.co. no longer open. Could the latest magisk update be responsible? I use the 26101 canary and the safetynet v2.4.0 mod 1.2 module.
[Magisk] Nergal di Cuthah:
More likely a host in adaway if you're using it. I know i had to whitelist it on mine.
[Magisk] zgfg:
[ is actually an alternate name for test utility:

test (Unix) - Wikipedia

en.m.wikipedia.org

Hence

if test -z "$ABC" || test "$ABC" != "true"; then echo '*** FALSE ***'; else echo '*** TRUE ***'; fi

or

if [ -z "$ABC" ] || [ "$ABC" != "true" ]; then echo '*** FALSE ***'; else echo '*** TRUE ***'; fi

will print *** TRUE *** only for

ABC="true"

In all other cases like

ABC undefined

or

ABC=""
ABC="false"
ABC="abc"
ABC="0"
ABC="1"
ABC="True"
ABC="TRUE"

it will return *** FALSE ***
[Magisk] ctcx:
Yes, sorry; I had to learn from ground how to use it (I had thought it was a "premium" feature for now...)

@badabing2003 :

So with this we may be finally complete?

RECOVERYMODE flag?

Probably just check for img's name, whether "boot.img" or "recovery.img"

SYSTEM_ROOT flag?

After checking them myself with device here, I think the exact lines selected by osm0sis in util_functions.sh could finally do; so just adding an extra function() containing those exact lines just before calling the get_flags() function.

The selected lines in util_functions.sh set SYSTEM_ROOT exactly to either "true" or "false", making the flag indeed working as a "boolean", and thus making the construct "if $SYSTEM_ROOT; then ..." to finally work properly.

So, do you think these changes could be good enough to be finally proposed for the boot_patch.sh script? Or better just keep doing our own wrappers?

Thanks again.
[Magisk] V0latyle:
Odd issue with Magisk 26.2 + USNF Mod 2.4.0_1.2 on UPB1 14 Beta....

Navy Federal app won't start with DenyList enabled on the core process (com.navyfederal.android)

Not sure when this started - when the app updated to 6.22 or when I updated to Android 14.

The same version (6.22) works on my wife's rooted Pixel 5a on TQ2A with Magisk 25.2 and USNF MOD 1.2
[Magisk] badabing2003:
With PF, I won't be patching patch_boot.sh, instead I will leave it intact, and add a wrapper script that would call it. Besides magiskboot cleanup needs to be called to, I might as well call everything that needs to be called.

Example: (This is a generated script based on the Magisk version + boot image chosen)

#!/system/bin/sh
MAGISK_VERSION="26101"
STOCK_SHA1=07815117
SYSTEM_ROOT=false
grep ' / ' /proc/mounts | grep -qv 'rootfs' && SYSTEM_ROOT=true
. ./util_functions.sh
get_flags
echo -------------------------
echo "SYSTEM_ROOT: $SYSTEM_ROOT"
echo "KEEPVERITY: $KEEPVERITY"
echo "KEEPFORCEENCRYPT: $KEEPFORCEENCRYPT"
echo "RECOVERYMODE: $RECOVERYMODE"
echo "PATCHVBMETAFLAG: $PATCHVBMETAFLAG"
echo "ISENCRYPTED: $ISENCRYPTED"
echo "VBMETAEXIST: $VBMETAEXIST"
export KEEPVERITY KEEPFORCEENCRYPT RECOVERYMODE PATCHVBMETAFLAG ISENCRYPTED VBMETAEXIST SYSTEM_ROOT
echo -------------------------
echo "Creating a patch ..."
./magiskboot cleanup
./boot_patch.sh /sdcard/Download/boot.img_07815117.img
PATCH_SHA1=$(./magiskboot sha1 new-boot.img | cut -c-8)
echo "PATCH_SHA1: $PATCH_SHA1"
PATCH_FILENAME=magisk_patched_${MAGISK_VERSION}_${STOCK_SHA1}_${PATCH_SHA1}.img
echo "PATCH_FILENAME: $PATCH_FILENAME"

If Magisk developers decide to fix the SYSTEM_ROOT and call get_flags, then wrapper script becomes simpler.

The one above is an example for already rooted device, for an unrooted device, the unpacking from apk is also part of the wrapper script.
[Magisk] zgfg:
I never used that app but tried now on Magisk Delta 25210 in SuList mode, with Sensitive Props and HMA, and it halts on the blue splash screen for me
[Magisk] Nergal di Cuthah:
Did you clear bank app data after adding to HMA and all.
[Magisk] zgfg:
Yes, always do
[Magisk] Nergal di Cuthah:
Oops sorry mistook you for original poster on app issue. And mistook volatile as someone who wouldn't do that. (these catchall threads confuse me as there are interweaving posts and problems.
[Magisk] ctcx:
Do you think that can be enough to properly test SYSTEM_ROOT on all, non-root, devices in general?

I thought all the other stuff could still be possibly needed...

With all that has been discussed until now, I would no longer think SYSTEM_ROOT needs any fixing...

We already got what it's supposed to do; and I think now it's clearer that the scripts, as they are, are designed to work along with app UI, instead of standalone.

This last thing would make more sense as for why using the construct "if $SYSTEM_ROOT; then..."

Thanks.
[Magisk] badabing2003:
if SYSTEM_ROOT is set to false, which is done by those two lines, then there is no problem with if $SYSTEM_ROOT; then line, however if SYSTEM_ROOT is not set, then it would evaluate wrongly.

I still think it is a bug in util_functions.sh, unset should not evaluate to true.

I don't have any devices that need flashing in recovery, or even Legacy devices to test (method A or B) to confirm if the above works in older devices, but I have done enough testing with several new devices and it seems to be working fine.
[Magisk] V0latyle:
Yeah that's what I was getting. Are you on UPB1 too?
[Magisk] zgfg:
No
[Magisk] ipdev:
Did you try installing the magisk patched boot image via TWRP?

TWRP -> Install ->

Select the "Install Image" option and select the magisk patched boot image.

TWRP will ask what what partition it is, select boot and install.

Reboot.

Cheers. :cowboy:
[Magisk] ctcx:
@badabing2003 :

Regarding Magisk backups, could you help a bit with few doubts?

First, I did do long searches in the Magisk repository, but still unable to figure out: when using the app UI for patching, like normal, in which moment the /data/magisk_backup_<SHA1>/boot.img.gz is created? Before or after doing the image patching? Or even later, at the moment of flashing?

Also, in PF, stock_boot.img is copied to /data/adb/magisk/stock_boot.img if rooted. In order for Magisk to be able to restore to stock boot.img from the app like normal, you just run run_migrations() function -again, if rooted- from util_functions.sh, right?

Thanks again.
[Magisk] badabing2003:
When patching from the app instead and not rooted, the patch process cannot create a backup in /data/magisk... as it needs root, so the backup is created upon reboot (assuming that the system is rooted on next reboot)

However if you're rooted, the backup is created on next restart of the app also.

With PF, when rooted but are using the app, at the end, stock_boot.img is copied to /data/adb/magisk/stock_boot.img and run_migration() is called to create backup, yes from the util_functions.
[Magisk] pndwal:
Wow... Launched w/ Android 4.0.3 (Ice Cream Sandwich)!...

Sorry I hadn't answered this till now as others had responded...

To clarify, why were you trying from custom recovery? (That's only for initial root generally)... Was in-app Direct Install to update failing also?

And guess you mean Magisk Installed on home screen gave N/A?...

Well .zip from TWRP should still work for your legacy device and still give you an Installed version, not N/A... Then taking in-App Direct Install should be all you need to fix the previous partial install...

Packing.img file as .tar for Odin flashing and flashing .img file from TWRP have already been covered by others above...

However I suspect you may really still have root (at least partial since you used TWRP/.zip)... Did you have Magisk app hidden by Hide the Magisk app function?... If so you'd see Installed: N/A in new App as original hidden app is competing for access / conflicting... If that's the case, search device settings, Apps for original hidden App and uninstall it... New app should show as installed now and will probably prompt you to reinstall Magisk for complete installation... Do so using Direct Install or say if that doesn't work...

Also, out of interest since some old Sammy kernels have not been Zygisk compatible, are you able to activate Zygisk? 🙂 PW
[Magisk] pndwal:
Just saw this too...

You can't just rename file in either scenario above and expect it to work... Either approach above should work however if you properly repackage (tarball) the .img file as .tar, not simply change extension...

Eg. for first approach above, on PC you can simply transfer patched .img file to PC and open a Command Prompt/PowerShell window in the folder where you place it, eg as 'magiskpatched-boot.img', and TAR it by running tar -cvf magiskpatched-boot.img.tar magiskpatched-boot.img, then flash by clicking Odin "AP" button and loading the magiskpatched-boot.img.tar file before flashing... I put info on this here:

https://xdaforums.com/t/discussion-magisk-the-age-of-zygisk.4393877/post-88213805

... I believe there are utilities for doing this on device also.

Not if you simply failed to remove a hidden Magisk App before manually installing another one (as I mentioned in post above)... Hidden stub app is obfuscated with different signing and random package name for obvious reasons, so an updated Magisk app won't see it as installed and won't remove it as it is essentially not an update to the same app... You need to remove it yourself...

If the reason for Magisk Installed = N/A was other, please say/give details...

🤠 PW
[Magisk] martyfender:
Magisk
[Magisk] pndwal:
🤔 .... Did I say that?... Anyway, yup, A6+ is now needed... A4.0.3 was launch version... Member is running A9... 🙂 PW
[Magisk] xdaroot1nox:
Hello guys,

I am currently facing a challenge in running my banking applications on the Nox emulator, and I am in need of your expertise to resolve this issue. I have already installed Magisk Delta, along with the following modules:

MagiskHide Props Config

Shamiko

Universal SafetyNet Fix

Zygisk - LSPosed

Despite implementing the suggestions found on this forum and ensuring that everything appears to be functioning properly, I am still experiencing crashes when initiating applications that have been added to MagiskHide. The Emulator should also be hidden, not only the root.

In light of this, I am willing to offer a compensation ranging from $100 to $1,000, depending on the complexity of the task at hand. If you are interested in providing assistance, please feel free to respond to this message or reach out to me via direct message. I am open to communication through chat or remote desktop support, such as AnyDesk.

Your prompt attention and expertise in this matter would be greatly appreciated.
[Magisk] martyfender:
No but he mentioned that he was trying to update the Magisk 26, I thought?
[Magisk] pndwal:
Yup... But should be no problem w/ Android 9... 🙃 PW
[Magisk] kevinco1:
If you have Shamiko installed, you aren't using Magisk Delta. And offering a reward? Thought I've seen everything...

If you are for real, then you should seek help from Nox support channels. I'm not sure how successful you will be trying to hide apps in an emulated environment vs just using a rooted device
[Magisk] xdaroot1nox:
yes I have shamiko (not the uptodate version) installed, and using Magisk Delta. Why I shouldnt offer a reward, whats wrong with that? Thank you for the hint to ask Nox Support, but I would like to search also here for support :)
[Magisk] ctcx:
Given this line, you'd need $SHA1 variable already defined, however it is not just in the run_migrations() functions alone. Where do you get it?

Thanks again.
[Magisk] badabing2003:
No, those are local variables,
[Magisk] ctcx:
The LOCSHA1 one is indeed local, but I meant the SHA1 variable; try seeing again the line I tried to link...
[Magisk] badabing2003:
It gets set when you run patch_boot.sh, here, and here.
[Magisk] sab009:
I did exactly as you explained. but it didn't work. I mean that flashing the patched boot image was successful but in the app it shows INSTALLED = N/A
[Magisk] zgfg:
Are you sure you did not do Hide Magisk App from your previous version of Magisk?

In that case new Magisk would be properly installed but its new Magisk app will not see.,. and you would have to manually find and uninstall the old renamed/repackaged Magisk app

Test from Terminal emulator:

magisk -c

(if Magisk is installed, it will show its version - no matter if Magisk app finds Magisk or not
[Magisk] sab009:
I used to do via custom recovery method because I couldn't boot the device into fastboot mode ( it has ONLY got Odin mode ) and couldn't flash the patched boot image.

now the only way that I've got in magisk 26 is PATCHING THE BOOT IMAGE. I can patch the boot.img but I can NOT flash it.

when you said "in-app direct install" did you mean patching the image? cause magisk 26 has only got patching the image option.

when I said that I don't have root access I meant that in magisk app "INSTALLED = N/A"

I didn't hide the app.

by the way I did patching-boot-image method for my other device ( sony xperia z2 D6503 running Lineage OS 18.1 android 11). by saying that I mean I've done this method many times before and it worked but for my tablet it didn't.
[Magisk] andrew2432:
Same method as v8? Activate hide and reboot?

Edit: still use v8? Can't find 9 in the threads
[Magisk] topjohnwu:
[MENTION=1162986]Captain_Throwback[/MENTION] is my beta tester and support thread helper, he knows everything :)

It'll be released soon, requires some final touches, and I'll have some sleep now lol
[Magisk] :
Thanks a bunch. :)
[Magisk] NovaViper:
I tried Xposed from wanam but it ends up soft-bricking my phone.. Im on MM and my phone is Sprint. I haven't use Magisk before and yes, I have gone systemless with SuperSU. As far as using Xposed (the Waman version).. I got a feeling its an incompatibility with this ROM im using, I'm using the Renegade ROM V7.0. I haven't tried systemless with this new ROM though, the ROM before was the Mostly Stock (I had this ROM when I was trying to root Xposed.. I can't remember though if I had this when I got Xposed working though, I had been switching between the ROMs since the Renegade ROM version I was using before kept bricking my phone and making it lose mobile data). Whenever I get the chance, I'm going to try systemless Xposed with Magisk
[Magisk] Iceyogurt:
There is no need to use the wanam version since it's not systemless and the magisk systemless version 86.6 is compatible with Samsung TouchWiz already.
[Magisk] NovaViper:
Oh, ok. But what about compatibility with the Renegade ROM? Would it still consider as the Samsung TouchWiz? (I do still have the launcher but I use NovaLauncher)
[Magisk] Artim_96:
I would consider it as TW based since I don't see anything about AOSP on their page. But that's not relevant since Magisk is build from the TW compatible version.
[Magisk] andrew2432:
The suhide/rootswitch method can't hide xposed if it's systemless!! Good to know the magisk one works with my terrible touchwiz!

How does one hide xposed with new magisk? Did magisk hide work to hide xposed previously? We are still waiting on sleepy topjohn to release v9 to the rest of peons :'(

[MENTION=7142895]NovaViper[/MENTION]:

Sr2 flashed over magisk apps and maybe even the zip dumb me...lost me all an data on boot. Twrped back and it had to reactivate but worked fine. When did you boot and notice no data?
[Magisk] Captain_Throwback:
One does not simply hide Xposed with Magisk.

Magisk has never hidden Xposed. There was a time when Magisk would unmount root which allowed Xposed to work for a while without detection, but that detection method was updated quite a while ago. Now, Magisk only hides itself and phh's Superuser Magisk module.

That's why people are using complicated setups with SuperSU, suhide, RootSwitch & xSetProp in order to hide Xposed and pass SafetyNet.

P.S. The next version of Magisk (v9) will not also require the use of the xSetProp module. It has an updated version of that code (now called "resetprop") built into it. Thanks again to [MENTION=2605798]nkk71[/MENTION] for the code base to help us out!
[Magisk] andrew2432:
Will magisk be able to prevent xposed detection then? Combining nkk17's code and your xset prop and the update? I like magisk because it's as you said...easier haha
[Magisk] nkk71:
nkk17 -> nkk71

xset prop -> resetprop

;)
[Magisk] NovaViper:
Whenever I booted, the device wouldn't start up at all (Tried with Mostly Stock ROM). But the mobile data lost came from the Renegade ROM, I used an outdated version of the ROM.
[Magisk] NovaViper:
I tried installing Magisk V8 via the manager but it ends up bootlooping my SM-G925P, I have the Renegade MM V7.0 ROM installed
[Magisk] Captain_Throwback:
No, it will not. resetprop has absolutely nothing to do with Xposed.
[Magisk] andrew2432:
Bootloader right? Is it possible the magisk/phh method can hide xposed? I would much much much rather use magisk for root

Must have been autocorrect...!!!!

:rolleyes:
[Magisk] Captain_Throwback:
I'm not sure how many more times I can answer your question.

Magisk doesn't hide Xposed. Period.
[Magisk] andrew2432:
Then does root switch work with magisk, how's that
[Magisk] Captain_Throwback:
No, it doesn't.

But Magisk doesn't need RootSwitch.
[Magisk] lioux:
Has anyone succeeded flashing Magisk zip on a Google Pixel phone?

I've successfully installed system SuperSU 2.78 SR3, then busybox within /su

I tried flashing Magisk using Flashfire but it just hard locks after trying to flash it on recovery. I can only access the phone after a 20 seconds power button press = hard reboot.

I'd rather keep everything systemless if possible. Specially avoiding any further partition flashing such as recovery.

Is this possible? :)
[Magisk] moriel5:
I don't think that Magisk supports Nougat yet.
[Magisk] sab009:
by the way I'm on android 9 Lineage OS 16 as you and other member were talking about.

I didn't just rename it. I converted the image file to tar file by the software called 7-zip.

is there something wrong with this way?

as I mentioned above I've never done the magisk hide function.

is your method ( command prompt method ) different from my method ( 7-zip ) for converting img to tar file?
[Magisk] sab009:
I've never done magisk hide function.

I flashed the rom again ( completely clean flash ) and did as you explained above.
[Magisk] zgfg:
And what does the magisk -c respond, can you provide the screenshot from Terminal
[Magisk] J.Michael:
Tell us more about how you got a ROM.

If the way you install your ROM is by taking a somerom.zip file, extracting four .tar files, then running Odin with the four .tar files named in input slots on the Odin screen:

You are supposed to install Magisk by using the Magisk manager app to patch the AP.tar file, then run Odin again, again specifying four .tar files in the Odin input slots -- except this time, you specify the patched-AP.tar file instead of the original AP.tar file.
[Magisk] sab009:
sorry. can you be more specific about that.

do you mean in a terminal emulator app ( like Termux ) I should type magisk -c command?
[Magisk] zgfg:
Yes, I said Terninal emulator
[Magisk] sab009:
no. it's not like stock samsung roms.

it's Lineage OS. ( does not have tar file in it. just boot.img )

First in TWRP I did a wipe on data ( factory reset ) and system

I flashed the Lineageos zip file ( downloaded from it's developer page in xda )

then flashed the Gapps.

I extracted the boot.img from lineageos.zip

patched the boot.img in magisk manager

but the device can NOT boot into fastboot mode ( it's only got Odin mode or download mode )

so I can NOT flash the boot.img
[Magisk] sab009:
it just says 'no command magisk found, did you mean command magick in package imagemagick'
[Magisk] Homeboy76:
Do su then magisk -c.
[Magisk] Homeboy76:
The command also works in Termux.
[Magisk] ctcx:
@badabing2003 :

Sorry, brief offtopic:

How do you normally extract the contents of an Android boot.img, and repack it again as well, in command line? Also, the same doubt for an Android apk...

Regarding the second, I normally use "unzip -d dir_name name.apk" command, but when trying to repack with "zip -r name1.apk dir_name/", I just don't get the same file (not even in size...)

Thanks again.
[Magisk] J.Michael:
I understand that you do not have fastboot.

Did you make any effort to "flash" the patched boot image?

If you have never "flashed" the patched boot image, then you have not installed Magisk.

I do not know what kinds of files your TWRP can "flash". If you installed the ROM by flashing a zip file using TWRP, and you got the boot image (which you later patched with the Magisk manager app) by extracting the boot image from the ROM zip file:

try making a copy of the ROM zip file, then, in the copy, replace the boot image with the magisk-patched-boot.img file. I think it is important to rename "magisk-patched-boot.img" to "boot.img", so that the only "boot.img" in the new zip file is the result of Magisk-patching. Then try flashing the new zip file in TWRP.
[Magisk] badabing2003:
magiskboot unpack | repack

Play with compression, make sure what you see at the root level in apk is also the same when you repack.

Sometimes you end up with an extra or missing directory level depending on how and where you run the zip command.
[Magisk] zgfg:
The attached script disk-dumps active slot Boot to the file, patches and disk-dumps back to the active slot Boot partition

That's basically the way how even Magisk does Direct install
[Magisk] Oldschool297:
I guess this only works on a unlocked phone? I can't unlock my Sony Xperia L3. What is the img file i should use and why?
[Magisk] badabing2003:
Is this something official from John? or custom written, I'm asking because simply calling patch_boot.sh to create a patch is not enough and proper flags need to be set.
[Magisk] J.Michael:
Have you used ZIP/UNZIP before?

I'm guessing "-d dirname" on "unzip" means "put extracted files in directory dirname".

You need to pay attention to the structure of the original archive file. When you type "unzip -l archivefile", does it show a leading directory on each file? Because I think what you showed, "zip newarchive dirname" would make every file in the new archive start with "dirname/" -- probably not what you want.

"zip" may have an option to "change directory before beginning". Or you can "cd dirname" and then "zip ../newarchive *"

Another option would be to make a copy of the archive, and then replace the few files you want to change.

You might not succeed in reproducing the original archive file this way. Another case of zip-file-by-another-name, epub, had to be built very carefully: the first few files inserted into the new archive *had* to be very specific files, to ensure that they would be the first files in the archive's directory.

Find a script that packages an apk.
[Magisk] J.Michael:
If you can't unlock your phone, you have no use for an image file.
[Magisk] zgfg:
I wrote it maybe two years ago and used myself many times for various Magisk versions, with no problem (recently I forgot and abandoned)

I don't need any VB Meta and so flags for my Xiaomi phones

One can use on his own risk (by understanding the shell commands to help himself if needed) or modify it by adding flags or playing with slots or to take it as an example

Usage: Magisk must be already installed (disk-dumping requires root) and Magisk app must be updated. Then execute the script from Terminal emulator with su (for those who maybe don't know, Termux is one of the many Terminal emulator apps available 😁)

Or I used to execute it directly from MiXPlorer (MiXPlorer must be granted root) by selecting the script and taking Execute option as on the screenshot

Btw, the main advantage for me was that I wanted to keep the patched boot img - the script leaves the just patched boot img in Download folder. On the other side, Direct install from Magisk app does not leave you the patched img file
[Magisk] sab009:
yes. I think it's got some root access.

when I typed su it wanted root permission.

when I typed magisk -c it shows 26.1 : magisk : R (26100)

why in magisk manager it says 'INSTALLED = N/A' ?

and why is SUPERUSER in magisk manager grayed out?