Magisk General Support / Discussion

Search This thread

m0han

Senior Member
Apr 30, 2012
5,571
2,683
.... happened after I install the bootloop saver module..... root access gone including all modules. Then I reflashed the magisk. Still the same....
If you have a working TWRP, why don't you just delete that 'bootloop saver' module folder? If that doesn't work just flash the Magisk apk (or renamed zip file), provided you haven't already done that.

I doubt you have a patched file (or can patch one), since you don't have root ATM.

I'm sure the more knowledgeable folks here will advise you better on this.

p.s.: I see they already have.
 
  • Like
Reactions: podiwadda

Fry-kun

Senior Member
Actually, that's a good known trick, but I hadn't considered it for bypassing inbuilt Magisk downgrade prevention (Magisk daemon now checks App version as well as signing keys and will forcibly uninstall an app with different keys or older version)... I'm adding it mentally!...

The official way to use older or different builds is either to uninstall Magisk (ie. Mask/core, not App) or to install Debug build, both of which will disable version (and signature) checks allowing users to downgrade App etc and then take Direct install to install corresponding binaries (Mask/core)...

👍 PW

#rant
I understand preventing downgrades is usually desirable, but something like this is a lifesaver if you don't have access to a computer temporarily... From past bad experience I tend to delay magisk upgrades for the same reason.. and still have problems
 
Last edited:
  • Like
Reactions: HippoMan

podiwadda

Senior Member
Apr 24, 2012
197
50
Polonnaruwa
Xiaomi Mi Note 10
@podiwadda Is there any chance you used "hide the magisk app" to change the package name and then installed another Magisk app?

See if you have a file "magisk" in one of your bin directories (/bin, /xbin, /sbin, /system/?bin)
No I did not. Only the modules. By the way I found its not modules making it that way. When I try to add Google apps to set in deny list. That's what cause the issue.
 
  • Like
Reactions: ipdev and J.Michael

podiwadda

Senior Member
Apr 24, 2012
197
50
Polonnaruwa
Xiaomi Mi Note 10
If it happened after you installed a particular module, reinstalling or reflashing Magisk will not change/help since Magisk will always again find the problematic module in /data/adb/modules

If you have TWRP, use its Advanced File Explorer, go to that folder

and find there various subfolders,beach one corresponding to one of your modules

Recognize the subfolders by their names (should resemble module names)

Disable problematic module(s) by placing an empty or not file named disable into the particular
/data/adb/modules/<subfolder>
and reboot

Upon rebooting that module will be disabled

If you use the file name remove, that will uninstall/remove given folder

---

Alternatively use Android Safe Mode or adb - go to Magisk GitHub, Documentation, FAQ and read Q1:
Hey I did this . I mean I didn't fully understood this. But I removed everything saying "magisk and "bootloop" then phone restarted and root back as normal . I reflashed just to make sure. Btw I found out that modules not causing the losing root. It caused by setting play store in deny list
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,821
2,075
Samsung Galaxy Tab A series
No I did not. Only the modules. By the way I found its not modules making it that way. When I try to add Google apps to set in deny list. That's what cause the issue.
Still not a reasonable sounding problem. I have never heard of adding something to the deny list causing the loss of root. Unless maybe you added 1000 things to the deny list, and the Play Store was one too many.

Will you please check to see if the file "magisk" is still in one of your "bin" directories. Then try running it from a command prompt.
Assuming you're interested enough to recreate your problem.

EDIT: OK, I take it back, I guess if you put the Magisk manager app in the deny list, it will look like Magisk is no longer running.
 
Last edited:

shoey63

Recognized Contributor
. . . found a YT video that explains you can download the APK, rename to .zip, and install it as a module. Hopefully that works 😯
Not only does it work, but if you take a few extra steps, you can make a 100% clean install of ANY Magisk version or fork without PC or TWRP.
Here's how I do it :-

- Download Magisk version/fork you want to try
- Add .zip to the end of the Magisk apk eg: Magisk.apk becomes Magisk.apk.zip
- Unhide the Magisk app if you have hidden/renamed it
- Turn on aeroplane mode
- Delete /data/adb/Magisk folder and /data/adb/magisk.db file
- In Magisk app, perform Uninstall Magisk - RESTORE IMAGES so you are back on stock boot image
- Install the new Magisk.apk.zip as a module
- Change Magisk.apk.zip back to Magisk.apk
- Uninstall the Magisk app (the apk only NOT Magisk itself)
- Reboot
- Install the new Magisk.apk
- Open it up and check settings and modules and customise to your needs eg: zygisk may need to be re-enabled and deny list reconfigured
- Reboot again and turn off aeroplane mode

