Magisk General Support / Discussion

Search This thread

pndwal

Senior Member
I am not having success installing Magisk v25.2 on my Samsung Galaxy Tab S MT-800. This used to run Android 6.0 OS. I updated the OS to Android 7.0 Nougat. I have installed Magisk and followed the instructions to create a patched boot.img file. I have copied the patched file on my PC. I have ODIN on my PC and TWRP on Tab S.

i can get ADB to recognize my device but fastboot simply returns <waiting for device> on my PC.
Not a Sammy user, but I know many older Sammy devices had a fastboot mode (eg Galaxy Note 8, Kona)... However it seems many use their own Download (Odin) mode also; perhaps after updates(?)... Newer Sammy never had traditional fastboot mode.

So it could be a driver issue, but if Odin is working, that should work for Magisk. So should renaming Magisk .apk package to .zip and installing via recovery on legacy ramdisk devices at least.
Am assuming fastboot does not work with Samsung TAB S running Android 7 Nougat.

I tried flashing the patched boot.img via TWRP with no success.

Tried ODIN with no success :
AP: boot.img.tar (patched boot file)
Bit confusing... Did you patch discrete boot.img or whole AP binary?

Recommend you patch complete AP (transfer using ADB pull, NOT MTP), then reboot to download mode, open Odin and flash magisk_patched.tar as AP, together with whatever binaries you have of BL, CP, and HOME_CSC. - I'm guessing you won't have them all on your older device. Nb. If you use CSC instead of HOME_CSC, you'll fully wipe/data.
ODIN ran successfully.

Reboot and open Magisk i still see the following:
Magisk
Installed N/A
Zygisk: No
Ramdisk Yes
Nb if you previously had Magisk hidden (Hide the Magisk app), you may find new App simply can't see Magisk due to competing apps; check in device settings, Apps for old hidden app ('settings' or whatever you named it) and uninstall it if found...
App
Latest 25.2 (25200) (33)
Installed 25.2
Package com.topjohnwu.magisk

looking for guidance. I do not see the Superuser or any other capability available to hide root for apps.
Hope this helps... PW
 

13Sullo80

Member
Aug 6, 2022
9
2
Not a Sammy user, but I know many older Sammy devices had a fastboot mode (eg Galaxy Note 8, Kona)... However it seems many use their own Download (Odin) mode also; perhaps after updates(?)... Newer Sammy never had traditional fastboot mode.

So it could be a driver issue, but if Odin is working, that should work for Magisk. So should renaming Magisk .apk package to .zip and installing via recovery on legacy ramdisk devices at least.

Bit confusing... Did you patch discrete boot.img or whole AP binary?

Recommend you patch complete AP (transfer using ADB pull, NOT MTP), then reboot to download mode, open Odin and flash magisk_patched.tar as AP, together with whatever binaries you have of BL, CP, and HOME_CSC. - I'm guessing you won't have them all on your older device. Nb. If you use CSC instead of HOME_CSC, you'll fully wipe/data.

Nb if you previously had Magisk hidden (Hide the Magisk app), you may find new App simply can't see Magisk due to competing apps; check in device settings, Apps for old hidden app ('settings' or whatever you named it) and uninstall it if found...

Hope this helps... PW
Thx for the note. I never had Magisk on the tablet.

I just flashed boot.img. I also pulled the patched image via MTP vs ADB.

Given this is a custom OS. How do I pull AP BL and CP?

Steps:
1. Pull the patched boot.img via ADB
2. What else should I pull and the command I should use?
3. Flash using ODIN via download mode

Thx
Not a Sammy user, but I know many older Sammy devices had a fastboot mode (eg Galaxy Note 8, Kona)... However it seems many use their own Download (Odin) mode also; perhaps after updates(?)... Newer Sammy never had traditional fastboot mode.

So it could be a driver issue, but if Odin is working, that should work for Magisk. So should renaming Magisk .apk package to .zip and installing via recovery on legacy ramdisk devices at least.

Bit confusing... Did you patch discrete boot.img or whole AP binary?

Recommend you patch complete AP (transfer using ADB pull, NOT MTP), then reboot to download mode, open Odin and flash magisk_patched.tar as AP, together with whatever binaries you have of BL, CP, and HOME_CSC. - I'm guessing you won't have them all on your older device. Nb. If you use CSC instead of HOME_CSC, you'll fully wipe/data.

Nb if you previously had Magisk hidden (Hide the Magisk app), you may find new App simply can't see Magisk due to competing apps; check in device settings, Apps for old hidden app ('settings' or whatever you named it) and uninstall it if found...

Hope this helps... PW
thx for the details. I do not have Magisk installed on the tablet.

I pulled patched boot.img via MTP vs ADB. Will pull using ADB.

I renamed the patched boot.img as boot.img.tar and used ODIN. Looks like that was wrong as well.

I need help to pull the right files from tablet for BL AP and CP. can you please help with the right commands and what to pull using ADB.
 

pndwal

Senior Member
Thx for the note. I never had Magisk on the tablet.

I just flashed boot.img. I also pulled the patched image via MTP vs ADB.

Given this is a custom OS. How do I pull AP BL and CP?
I wasn't aware this is custom ROM... 🤪

If you have package with images rather than Samsung binaries I'm guessing these should be fine; Sammy users could give better advice, but I think Odin can flash images... (??)
Steps:
1. Pull the patched boot.img via ADB
2. What else should I pull and the command I should use?
3. Flash using ODIN via download mode

Thx
I believe it should work...
thx for the details. I do not have Magisk installed on the tablet.

I pulled patched boot.img via MTP vs ADB. Will pull using ADB.
MTP is usually ok for small (image) files AFAIK; large (AP binary etc) files are often corrupted...
I renamed the patched boot.img as boot.img.tar and used ODIN. Looks like that was wrong as well.
I think that's likely... Will it flash as an image?... This could well have been your issue...
I need help to pull the right files from tablet for BL AP and CP. can you please help with the right commands and what to pull using ADB.
No, if traditional zip ROM archive, I think you just patch / flash boot.img as mentioned...

Also, there's no reason you shouldn't rename .apk archive to .zip and flash in TWRP on your legacy ramdisk device... This should work fine up to Android 9 if updates become available. (If updated to A10, Legacy ramdisk devices are converted to 2SI and new patch/flash installation is then recommended)...

If none of this helps, please give custom ROM details... 🙃 PW
 

J.Michael

Recognized Contributor
Jan 20, 2018
2,498
3,051
Samsung Galaxy Tab A series
@13Sullo80 If you want to flash a single image file in Odin, I think you should make a tar archive containing that one image file. Renaming is not the way.

The AP, BL, CP, and CSC tar files are the way we've seen Samsung ROMs packaged. You won't find them on the phone.

How did you get this custom ROM? What assortment of files? How did you install it?

Installing a Magisk-patched system should follow the same pattern as the installation of the unpatched system.

Find the forum that deals with the ROM. And the forum that deals with the phone. If you are lucky, there is some overlap.
 

13Sullo80

Member
Aug 6, 2022
9
2
Not a Sammy user, but I know many older Sammy devices had a fastboot mode (eg Galaxy Note 8, Kona)... However it seems many use their own Download (Odin) mode also; perhaps after updates(?)... Newer Sammy never had traditional fastboot mode.

So it could be a driver issue, but if Odin is working, that should work for Magisk. So should renaming Magisk .apk package to .zip and installing via recovery on legacy ramdisk devices at least.

Bit confusing... Did you patch discrete boot.img or whole AP binary?

Recommend you patch complete AP (transfer using ADB pull, NOT MTP), then reboot to download mode, open Odin and flash magisk_patched.tar as AP, together with whatever binaries you have of BL, CP, and HOME_CSC. - I'm guessing you won't have them all on your older device. Nb. If you use CSC instead of HOME_CSC, you'll fully wipe/data.

Nb if you previously had Magisk hidden (Hide the Magisk app), you may find new App simply can't see Magisk due to competing apps; check in device settings, Apps for old hidden app ('settings' or whatever you named it) and uninstall it if found...

Hope this helps... PW
Thx for the note. I never had Magisk on the tablet.

I just flashed boot.img. I also pulled the patched image via MTP vs ADB.

Given this is a custom OS. How do I pull AP BL and CP?

Steps:
1. Pull the patched boot.img via ADB
2. What else should I pull and the command I should use?
3. Flash using ODIN via download mode

Thx
I wasn't aware this is custom ROM... 🤪

If you have package with images rather than Samsung binaries I'm guessing these should be fine; Sammy users could give better advice, but I think Odin can flash images... (??)

I believe it should work...

MTP is usually ok for small (image) files AFAIK; large (AP binary etc) files are often corrupted...

I think that's likely... Will it flash as an image?... This could well have been your issue...

No, if traditional zip ROM archive, I think you just patch / flash boot.img as mentioned...

Also, there's no reason you shouldn't rename .apk archive to .zip and flash in TWRP on your legacy ramdisk device... This should work fine up to Android 9 if updates become available. (If updated to A10, Legacy ramdisk devices are converted to 2SI and new patch/flash installation is then recommended)...

If none of this helps, please give custom ROM details... 🙃 PW
thx for all the help. I gave up on the custom OS.

Used TWRP to install LineageOS and Magisk. Now the app installs successfully.

Now on to figuring how to configure Magisk to ensure safetyNet passes.
 
  • Like
Reactions: pndwal

ipdev

Recognized Contributor
Feb 14, 2016
2,546
1
5,159
Google Nexus 10
Nexus 7 (2013)
@pndwal Have you ever seen an MTP transfer corrupt a file, or are you just repeating the advice I have seen elsewhere?

I always used Windows Explorer to transfer files. I checked the md5sum at both ends, never saw a mismatch.
Years ago, I had some corruption issue with MTP and a Kindle Fire 7(?) using MacOS.
Since then I have just used adb to push and pull using Linux, Mac, and Windows.

I might test the MTP connection for a device but, that is about it.
twrp-3.6.2_9-0
- MTP works.
- OTG works.

twrp-3.6.2_9-1
- MTP is broken.
- OTG works.

So it looks like the fix for adb sideload breaks MTP.

Cheers. :cowboy:
 
Last edited:

ipdev

Recognized Contributor
Feb 14, 2016
2,546
1
5,159
Google Nexus 10
Nexus 7 (2013)
@13Sullo80
Not a Sammy guy per say but, I have played with them though the years. 🙃
Most recently I found a SM-580 tablet for my brother a few months ago.

After wiping and updating it.
I unlocked it and used odin to install TWRP.

From there I used TWRP to install an unofficial lineage 19.1 and OpenGApps.
Once booted, I installed the Magisk app and patched the lineage boot image (pulled from the lineage zip file).

Rebooted into recovery (TWRP) and flashed the magisk_patched boot image.
Update Magisk by the direct install option.

When it is time for a ROM update..
- Pull the new boot image and patch it.
- Update rom and flash the new magisk patched boot image in TWRP.

Not sure if this works on newer Samsung or when running a stock Samsung rom.

What do you think @pndwal ?

Cheers. :cowboy:
 
Last edited:
  • Like
Reactions: 73sydney and pndwal

pndwal

Senior Member
@pndwal Have you ever seen an MTP transfer corrupt a file, or are you just repeating the advice I have seen elsewhere?