You will now be on a new clean install of whatever Magisk you are trying. No loss of root or modules and no need to clear data from play services to re-enable wallet (assuming it worked before and you set everything up properly)
Only thing left to do is grant root to whatever apps need it.
 

ctcx

Senior Member
Jan 16, 2013
269
87
As part of the "learning" process, I downloaded current Magisk 25.2 apk and manually unzipped it, then compared the included boot_patch.sh with the current one here
and noticed the first one may be few commits behind.
Notably, apk one still lacks PATCHVBMETAFLAG and RECOVERYMODE flags; despite this, when patching with the app it does show a possible option "Patch vbmeta in boot image".

If apk's script lacks that flag, how is it possible that it shows the option in the app?
 

badabing2003

Recognized Contributor
Sep 17, 2012
2,343
3,363
@pndwal

Question for you, I'm pretty sure you know the answer to this :)
I wanted to hand me down my Pixel 6 to my son, he wanted it rooted.
So I did the following.
  • Considering that it already had Magisk Canary 25206 installed, I patched the latest stock boot with it.
  • Flashed latest factory image with wipe option.
    • To both slots (inconsequential, but mentioning regardless)
    • Didn't reboot to system (used the flag to skip reboot)
    • Flashed the patched boot
    • reboot
The system booted normal, and was prompted with standard Google phone setup.
After the setup, I installed Magisk 25206 canary, matching what was in boot.
Upon launching Magisk, it told me that it needed to setup something, or something along those lines.
Zygisk was not active, and even though it was showing Magisk installed, the Install button was active.

I ignored the message, I figured I have the core and I also have the Manager, why do I need to do anything else.
Changed the settings, to enable Zygisk.
then tried to install a module, which failed with a message that Magisk installation is not complete.

Why did this happen, and what exactly Magisk had to do to be complete?
I proceeded with direct install, reboot
Zygisk was still disabled, then I enabled Zygisk and rebooted.
All was good after that.

Still would like to know what was missing.

Thanks
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,821
2,075
Samsung Galaxy Tab A series
As part of the "learning" process, I downloaded current Magisk 25.2 apk and manually unzipped it, then compared the included boot_patch.sh with the current one here
and noticed the first one may be few commits behind.
Notably, apk one still lacks PATCHVBMETAFLAG and RECOVERYMODE flags; despite this, when patching with the app it does show a possible option "Patch vbmeta in boot image".

If apk's script lacks that flag, how is it possible that it shows the option in the app?
What makes you say "apk one still lacks PATCHVBMETAFLAG and RECOVERYMODE flags"?

The implementation of a function in a program is separate from whether the program connects environment variables to the function.
 

zgfg

Senior Member
Oct 10, 2016
8,980
6,717
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11 Ultra
@pndwal

Question for you, I'm pretty sure you know the answer to this :)
I wanted to hand me down my Pixel 6 to my son, he wanted it rooted.
So I did the following.
  • Considering that it already had Magisk Canary 25206 installed, I patched the latest stock boot with it.
  • Flashed latest factory image with wipe option.
    • To both slots (inconsequential, but mentioning regardless)
    • Didn't reboot to system (used the flag to skip reboot)
    • Flashed the patched boot
    • reboot
The system booted normal, and was prompted with standard Google phone setup.
After the setup, I installed Magisk 25206 canary, matching what was in boot.
Upon launching Magisk, it told me that it needed to setup something, or something along those lines.
Zygisk was not active, and even though it was showing Magisk installed, the Install button was active.

I ignored the message, I figured I have the core and I also have the Manager, why do I need to do anything else.
Changed the settings, to enable Zygisk.
then tried to install a module, which failed with a message that Magisk installation is not complete.

Why did this happen, and what exactly Magisk had to do to be complete?
I proceeded with direct install, reboot
Zygisk was still disabled, then I enabled Zygisk and rebooted.
All was good after that.

Still would like to know what was missing.