I always used Windows Explorer to transfer files. I checked the md5sum at both ends, never saw a mismatch.
Yes, I tried to help several (3?) members here who confirmed that various issues disappeared (sometimes corrupted image would flash, sometimes not) after using ADB pull... The first couple of times the members themselves found the fix; I hadn't thought of it...

I only know it's common w/ Sammy's large binaries however; don't recall similar reports for other devices. 😉 PW
 
Last edited:
  • Like
Reactions: J.Michael and ipdev

ipdev

Recognized Contributor
Feb 14, 2016
2,546
1
5,159
Google Nexus 10
Nexus 7 (2013)
Shifting the discussion to this thread.
So whole a bit off topic, but kinda still on topic as I'm desperately trying to get this to work and refuse to give up...

I just discovered the app 'rootbeer sample'

View attachment 5679855
...is this an issue?=
Are you enforcing Magisk's Denylist or not enforcing and using a module like Shamiko to hide root?

Add RootBeer to Magisk's Denylist.
That should hide most (or all) from RootBeer.

If you are enforcing Magisk's denylist, there might be a few other processes that you will also need to add to the Denylist.

Cheers. :cowboy:
I've tried to both the module and enforce, same results.

We will need to know your setup to help more.
Pixel 6, stock Google (July) rooted with Magisk.
A personal snapshot build, normally a few commits ahead of canary.
Zygisk is active and Denylist is not enforcing.

Modules:
BusyBox
MagiskHide Props Config
Nano
Shamiko
Systemless Hosts
Universal SafetyNet Fix
Slightly modified (WIP) testing version.​
Zygisk - LSPosed

Cheers. :cowboy:

Edit:
Attach ScreenShots.
 

Attachments

  • Screenshot_20220807-162151.png
    Screenshot_20220807-162151.png
    142.3 KB · Views: 49
  • Screenshot_20220807-162313.png
    Screenshot_20220807-162313.png
    150.5 KB · Views: 47
  • Screenshot_20220807-162450.png
    Screenshot_20220807-162450.png
    162.5 KB · Views: 48
  • Screenshot_20220807-162535.png
    Screenshot_20220807-162535.png
    132.5 KB · Views: 45
  • Screenshot_20220807-162133.png
    Screenshot_20220807-162133.png
    132.2 KB · Views: 41
  • Screenshot_20220807-162216.png
    Screenshot_20220807-162216.png
    187.8 KB · Views: 43
  • Screenshot_20220807-162225.png
    Screenshot_20220807-162225.png
    188.9 KB · Views: 42
  • Screenshot_20220807-162251.png
    Screenshot_20220807-162251.png
    54.4 KB · Views: 40
  • Screenshot_20220807-162330.png
    Screenshot_20220807-162330.png
    123.8 KB · Views: 43
  • Screenshot_20220807-162357.png
    Screenshot_20220807-162357.png
    186.7 KB · Views: 41
  • Screenshot_20220807-162519.png
    Screenshot_20220807-162519.png
    122.6 KB · Views: 50
Last edited:
  • Like
Reactions: Eng.Raman

13Sullo80

Member
Aug 6, 2022
9
2
Yes, I tried to help several (3?) members here who confirmed that various issues disappeared (sometimes corrupted image would flash, sometimes not) after using ADB pull... The first couple of times the members themselves found the fix; I hadn't thought of it... I only know it's common w/ Sammy's large binaries however; don't recall similar reports for other devices. 😉 PW
My next area of help is safetyNet failure with LineageOS 14.1 ROM

1. Have Magisk setup and hidden
2. Have downloaded UniversalSafetyNet fix and it shows under modules in Magisk
3. YASNAC fails Basic Integrity and CTS checks.

Have reviewed the posts but not able to fix. Is this ROM so old that I cannot get it to pass?
 

pndwal

Senior Member
Last edited:
  • Like
Reactions: ipdev

pndwal

Senior Member
My next area of help is safetyNet failure with LineageOS 14.1 ROM

1. Have Magisk setup and hidden
2. Have downloaded UniversalSafetyNet fix and it shows under modules in Magisk
3. YASNAC fails Basic Integrity and CTS checks.

Have reviewed the posts but not able to fix. Is this ROM so old that I cannot get it to pass?
Search in USNF thread for USNF mod from @Displax and install it... Is spoofs a very old fingerprint that should kill two birds; 1) need for fingerprint / security patch date matching in custom and other uncertified ROMs (always in official LOS due to their policy not to alter expected signals), and 2) new Play Integrity MEETS_DEVICE_INTEGRITY failure.

Traditional solution for CTS Profile match in official LOS etc was to configure a passing fingerprint/patch date combination using MHPC module, but this shouldn't be needed w/ @Displax modded USNF... PW
 
  • Like
Reactions: J.Michael and ipdev

pndwal

Senior Member
Years ago, I had some corruption issue with MTP and a Kindle Fire 7(?) using MacOS.
Since then I have just used adb to push and pull using Linux, Mac, and Windows.

I might test the MTP connection for a device but, that is about it.
Ahh!
twrp-3.6.2_9-0
- MTP works.
- OTG works.

twrp-3.6.2_9-1
- MTP is broken.
- OTG works.