Thanks
This is usual. It shall reboot one time and then you use it
 

shoey63

Recognized Contributor
. . .

Still would like to know what was missing.
Whilst you had the necessary ramdisk/boot image changes and the Manager apk installed, /data/adb had not yet had a chance to be populated with the required Magisk files, having just come off a factory reset.
This happens upon the next reboot, and I presume is done by the Magisk manager, once fully installed.
 

ctcx

Senior Member
Jan 16, 2013
269
87
Finally installed Magisk on an ocean (Moto) device with LOS 20.0. With Zygisk active, universal safetynet module, and adding the infamous banking app to deny list, app finally let run instead of complaining "device cannot be trusted, exit".

But there were big problems, which I describe in 2 separate posts.

First, trying "fastboot boot magisk_patched.img" did not work at all.
Fastboot output:
fastboot FAILED (remote: '') # yes, [B]nothing[/B] inside the simple quotes...
Bootloader logs:
incomplete boot image downloaded

I tried with su in PC console, "--set-active=b" just to be sure (albeit it's always slot b, and it already was), different platform-tools versions... NOTHING.

Why is this?
 
Last edited:

ctcx

Senior Member
Jan 16, 2013
269
87
The other problem was with patching boot.img via script.

In order to be able to use boot_patch.sh without root, these links were the ones:

So:
---Downloaded latest Magisk apk from Github
---Unzipped lib/arm64-v8a/{libmagisk64.so,libmagiskboot.so,libmagiskinit.so} and assets/{boot_patch.sh,util_functions.sh}
---Renamed the *.so removing the "lib" and ".so" parts
---Put original boot.img among all these files, and all of them in one single directory
---Pushed all of them to device's /data/local/tmp/tempdir
---Chmod all to 0755, except boot.img, which was 0644
---adb shell "cd /data/local/tmp/tempdir && ./boot_patch.sh boot.img

The patching was successful, but not so the flashing...

As mentioned in the above post, fastboot boot didn't work, so had to just directly fastboot flash boot.

The boot.img patched by Magisk app directly was ok.

The boot.img patched by scripting like described above, did flash, but did not boot. When LOS was trying to boot, it just ran the animated booting logo endlessly (boot loop?).
I hard reset, tried to flash the "good" patched img, or even original one... now fastboot command hanged with no response until hard resetting device...
In another try I got
error: Failed to identify current slot
Rebooted into LOS recovery, it said slot b was active (as always for this device).
Back into bootloader mode. Again ran fastboot --set-active=b. It already was set.
Then suddenly it let me again flash either the Magisk patched img or the original one.

One thing, since the very beginning, when flashing I always got these messages:
<bootoader> logical has-slot: slot_b not found writing boot_b image not signed or corrupted
However in the end everything went ok according to fastboot.

Do you happen to have an idea why I got these shenanigans when trying the "scripted" patching?
 

J.Michael

Recognized Contributor
Jan 20, 2018
1,821
2,075
Samsung Galaxy Tab A series
The other problem was with patching boot.img via script.

In order to be able to use boot_patch.sh without root, these links were the ones:

So:
---Downloaded latest Magisk apk from Github
---Unzipped lib/arm64-v8a/{libmagisk64.so,libmagiskboot.so,libmagiskinit.so} and assets/{boot_patch.sh,util_functions.sh}
---Renamed the *.so removing the "lib" and ".so" parts
---Put original boot.img among all these files, and all of them in one single directory
---Pushed all of them to device's /data/local/tmp/tempdir
---Chmod all to 0755, except boot.img, which was 0644
---adb shell "cd /data/local/tmp/tempdir && ./boot_patch.sh boot.img

The patching was successful, but not so the flashing...

As mentioned in the above post, fastboot boot didn't work, so had to just directly fastboot flash boot.

The boot.img patched by Magisk app directly was ok.

The boot.img patched by scripting like described above, did flash, but did not boot. When LOS was trying to boot, it just ran the animated booting logo endlessly (boot loop?).
I hard reset, tried to flash the "good" patched img, or even original one... now fastboot command hanged with no response until hard resetting device...
In another try I got
error: Failed to identify current slot
Rebooted into LOS recovery, it said slot b was active (as always for this device).
Back into bootloader mode. Again ran fastboot --set-active=b. It already was set.
Then suddenly it let me again flash either the Magisk patched img or the original one.

One thing, since the very beginning, when flashing I always got these messages:
<bootoader> logical has-slot: slot_b not found writing boot_b image not signed or corrupted
However in the end everything went ok according to fastboot.

Do you happen to have an idea why I got these shenanigans when trying the "scripted" patching?
What inspired you to remove the "lib" and ".so" parts?
 

pndwal

Senior Member
@pndwal

Question for you, I'm pretty sure you know the answer to this :)
I wanted to hand me down my Pixel 6 to my son, he wanted it rooted.
So I did the following.
  • Considering that it already had Magisk Canary 25206 installed, I patched the latest stock boot with it.
  • Flashed latest factory image with wipe option.
    • To both slots (inconsequential, but mentioning regardless)
    • Didn't reboot to system (used the flag to skip reboot)
    • Flashed the patched boot
    • reboot
The system booted normal, and was prompted with standard Google phone setup.
After the setup, I installed Magisk 25206 canary, matching what was in boot.
Upon launching Magisk, it told me that it needed to setup something, or something along those lines.
Zygisk was not active, and even though it was showing Magisk installed, the Install button was active.

I ignored the message, I figured I have the core and I also have the Manager, why do I need to do anything else.
Changed the settings, to enable Zygisk.
then tried to install a module, which failed with a message that Magisk installation is not complete.

Why did this happen, and what exactly Magisk had to do to be complete?
I proceeded with direct install, reboot
Zygisk was still disabled, then I enabled Zygisk and rebooted.
All was good after that.

Still would like to know what was missing.

Thanks
"Your device needs additional setup..." message is associated with env_fix, fixenv, EnvFixEvent etc routines in app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt and other files...

Seems it may be called for several reasons, but additional setup is generally needed where /data is wiped after Magisk is set up or a /data wipe is associated with an initial Magisk installation... For the reason that flashing CSC Odin binary necessarily wipes /data, this note is included in Installation Instruction for SAR+ Samsung devices:
  • Install the Magisk app you’ve already downloaded and launch the app. It should show a dialog asking for additional setup.
  • Let the app do its job and automatically reboot the device. Voila!

So the Magisk App simply detects the missing configuration files...

As @shoey63 indicates above this occurs "coming off a factory reset" and it can actually be reproduced simply by removing Magisk folder and .db from /data/adb while booted and opening app again...

Without digging into the code further this indicates to me that the 'Additional Setup' needs no special routines in this case, only a simple reboot to rebuild configuration files which happens automatically if they're missing anyway... Seems we just need two reboots after factory reset / data wipes simply because Magisk cannot build configuration in /data/adb until initial Android Setup is performed.

Since it seems that if you'd simply rebooted and done intial Android setup after
  • Flashed latest factory image with wipe option.
Instead of
  • Didn't reboot to system (used the flag to skip reboot)
and then
  • Flashed the patched boot
  • reboot
You would have avoided "Your device needs additional setup..." message.

... Also, regarding this:
I ignored the message, I figured I have the core and I also have the Manager, why do I need to do anything else.
Changed the settings, to enable Zygisk.
then tried to install a module, which failed with a message that Magisk installation is not complete.
it's not clear if you rebooted between enabling Zygisk and installing module... Doing that should have fixed the Magisk environment at that point... 🙂 PW
 
  • Like
Reactions: ipdev

pndwal

Senior Member
Whilst you had the necessary ramdisk/boot image changes and the Manager apk installed, /data/adb had not yet had a chance to be populated with the required Magisk files, having just come off a factory reset.
This happens upon the next reboot, and I presume is done by the Magisk manager, once fully installed.
Actually Magisk daemon does this even if App is not present... The App will (inconsistently) force the reboot however. 😉 PW
 
Last edited:
  • Like
Reactions: shoey63

Top Liked Posts

  • 2
    If I use Magisk 6.1 in my rom every app in denylist crashes.
    The rom is ViperOS, Android 7.1.1, latest security patch. The log is a follows:

    06-05 19:24:01.656 811 1572 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ideomobile.maccabi/.ui.splash.SplashActivity} from uid 10156 on display 0
    06-05 19:24:01.716 811 1839 I ActivityManager: Start proc 12403:com.ideomobile.maccabi/u0a123 for activity com.ideomobile.maccabi/.ui.splash.SplashActivity
    06-05 19:24:01.723 427 688 D AudioFlinger: mixer(0xb5983480) throttle end: throttle time(20)
    06-05 19:24:01.730 12403 12403 I Magisk : zygisk32: [com.ideomobile.maccabi] is on the denylist
    06-05 19:24:01.731 12403 12403 E Zygote : Unsupported st_mode 4480
    06-05 19:24:01.731 12403 12403 F art : art/runtime/jni_internal.cc:558] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:485: Unable to restat file descriptor table.
    06-05 19:24:01.755 12403 12403 F art : art/runtime/runtime.cc:422] Runtime aborting...
    06-05 19:24:01.755 12403 12403 F art : art/runtime/runtime.cc:422] Aborting thread:
    06-05 19:24:01.755 12403 12403 F art : art/runtime/runtime.cc:422] "main" prio=5 tid=1 Native
    06-05 19:24:01.755 12403 12403 F art : art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x7375c4d0 self=0xb4285400
    06-05 19:24:01.755 12403 12403 F art : art/runtime/runtime.cc:422] | sysTid=426 nice=0 cgrp=default sched=0/0 handle=0xb6f6a534
    06-05 19:24:01.755 12403 12403 F art : art/runtime/runtime.cc:422] | state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | stack=0xbe76e000-0xbe770000 stackSize=8MB
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | held mutexes= "abort lock"
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] kernel: (couldn't read /proc/self/task/426/stack)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] native: (backtrace::Unwind failed for thread 426: Thread doesn't exist)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:97)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:230)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:855)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] Dumping all threads without appropriate locks held: thread list lock mutator lock
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] All threads:
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] DALVIK THREADS (1):
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] "main" prio=5 tid=1 Runnable
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x7375c4d0 self=0xb4285400
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | sysTid=426 nice=0 cgrp=default sched=0/0 handle=0xb6f6a534
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | stack=0xbe76e000-0xbe770000 stackSize=8MB
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] | held mutexes= "abort lock" "mutator lock"(shared held)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] kernel: (couldn't read /proc/self/task/426/stack)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] native: (backtrace::Unwind failed for thread 426: Thread doesn't exist)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:97)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:230)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:855)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422]
    06-05 19:24:01.756 12403 12403 F art : art/runtime/runtime.cc:422]
    06-05 19:24:01.756 12403 12403 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 12403 (main)
    06-05 19:24:01.757 384 384 W : debuggerd: handling request: pid=12403 uid=0 gid=0 tid=12403
    06-05 19:24:01.830 12417 12417 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    06-05 19:24:01.831 12417 12417 F DEBUG : LineageOS Version: 'unknown'
    06-05 19:24:01.831 12417 12417 F DEBUG : Build fingerprint: 'samsung/hltexx/hlte:5.0/LRX21V/N9005XXSGBRI2:user/release-keys'
    06-05 19:24:01.831 12417 12417 F DEBUG : Revision: '0'
    06-05 19:24:01.831 12417 12417 F DEBUG : ABI: 'arm'
    06-05 19:24:01.831 12417 12417 F DEBUG : pid: 12403, tid: 12403, name: main >>> zygote <<<
    06-05 19:24:01.831 12417 12417 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    06-05 19:24:01.843 12417 12417 F DEBUG : Abort message: 'art/runtime/jni_internal.cc:558] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:485: Unable to restat file descriptor table.'
    06-05 19:24:01.843 12417 12417 F DEBUG : r0 00000000 r1 00003073 r2 00000006 r3 00000008
    06-05 19:24:01.843 12417 12417 F DEBUG : r4 b6f6a58c r5 00000006 r6 b6f6a534 r7 0000010c
    06-05 19:24:01.843 12417 12417 F DEBUG : r8 bef68e90 r9 000001e5 sl 0000000a fp b4285400
    06-05 19:24:01.843 12417 12417 F DEBUG : ip 00000003 sp bef68d50 lr b6041107 pc b6043970 cpsr 60070010
    06-05 19:24:01.865 12417 12417 F DEBUG :
    06-05 19:24:01.865 12417 12417 F DEBUG : backtrace:
    06-05 19:24:01.865 12417 12417 F DEBUG : #00 pc 0004a970 /system/lib/libc.so (tgkill+12)
    06-05 19:24:01.865 12417 12417 F DEBUG : #01 pc 00048103 /system/lib/libc.so (pthread_kill+34)
    06-05 19:24:01.865 12417 12417 F DEBUG : #02 pc 0001d715 /system/lib/libc.so (raise+10)
    06-05 19:24:01.865 12417 12417 F DEBUG : #03 pc 00019261 /system/lib/libc.so (__libc_android_abort+34)
    06-05 19:24:01.865 12417 12417 F DEBUG : #04 pc 00017128 /system/lib/libc.so (abort+4)
    06-05 19:24:01.865 12417 12417 F DEBUG : #05 pc 0031c2a1 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+328)
    06-05 19:24:01.865 12417 12417 F DEBUG : #06 pc 000b52eb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+1134)
    06-05 19:24:01.865 12417 12417 F DEBUG : #07 pc 0026386b /system/lib/libart.so (_ZN3art3JNI10FatalErrorEP7_JNIEnvPKc+94)
    06-05 19:24:01.865 12417 12417 F DEBUG : #08 pc 000dabc7 /system/lib/libandroid_runtime.so
    06-05 19:24:01.865 12417 12417 F DEBUG : #09 pc 000dad59 /system/lib/libandroid_runtime.so
    06-05 19:24:01.865 12417 12417 F DEBUG : #10 pc 000da7ff /system/lib/libandroid_runtime.so
    06-05 19:24:01.865 12417 12417 F DEBUG : #11 pc 00019be3 /system/bin/app_process32
    06-05 19:24:01.866 12417 12417 F DEBUG : #12 pc 7344f579 /data/dalvik-cache/arm/[email protected][email protected] (offset 0x281b000)
    06-05 19:24:02.039 12403 12403 W main : type=1701 audit(0.0:231): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=u:r:zygote:s0 reason="memory violation" sig=6
    06-05 19:24:02.046 384 384 W : debuggerd: resuming target 12403
    06-05 19:24:02.048 811 12430 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:877 com.android.server.am.AppErrors.crashApplicationInner:387 com.android.server.am.AppErrors.crashApplication:321 com.android.server.am.ActivityManagerService.handleApplicationCrashInner:13811 com.android.server.am.NativeCrashListener$NativeCrashReporter.run:86
    06-05 19:24:02.050 811 857 I BootReceiver: Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
    06-05 19:24:02.052 426 426 I Zygote : Process 12403 exited due to signal (6)
    Generally, in DenyList must be only apps you want to hide Magisk from them (banking apps and so)

    And GMS (Google Play Services) - although, when using Zygisk and USNF, USNF will remove GMS from DenyList

    If some banking apps still crash (or complain) although in DenyList, then they require additional treatment to hide Magisk, root, unlocked BL - USNF, Shamiko, maybe HMA, etc

    Hence first, which apps do crash (and before that, remove 'normal' apps from DenyList if you have them, and reboot)
    1
    Generally, in DenyList must be only apps you want to hide Magisk from them (banking apps and so)

    And GMS (Google Play Services) - although, when using Zygisk and USNF, USNF will remove GMS from DenyList

    If some banking apps still crash (or complain) although in DenyList, then they require additional treatment to hide Magisk, root, unlocked BL - USNF, Shamiko, maybe HMA, etc

    Hence first, which apps do crash (and before that, remove 'normal' apps from DenyList if you have them, and reboot)
    Tnx mate for the reply.
    1. I have no modules installed.
    2. I have put just one app in denylist to demonstrate. Any app (all of them) in denylist will crash, so I can't use denylist at all :-( .
    3. Magisk 25.2 works just fine, I don't even need to hide apps to pass safetynet. No crashes at all for apps in denylist!
    Any ideas what's wrong ?
    1
    Tnx mate for the reply.
    1. I have no modules installed.
    2. I have put just one app in denylist to demonstrate. Any app (all of them) in denylist will crash, so I can't use denylist at all :-( .
    3. Magisk 5.2 works just fine, I don't even need to hide apps to pass safetynet. No crashes at all for apps in denylist!
    Any ideas what's wrong ?
    No, I have no idea.(other than what I answered earlier).
    And still no idea which app you tried in DenyList that it crashed

    Btw, if you want to access developers (and give them the logs), you will need to submit an Issue to Magisk GitHub
    1
    I'm confused by you Magisk versions... Old 5.2 and 6.1 don't even have denylist!... Not available till 24.0+...

    Have you tried up to date Magisk? 🤔 PW
    I ment 25.2, sorry mate you are correct.
    The one that crashes any app is 26.1.
    Cheers
    1
    I ment 25.2, sorry mate you are correct.
    The one that crashes any app is 26.1.
    Cheers
    Tried Canary?...

    Strange issue (may be fixed already though)...

    However denylist is not really for hiding, rather it's a development/testing tool...

    Suggest using a proper hiding solution like Shamiko; uses denylist as hidelist for convenience (with DenyList actually disabled)... Much better hiding (akin to/improved on MagiskHide) and doesn't break Zygisk modules that inject into apps in deny/hidelist...

    Personally I'd give Canary a shot first... You can't even make a GitHub issue without trying latest builds (nb. Canary release and Debug debug are synced builds)... PW
  • 8
    So as well as making it easier to keep root with an ota we can have the same firmware on the device one rooted and one not? So if magisk hide/safetynet/etc aren't working we can boot to the non rooted firmware to use wallet/banking apps etc and then boot back to rooted. Or is it a bit more complicated than that? Never had a pixel device before
    Others have already addressed your question, but for me, the biggest benefit here is to have a safety valve in place where your inactive slot is bootable (without first having to flash the firmware) in case you get into a hairy situation where your active slot becomes unbootable for whatever reason. May be useful in some situations.
    8
    Hello!
    How do you know?
    You must be an expert or something

    Nigerian-Meme.jpg 😜 PW
    7
    Yeah, if I want to run a custom kernel (Pixel 7) then I need to wipe. Should have sideloaded (not booted up), then gone into bootloader and run fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img to that slot. Once booted after sideload/flashing the firmware it's too late as it's enabled after booting. Don't think it matters if you do it before or after flashing the patched image, just as long as you do it before you boot up. Oh well, lol...

    Nothing to do with what we were testing, just custom kernel related. Seems to also help to avoid getting the red eio corrupt message when things may not go as expected.
    Thanks, I realize it is only needed for custom Kernel cases.
    I should add extracting vbmeta from payload.bin then in addition to boot.img / init_boot.img so that the step can be performed if the options are selected.
    6
    Update:

    On a Pixel 5 device, I managed to have both slots bootable.
    One slot rooted, and the other not, both on the same 2023-05 firmware.

    The process is as follows (which PF will support OOB in the next release)
    - Sideload full OTA
    - Reboot to bootloader
    - Flash patched image.
    - reboot to system (observe root)
    - Sideload full OTA
    - Reboot to System (no patching, observe no root)
    - Switch slot (observe root)

    With Pixel 5, one is able to make changes to boot after sideload but before reboot.
    It still needs to be tested if this works on Pixel 6, 7 * devices

    I find flashing full OTA is slower than flashing full factory, but the benefit of having both slots bootable is a big bonus.
    6
    I think it would be good to support, and I posted disambiguation due to some confusion above.

    Rather than being 'highly discouraged' (it's not; it's plum necessary 🤪) patching recovery partition is actually the only option for most A-only devices launched with Android 9 (legacy SAR, circa 2018, 2019) other than Xiaomi models!

    Hope you reconsider... 👍 PW
    Your wish is my command :)
    1684447283639.png

    1684447305575.png


    Although with one caveat,
    Yes I can tell if it is Ramdisk yes or no by running a script, but that requires unpacked Magisk, (for not rooted phone, I would need to unpack)
    And although it is true that PF eventually unpacks to create a patch, but within the workflow, that stage is much later, and that stage is dependent on choices a user makes in the above screen.

    Of course it could be worked out and workflow changed to automatically offer / not offer the choice.
    Considering that the target audience is really minute if at all existent, specially considering that the tool has Pixel in its name, and people who have Pixel phone don't need it, and people who need them wouldn't be looking to tools for Pixel Phones ... lol
    I decided the leave it up to the user the choice to have that option visible or not. (no auto detection)
    The tooltip on option suggests not to turn it on unless ...
    1684447779077.png


    I hope that should be enough.
  • 1094
    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