So it looks like the fix for adb sideload breaks MTP.
So ..9-1 fixed adb?... (It isn't self-evident). PW
 
  • Like
Reactions: ipdev

pndwal

Senior Member
@13Sullo80
Not a Sammy guy per say but, I have played with them though the years. 🙃
Most recently I found a SM-580 tablet for my brother a few months ago.

After wiping and updating it.
I unlocked it and used odin to install TWRP.

From there I used TWRP to install an unofficial lineage 19.1 and OpenGApps.
Once booted, I installed the Magisk app and patched the lineage boot image (pulled from the lineage zip file).

Rebooted into recovery (TWRP) and flashed the magisk_patched boot image.
Update Magisk by the direct install option.

When it is time for a ROM update..
- Pull the new boot image and patch it.
- Update rom and flash the new magisk patched boot image in TWRP.

Not sure if this works on newer Samsung or when running a stock Samsung rom.

What do you think @pndwal ?

Cheers. :cowboy:
Looks good to me... I'm a bumbling advisor... Only ever owned one (old) Sammy...

Not sure (guessing all the way actually) about newer devices either (especially where patching of other partitions is done and other caveats discussed by John apply), but I think your advice is pretty safe for Android 7 etc. 😛 PW
 
  • Like
Reactions: ipdev

ipdev

Recognized Contributor
Feb 14, 2016
2,546
1
5,159
Google Nexus 10
Nexus 7 (2013)
Ahh!

So ..9-1 fixed adb?... (It isn't self-evident). PW
OT for this thread but..
The update to TWRP 3.6.2 broke adb sideload and partitions formatted with fastboot were not recognized by TWRP, when using newer/current versions of Platform Tools.
The fix (9-1) for adb sideload (using newer builds of Platform Tools) was a revert of a previous commit.
Can you please test if MTP works ?

Remember some issues .. and the reason for changing the USB product / vendor ID in recovery at this time.
The revert fixed adb sideload but broke MTP. 😥
So currently, we have to use older adb/fastboot builds to be compatible with TWRP 3.6.2.
Note:
Platform-Tools r27.0.1 (December 2017) seemed to be the safest to use at the moment.
You can download an older release of platform-tools by adjusting the official download link to the release you want.

Cheers. :cowboy:
 
Last edited:
  • Like
Reactions: rodken and pndwal

pndwal

Senior Member
OT for this thread but..
The update to TWRP 3.6.2 broke adb sideload and partitions formatted with fastboot were not recognized by TWRP, when using newer/current versions of Platform Tools.
The fix (9-1) for adb sideload (using newer builds of Platform Tools) was a revert of a previous commit.
Can you please test if MTP works ?

Remember some issues .. and the reason for changing the USB product / vendor ID in recovery at this time.
The revert fixed adb sideload but broke MTP. 😥
So currently, we have to use older adb/fastboot builds to be compatible with TWRP 3.6.2.
Note:
Platform-Tools r27.0.1 (December 2017) seemed to be the safest to use at the moment.
You can download an older release of platform-tools by adjusting the official download link to the release you want.

Cheers. :cowboy:
mmm.

Pertinent for Sammy users...

... but even if MTP can work partially with errors after bad TWRP install (guess that's what you're saying), it seems that MTP corruption is still likely even w/o TWRP w/ large files... But I guess it's still possible all affected users had TWRP... Just never saw this connection... PW
 

ipdev

Recognized Contributor
Feb 14, 2016
2,546
1
5,159
Google Nexus 10
Nexus 7 (2013)
mmm.

Pertinent for Sammy users...

... but even if MTP can work partially with errors after bad TWRP install (guess that's what you're saying), it seems that MTP corruption is still likely even w/o TWRP w/ large files... But I guess it's still possible all affected users had TWRP... Just never saw this connection... PW
No connection to anyone/anything.

I only noted it as another example of MTP failing and only with (recovery) TWRP.
The device in question is not a Samsung device.
Rather the one Google is trying hard to forget. 🙃

Once the device is running in system..
I never checked if the unofficial lineage 19.1 build has working MTP.
I got pulled into testing TWRP for the device. 😛

Cheers. :cowboy:
 
  • Like
Reactions: pndwal

zyhk

Senior Member
May 9, 2020
243
100
Hi, there. I don't know here is the right thread or not.

Is there anyone knowing how to write "sepolicy.rule" with respect to a property in a magisk module?

There is a bug only on A12 that "modules.usbaudio.audio_hal" via "AudioALSAHardware" cannot find a property "ro.audio.usb.period_us" (a tunable for the USB buffer size). I'm thinking a workaroud for this bug by writing a sepolicy.rule now. Although only for MTK Dimensity devices on A12 there is another way to reset the USB buffer size, i.e., by using a property "vendor.audio.usb.out.period_us", for other devices there isn't such a property.

Logcat output:
Code:
D/AudioALSAHardware(880): -setParameters(): card=1;connect=67108864;device=0
I/AudioFlinger(6037): openOutput() this 0x7d15455000, module 26 Device type:0x4000000,@:card=1;device=0;, SamplingRate 0, Format 00000000, Channels 0, flags 0
D/modules.usbaudio.audio_hal(880): [USB_AUD] adev_open_output_stream
W/libc    (880): Access denied finding property "ro.audio.usb.period_us"
I/AudioFlinger(6037): HAL output buffer size 480 frames, normal sink buffer size 1920 frames
I/AudioFlinger(6037): AudioFlinger's thread 0x7d1160bd80 tid=8677 ready to run
D/modules.usbaudio.audio_hal(880): [USB_AUD] out_standby
Although people here don't have any interest any more, I succeeded in making the ALSA hardware driver on A12 to read "ro.audio.usb.period_us" property by replacing this property string in a USB related library with "vendor.audio.usb.perio". The ALSA driver on A12 cannot read "ro.audio.*" properties, but can "vendor.audio.*" ones because of SELinux enforcing and its rules.

If you like, try my magisk module audio misc. settings with a USB DAC and popular music streaming apps.
 
  • Like
Reactions: J.Michael

jm1981

Senior Member
Dec 17, 2007
104
7
Strasbourg
Hello,
I ran recently magisk app on my tablet and it showed me there is a new version.
So I downloaded it :)
I updated magisk app to 25.2 and when I launched it, it crashed with only a small message : [xxxxx] failed to get root access
And app is uninstalled...
Could someone please help me ?
 

Top Liked Posts

  • 1
    UPDATE: I got it to work by extracting and flashing the stock boot.img and recovery.img via odin. I guess that's a dirty fix and IDK why this worked and flashing the whole stock rom didn't
    If you flashed a stock ROM, you effectively uninstalled Magisk, except for the /data/adb directory.
    Ii'll check that folder (if I can install TWRP or something) in order to clean up, but my goal now is to reroot it.
    Did the flashing of the stock ROM involve doing a "factory reset / wipe data"?
    No, but, I did one factory reset from Android's configuration menu in order to clean up, set up the phone and debloat it (I bought it used). It worked afterwards but I screwed up when debloating so then I did the stock rom flash.
    If you have a problem after trying to reinstall Magisk, the things to check are:
    • did you patch and flash the right file?
    • did you change the version of Magisk?
    • did you change the version of Android?
    I'll keep that in mind when I try to reroot.
    Thanks for your response!
    1
    UPDATE: I got it to work by extracting and flashing the stock boot.img and recovery.img via odin. I guess that's a dirty fix and IDK why this worked and flashing the whole stock rom didn't
    Keep in mind that official instructions still state:

    Important Notes​

    • Never, ever try to restore either boot, init_boot, recovery, or vbmeta partitions back to stock! You can brick your device by doing so, and the only way to recover from this is to do a full Odin restore with data wipe.
    • To upgrade your device with a new firmware, NEVER directly use the stock AP tar file with reasons mentioned above. Always patch AP in the Magisk app and use that instead.
    although I know many Sammy users have been able to recover from this mistake without wiping data... Seems you've put your finger on the working method for your device... Not sure if trick would work for any Samsung device however, but may be useful for others...

    Take care with upgrades in future! 😉

    Ii'll check that folder (if I can install TWRP or something) in order to clean up, but my goal now is to reroot it.
    If goal is to reroot, you can leave configuration as-is... Only modules that become incompatible with later Android versions may cause bootloop, but normally the previous Magisk configuration files are OK... If you want to force a configuration rebuild (restore clean Magisk, no modules, superuser list, DenyList etc) after installation, just delete everything in /data/adb after rooted with a root explorer and reboot; configuration files will then be rebuilt.

    🤠 PW
    1
    UPDATE: I got it to work by extracting and flashing the stock boot.img and recovery.img via odin. I guess that's a dirty fix and IDK why this worked and flashing the whole stock rom didn't

    Ii'll check that folder (if I can install TWRP or something) in order to clean up, but my goal now is to reroot it.

    No, but, I did one factory reset from Android's configuration menu in order to clean up, set up the phone and debloat it (I bought it used). It worked afterwards but I screwed up when debloating so then I did the stock rom flash.

    I'll keep that in mind when I try to reroot.
    Thanks for your response!
    I think you are confused. (I know I am.)

    You said you flashed the stock ROM. Then you said you patched and flashed, which implies that the device was running after flashing the stock ROM. So you never mentioned trying to recover from the bootloop by flashing the entire stock ROM. I believe it would have worked, you just didn't do it.

    The thing that needed to be fixed was the bootloop after patching and flashing. I listed the first few things that came to mind that would explain why you got a bootloop. Those are the things that you need to be careful of the next time you try to install Magisk.

    If you have never had Magisk installed, you can ignore everything that refers to a previous installation of Magisk. Your bootloop was probably a matter of patching and flashing the boot from a different version of the ROM. Or maybe it was patching the boot image when you need to patch the recovery image.

    When installing Magisk on a Samsung device, you should "patch" the entire AP.tar file. Magisk will patch three images within the tar file (assuming either the Recovery option is selected by default, or you specifically select it). Then you hand the patched AP.tar to Odin and everything in it gets "flashed". After you've gotten it working, if you're a glutton for punishment you can see if you can patch and flash less than the full AP.tar, but I think you still have to give a tar file to Odin.
    1
    I think you are confused. (I know I am.)

    You said you flashed the stock ROM. Then you said you patched and flashed, which implies that the device was running after flashing the stock ROM.
    My take: Neither worked...

    Flashing stock caused boot to Odin (download) mode with 'red errors' (because something in /data is set to accept patched vbmeta or other)... John W indicates factory reset may be needed to fix this but it ain't always so...

    Next, member patched AP (presumably on another device?), then flashed (with other binaries?) which failed... This was likely because selinux/module rule directory will be wrong in modern Magisk unless patching is done on the same device (with system booted)... It probably would have worked if pre 26.0 Magisk had been used for patching however, then simply Direct install taken to update to latest Magisk, but most users won't know this.

    Finally, extracting and flashing boot.img independently of AP worked as vbmeta (and/or other?) partition is presumably still patched (and needed) for (some?) Samsung devices (it's not for most other devices since major 2SI init refactoring in 25.0 however) and the previous failed patch/flash attempt (w/ Magisk patched AP) presumably achieved that...

    Ie. My best guess is that 1) stock /boot couldn't work with stock /vbmeta without full /data wipe, 2) 26.0+ /boot patched on a different device couldn't work with patched/vbmeta, but the combination of stock /boot and Magisk patched /vbmeta worked as stock /boot uses correct factory set selinux rules directory...

    Good luck or good management, this seems to have saved the day. 😜

    So you never mentioned trying to recover from the bootloop by flashing the entire stock ROM. I believe it would have worked, you just didn't do it.
    Well, member did that first, no?...
    The thing that needed to be fixed was the bootloop...

    ...Your bootloop was probably a matter of patching and flashing the boot from a different version of the ROM.
    Don't think so... Said "patched the stock ROM"... I think only patching of current AP / flashing via Odin was attempted(?)

    Initial bootloop (or rather, boot failure/soft brick) was clearly caused by "try(ing) to restore either boot... (without) a full Odin restore with data wipe"...
    Or maybe it was patching the boot image when you need to patch the recovery image.
    /recovery won't/can't/shouldn't be patched on that device as it launched with Android 10 so is 2SI and definitely has ramdisk in /boot (so Recovery mode option wouldn't even show)... However, maybe when patched on another device (as I presumed), if that happened to be an A-only device launched with Android 9 and Recovery mode was selected when patching, recovery.img in AP may have been patched erroneously and that would likely cause issues...
    When installing Magisk on a Samsung device, you should "patch" the entire AP.tar file. Magisk will patch three images within the tar file (assuming either the Recovery option is selected by default, or you specifically select it).
    Please say which 3... I believe only 2, if not 1(?)...
    Then you hand the patched AP.tar to Odin and everything in it gets "flashed". After you've gotten it working, if you're a glutton for punishment you can see if you can patch and flash less than the full AP.tar, but I think you still have to give a tar file to Odin.
    Not doing this is apparently what allowed stock boot image to work on Sammy previously hosting Magisk w/o wiping /data however. (Ie. to get patched /vbmeta + stock /boot and /recovery).

    ... But yes, I believe patching AP on another device using pre-26.0 Magisk (or any Magisk if it could have been done on the A12 itself) and flashing all binaries via Odin would probably have worked too.

    🤠 PW
  • 5
    I'm now having a problem hiding the TJW Magisk 27002 app ...

    I finally was able to resurrect my old Pixel 5. It's running stock A11 and was running TJW Magisk 26004 with no problem.

    The Magisk manager was showing that the upgrade to 27002 was ready for installation, and so I did the following:

    (1) Unhide Magisk
    (2) Update Magisk (27002 was listed)
    (3) After Magisk manager restarted, I did Direct Update to 27002, including reboot
    (4) Magisk 27002 indeed came up properly after reboot.
    (5) Tried to perform Hide The Magisk App.

    I entered the arbitrary name for hiding, and I clicked "OK". But the hiding never took place.

    I rebooted again, to see if perhaps that's necessary, and I repeated the hiding attempt by adding the same arbitrary name, and I again clicked "OK". But the hiding still didn't take place.

    I searched my device, and there is no app nor shortcut with that arbitrary name. I also tried other, different arbitrary names, but after clicking "OK", the hiding still didn't take place for any name I chose.

    What am I missing?
    Known issue. A fix has been merged. You can use the Debug app, revert back to 27001 or wait until 27003 is released.

    EDIT: Ninja'd 🙃
    4
    Direct Install with recovery mode checked worked for me. You were right.

    After I flashed wrong CSC firmware my baseband and EMEIs disappeared. Now I have updated bootloader and I cant to flash original CSC firmware anymore. Any ideas how to restore baseband, EMEIs or it is too late?
    Yep, I told you several times that you need Recovery mode (selected) for your Ramdisk=No device; instructions for this are also clear in official Installation Instruction page too, but apparently you have not been trying to follow official instructions, so it's no real surprise you've messed up firmware too... Please take *extra* care when modding as there are simply so many variables and pitfalls! 😬

    Are you flashing patched AP (Application Processor binary) along with all the other package binaries (X4?) for your S10+ (also in Magisk Installation page, Samsung section)??

    CP is Cellular Processor (Nb. Oft repeated references to CP as 'core processor' may be misleading) binary package (also referred to as Baseband Modem) so that should have fixed mismatched baseband etc... correct CSC (Consumer Software Customization; region, APN and carrier specific software packages/settings) and even BL (Bootloader) are most likely also important...

    Nb. BL doesn't always update bootloader version, but if later firmware has been flashed be aware that these can also cause anti-roll back version for bootloader to be incremented (in the event that an update patches serious vulns) so you original firmware may be blocked and you may need to use later packages only...

    If flashing latest complete firmware package via Odin doesn't fix your IMEI / baseband issues it may be that you've messed with partitions that contain unique device values in the past... You may need to ask in Galaxy, S10 or S10+ XDA forums for that. 🤠 PW
    4
    I'm now having a problem hiding the TJW Magisk 27002 app ...

    I finally was able to resurrect my old Pixel 5. It's running stock A11 and was running TJW Magisk 26004 with no problem.

    The Magisk manager was showing that the upgrade to 27002 was ready for installation, and so I did the following:

    (1) Unhide Magisk
    (2) Update Magisk (27002 was listed)
    (3) After Magisk manager restarted, I did Direct Update to 27002, including reboot
    (4) Magisk 27002 indeed came up properly after reboot.
    (5) Tried to perform Hide The Magisk App.

    I entered the arbitrary name for hiding, and I clicked "OK". But the hiding never took place.

    I rebooted again, to see if perhaps that's necessary, and I repeated the hiding attempt by adding the same arbitrary name, and I again clicked "OK". But the hiding still didn't take place.

    I searched my device, and there is no app nor shortcut with that arbitrary name. I also tried other, different arbitrary names, but after clicking "OK", the hiding still didn't take place for any name I chose.

    What am I missing?
    Known problem with 27002, the debug version doesn't have the problem with hiding, read back to see the discussion about it
    4
    Is the Magisk 27001 APK/zip still available anywhere? I'd like to downgrade, but I can only find 27000 on Github and 27002 via update. I don't want to go to Canary in case the mounting changes break anything, or Debug as I hear the extra logging etc. causes performance issues (correct me if I'm wrong).
    Only v27000 is Stable. (and Beta). v27001 and v27002 are Canary or Debug

    Set your Update Channel to Stable and you will see (just like you can see also on GitHub) that latest Stable is v27000, there was never Stable v27001 or v27002

    Generally, Stable is always Nx100

    So, you cannot downgrade to Stable v27001 but Canary v27001 should be just like Stable v27000 (same codebase). That's also the general policy, whenever Nx100 Stable is released, then immediately comes Canary Nx100 +1, on the same code-base

    Therefore, downgrade to Stable v27000 instead
    3
    Thanks for your reply.
    So I stay for the moment at Magisk 26.4 für my Xiaomi 14 Ultra. Because there is xiaomi.eu ROM for my phone available since 2 hours, I will flash this tomorrow und with the Module from Xiaomi.eu Team I do not need Playintegrity anymore.

    So do I understand correct, to hide root I should use Shamiko? Latest Shamiko can be found here https://github.com/LSPosed/LSPosed.github.io/releases correct?
    Since Xiaomi eu is a custom ROM, their devs made the injector, 'module' that tricks DroidGuard and injects the spoofs with no need for Magisk/root and Zygisk

    And as that, you achieve Device Integrity without the Magisk.
    But if you install Magisk, you have to hide Magisk and Zygisk by your own

    So yes, you can use Shamiko and it should work (I used that kind of setup at the beginning of this year, for like two weeks, with no problems)

    But then ask yourselves - what for do you need Magisk. If using like Viper4Android, useful LSPosed modules - then, yes

    If not, better uninstall Magisk and you will only have Xiaomi.eu injector. Btw, yes, it is rather injector than a module, it's full name is XiaomiEUInject

    Regarding the prints - there are now no more publicly available working prints, hence a vast majority of rooted users use the prints 'stolen' from the Xiaomi.eu injector. When Google bans them, both sides will be equally affected. And assuming that Xiaomi.eu team quickly publishes their new version of injector, (last time it was in a matter of hours) with the new prints, all those rooted users will jump again to their new prints from tha new injector (new version of PIF was published less than an hour upon the Xiaomi.eu injecto was updated)

    But if Google makes a slaughter like last time (now there are about 20 times less working prints than previously) and if Xiaomi.eu team does not come up (quickly) with the new injector (and the new working prints), than better don't think what could happen.
    Btw, Wallet can run about half a day on the cached previous Play Integrity pass

    Hence, with the Xiaomi.eu injector or with PI Fix (with its built-in prints), PI Fork with the corresponding autopif script, etc, you are equally exposed to the Google's mercy

    Therefore, if you really need Magisk, you can also keep using the PI Fix/For with the disabled Xiaomi.eu injector. It will be easier for your maintenance than to struggle with both worlds in parallel (although, that can work as well)
  • 1103
    This is the place for general support and discussion regarding "Public Releases", which includes both stable and beta releases.
    All information, including troubleshoot guides and notes, are in the Announcement Thread
    156
    Hello, I haven't given much support on XDA lately. It can be resulted from
    • University started and I have limited free time. In fact, I mostly develop during midnight
    • I live in Taiwan, which has large time zone differences between my European/American contributors/testers, which usually forces me to stay up late at night to discuss/test stuffs.
    • The new version is about to come, I don't want to spend effort on supporting old releases
    The planned update is delayed again and again, to some point I think I'll shed some light about what has been happening lately, also along with some announcements.

    New Forum!
    As you might have already discovered, Magisk got its own subforum on XDA! Many thanks to all the support you gave me, and much more information/features/support is about to come!
    **For developers supporting all the devices that are not using standard Android boot format, feel free to create threads in this section (actually, PLEASE do so) for your favorite devices after v7 is out. As I currently know, Asus devices require signing the boot image before flashing, and is model dependant; Sony devices seems to use ELF kernel that is unpatchable, or some has two ramdisks (inner + outer), both requires different workarounds; LG bootloader locked devices has to manually "BUMP" the boot image after flashing Magisk..... and there may be lots of other crazy boot image formats that haven't come up to my attention yet.
    It is impossible for me to support all these non-standard boot images, and I hope the community can collaborate to make Magisk running across all the devices. Overall, community collaboration is what XDA about :D

    The Pixel Phone
    Some of you might already know this news, that the next Pixel Phone right around the corner seems like it does not have ramdisk in boot image, which pretty much wrecked Magisk in all ways. However, it pretty much doomed root itself too. Kernel modifications is inevitable IMO, so I'll try to migrate my scripts to C programs that could possibly be included into the kernel itself. Note that I'm not familiar with linux kernel, I'm not even sure if my idea and concept is correct or not. But once the device is available, I think developers will find a way to bypass all the difficulties, and I'll do my best to learn things ;)

    Current Progress
    In the past month, I've spent quite some time learning SELinux, so that I can avoid using SuperSU's sepolicy patches. Thanks to the helps and tips from @phhusson and @Chainfire, I finally have a much clearer understanding of how SELinux works. The Magisk core parts (the scripts, boot image patches, new features, more supports) are actually done some time ago. What is causing all the delays is the Magisk Manager.
    To be completely honest, although I can code in Java without much issues, Magisk Manager is actually my first Android application, I had to reach out for assistance, and fortunately awesome developers like @DVDandroid and @digitalhigh contributed a lot, which makes the current Manager awesome.
    After the repo system and module management is mostly done, I was about to do some adjustments and release, but what we really done is decided to add another feature: auto-unroot with per-app settings. I decided to wait for it to be finished, and then do my adjustments. Due to reasons that'll be mentioned later, this feature will likely not be available for the next release (should come in future updates)

    Safety Net Disaster
    Those who are using Magisk for Safety Net bypass purposes must have known that Google recently updated the detection method of my Systemless Xposed. I still have no idea what Safety Net is detecting, so currently I cannot fix it on my side (also because I'm busy working on the next update). However, suhide developed by @Chainfire is able to hide Xposed and worked fine.
    However, only my Systemless Xposed v86.2, which is based on SuperSU's su.d, is supported using that method. v86.2 and v86.5 (latest, Magisk based) have nearly identical binaries, and the only difference is the path where the binaries are stored.
    I'm still not sure what's the real issue for it not being supported, I just hope it is not done intentionally.

    Conclusion
    Due to the fact that my Safety Net bypass is not 100% perfect now, I do not want to spend any more time waiting for auto-unroot to be polished. What I'm doing now is finishing up all the things I'd like to change in Magisk Manager (it has been a while since I last contributed to Manager, my fellow developers are doing all the heavy job), which might take a little more time, after that, packed with tons of information to be announced in Magisk Section, I'll release the long awaited update.

    Hope this lengthy post gives you the idea of the whole situation, and again thanks for all your support!!
    121
    Ah, some Chainfire bashing, I hope it is not too late for me to exercise additional villainy.

    First, let me make clear I have nothing against @topjohnwu, nor against Magisk. Magisk is an interesting project and it certainly displays @topjohnwu ingenuity and persistence. I don't doubt we will see more interesting things from his hands.

    -------------------------

    What has happened here is not all that dark and complicated, from either end. I returned from holidays, and someone pointed me at Magisk. My first thought: interesting!

    Among other things, the thread lists some issues with SuperSU, which in combination with the phrase The developer also requests users to not bug Chainfire with compatibility requests for SuperSU with Magisk from the portal article, raised my left eyebrow by nigh half an inch. The popular systemless xposed mod is apparently now based on it, and apparently it now no longer works with SuperSU, and apparently I'm not supposed to fix that, nor any of the other found issues. I found that a bit weird. So yes, I have told @topjohnwu that I was a bit surprised he was posting about issues with SuperSU without notifying me about them (I can't fix or help fix issues I'm not aware of, after all).

    He's also spreading a modified version of the SuperSU package, which is not all that uncommon, nor necessarily a problem. I have not looked into what he modified, I only ran a few quick tests on one of my devices, and found some commonly used commands run as root to be broken. I have informed him of this as well.

    It appears the tool of choice for Magisk is phh's Superuser, because of some of the mentioned issues with SuperSU. That's fine by itself, but fixing issues in that superuser by incorporating SuperSU's binaries into it is a somewhat questionable practise. After all, SuperSU is a commercial closed-source package that helps pay for my dinner, and superuser is a direct competitor. I have informed him that I was surprised he did this without asking for permission. I have expressed similar surprise on him spreading a modified version of LiveBoot (which helps pay for a snack now and then).
    @topjohnwu has also stated that Magisk's scripts are largely influenced by mine (I have not checked). Scripts based on mine are used all over the place on XDA, some people have crafted amazing things based on them, I have never made an issue of this (otherwise I would have just made them binaries). But yes, I have also stated to him that I don't think it's very nice to base something on one program, and then using that to (almost exclusively) push something directly competing with that program.

    tl;dr Towards @topjohnwu, I have:
    - expressed surprise he has issues getting Magisk to work with SuperSU, and has chosen not to inform me about those
    - expressed surprise he is using SuperSU binaries in a competing superuser without permission
    - expressed surprise he is posting a modified LiveBoot without permission
    - informed him of issues with the modified SuperSU he has posted
    - let him know I thought it wasn't very nice to be applying my scripts to benefit seemingly exclusively that same competing superuser

    To be crystal clear:
    - I have not asked for an apology
    - I have not asked for Magisk to be abandoned, neither the root hiding nor systemless module parts, and certainly not systemless xposed
    - I have not made an issue of any of this anywhere, until this post
    - I have not even specifically asked for anything to be taken down (though obviously in my opinion the other superuser package mixed with SuperSU's binaries, as well as the LiveBoot package, should go)
    - I have not reported this thread to XDA moderators for copyright violations or otherwise

    While my conversation with @topjohnwu may not win any awards for being friendly (though it may win some for brevity), I think all things considered my response has been rather mild. To be perfectly honest, until the apology post, I thought this was over with already. I think the apology post was triggered because I haven't replied to his last PM for a while - I was in the zone, it happens.

    To emphasize again, I have nothing against @topjohnwu, Magisk, or systemless xposed, and it is certainly not my goal to see any of them go. If it can be made to work together with SuperSU, great.

    I get it though: you think of something, you want to see if you can make it work, you finally get it to work, you publish it, it takes off - enthusiasm gets the better of you. Maybe in the rush some mistakes are made. That doesn't mean you have to just drop it and run. None of my stuff would make it past 0.1 if I stopped at the first big mistake :)

    Aside from said being in the zone coding, I usually regret actually responding to these sort of things the day after, which has made me hesitant to reply. Surprise me.
    76
    Thread temporarily closed so everyone sees this.

    The flood of "SafetyNet isn't working for me either!" posts are not helpful, at all. Please refrain from posting further, it will be looked into. Please do not forget that not passing SafetyNet is 100% NORMAL AND INTENDED when you have an unlocked booloader or running custom firmware. These are workarounds and they will be worked around in turn.

    The Flash
    Forum Moderator

    EDIT: Thread is reopened... I will be cleaning any SafetyNet posts for a while to keep the thread clean for real issues.
    75
    Hello everyone!

    I am aware that Google has updated Safety Net that makes Magisk itself a no go for Android Pay. In fact, I witnessed the change live while I am developing the new magiskhide, which should hide all Magisk modules and Magisk installed root.

    Google is serious about Safety Net now, clearly hunting down all possibility to run Xposed with Safety Net passed. I spend quite some time examining the new security measures last midnight, and fortunately it seems that it is possible to run Magisk and root along with Safety Net if no Xposed is running. I'm glad I removed the old root toggle at the right time lol, that is no longer feasible with the latest detection.

    So stay tuned for the next update, it will come with bug fixes, along with the new magiskhide to bypass that Safety Net.

    Google, how will a few systemless mods do any harm :p:p