[Discussion] Magisk Delta - Another unofficial third-party Magisk fork

Search This thread

uschipower

Senior Member
Mar 14, 2009
88
4
I just installed and TrebleDroid-GSI on a TB-X605F.
Where do I find a compatible Version of Delta Magisk which can be used with TD-GSI?

After I had successfully installed GSI, I made a backup of all partitions with TWRP.
I installed DeltaMagisk-Apk and selected the boot-partition-file from TWRP-backup for Patching DeltaMagisk.
Then I installed the patched boot, but Device will not start with this boot-file.

Whan can I do?
Where did I make a mistake?
 

Roidred

Senior Member
Sep 4, 2012
242
52
I just installed and TrebleDroid-GSI on a TB-X605F.
Where do I find a compatible Version of Delta Magisk which can be used with TD-GSI?

After I had successfully installed GSI, I made a backup of all partitions with TWRP.
I installed DeltaMagisk-Apk and selected the boot-partition-file from TWRP-backup for Patching DeltaMagisk.
Then I installed the patched boot, but Device will not start with this boot-file.

Whan can I do?
Where did I make a mistake?
you should try to rename the file from .apk to .zip and then flash the same file from twrp itself.
 

zgfg

Senior Member
Oct 10, 2016
8,985
6,724
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11 Ultra
just tried this way too, do everything in TWRP.
The device doesnt boot any more after DeltaMagisk has modified boot-partition

Whan can I do?
Where did I make a mistake?
Use the same boot.img that you patched, but the original, not patched img file

And flash to restore. There will be no Magisk but the phone should boot if it was indeed the correct/corresponding boot.img from your ROM
 

uschipower

Senior Member
Mar 14, 2009
88
4
Use the same boot.img that you patched, but the original, not patched img file
??
For GSI-Image, I have downloaded a *.xy-File to PC and extracted it. There was a *.img-File in archieve.
I flashed this *.img to "system" with TWRP.

You think of I should extract boot-partition from *.img-File?
How does this work?

Or do you think of boot.img from stockRom which is basis for GSI-Images?
 
Last edited:

zgfg

Senior Member
Oct 10, 2016
8,985
6,724
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11 Ultra
??
For GSI-Image, I have downloaded a *.xy-File to PC and extracted it. There was a *.img-File in archieve.
I flashed this *.img to "system" with TWRP.

You think of I should extract boot-partition from *.img-File?
How does this work?

Or do you think of boot.img from stockRom which is basis for GSI-Images?
Generally, System and Boot are different partitions and flashing System image to Boot partition is a way to brick the phone

However, in that case Magisk should have recognized that the given img file cannot be patched and should have printed an error (did you watch what Magisk wrote when patching!) - but there should be also no patched img then

Anyway, instead of flashing permanently the img file (patched or not) to Boot, it is always good to test it first by one-time booting to:
fastboot boot <IMG file>

Now, to un-brick, you should try to dirty-flash the ROM again, it should fix your Boot partition

Btw, ROMs may come with the compound payload.bin and one must use Payload Dumper to extract particular images - but again, Magisk should IMO report an error when trying to patch the payload.bin
 
Last edited:

uschipower

Senior Member
Mar 14, 2009
88
4
However, in that case Magisk should have recognized that the given img file cannot be patched and should have printed an error (did you watch what Magisk wrote when patching!) - but there should be also no patched img then
I do not patch img, i install gsi-img over stockrom. And then, I made a backup of boot partition with TWRP. This file I used for patching with DeltaMagisk.
This patched boot partition file do not work

Now, to un-brick, you should try to dirty-flash the ROM again, it should fix your Boot partition

I do not have to make a dirty flash. I restore unpatched boot from TWRP and device does boot.


Generally, System and Boot are different partitions and flashing System image to Boot partition is a way to brick the phone

Do GSI-Images only modify system partition, do they not contain boot partition?

If yes, boot-partition is part of stock rom, not GSI-Image part, right?

As far as i know, Magisk and DeltaMagisk only modify boot partition.
When I flash stockrom without GSI, DeltaMagisk can modify boot partition and device can boot.

When flashed GSI, it should be still the same boot partition. But when I modify boot partition the same way, device doesnt boot.
So i suppose there is a problem with GSI



When using official magisk, there is a notice that for GSI-Images you have to use a special version:
As you can see, the main developer of GSI/TrebleDroid, Phh, made the last version 2 years ago. Now he is retired in that project.
I suppose, he never made a modified Delta-Magisk version.
So it would be kindly if HuskyDG makes a Version working with GSI-Images.
 
Last edited:

pndwal

Senior Member
I do not patch img, i install gsi-img over stockrom. And then, I made a backup of boot partition with TWRP. This file I used for patching
This is a good method... Will always get matched image...
I do not have to make a dirty flash. I restore unpatched boot from TWRP and device does boot.
👍
When flashed GSI, it should be still the same boot partition. But when I modify boot partition the same way, device doesnt boot.
Did you try with patched image made without GSI?... See comments below re wipes needed too...
So i suppose there is a problem with GSI
Yup, these need special fixes in Magisk it seems... More below...
When using official magisk, there is a notice that for GSI-Images you have to use a special version:
As you can see, the main developer of GSI/TrebleDroid, Phh, made the last version 2 years ago. Now he is retired in that project.
I suppose, he never made a modified Delta-Magisk version.
So it would be kindly if HuskyDG makes a Version working with GSI-Images.
Doubt you need that old mod of Magisk 23.0... many GSI compatibility fixes (and newer GKI and other Treble compatibility fixes) have been added in official Magisk since (like this important one: Skip loading Magisk when detecting DSU)... In the past Magisk was basically incompatible with GSIs... Some issues likely still exist... Some users find phh builds are more difficult to get to boot than Google GSIs, even w/o Magisk patching... Apparently wiping /data, dalvik etc is often needed to get Magisk booting w/ GSIs...

Try wipes, try a Google GSI for comparison... 👍 PW
 

zgfg

Senior Member
Oct 10, 2016
8,985
6,724
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11 Ultra

Attachments

  • Screenshot_2023-03-28-20-30-32-648_com.comdirect.phototan.jpg
    Screenshot_2023-03-28-20-30-32-648_com.comdirect.phototan.jpg
    369.1 KB · Views: 64
  • Screenshot_2023-03-28-20-32-28-145_com.comdirect.phototan.jpg
    Screenshot_2023-03-28-20-32-28-145_com.comdirect.phototan.jpg
    253.5 KB · Views: 64
  • Like
Reactions: uschipower

eliezerjk90

Senior Member
Feb 28, 2015
939
591
Duisburg
  • Love
Reactions: uschipower

useroso987

Member
Oct 28, 2022
14
3
Hi, i just installed LineageOS 20 and will proceed to root.

Should i take Official or Delta one?
Is there any list of differences between them?

Thanks.
 
  • Wow
Reactions: pndwal

Timmmmaaahh!

Sr. Mod / Mod Cmte / Recognized Xmas Avatar Themer
Staff member
Sep 11, 2012
6,316
1
16,997
Bruges
OnePlus One
OnePlus 6T
Hi, i just installed LineageOS 20 and will proceed to root.

Should i take Official or Delta one?
Is there any list of differences between them?

Thanks.
No silver platters here 🤷‍♂️
It's a personal preference. For some applications, official will work better, for others Delta will do the trick. Why don't you just try the one that seems best to you, it's possible to switch later. Also, read the documentation and FAQ, those will likely answer most of your questions.
 

shadyrexman

Member
Mar 29, 2023
13
12
Pixel 6 Pro T3B2 here, tried many times to root my p6p and failed , I patched the p7p boot.img and fastboot it, after restarted and I press direct install. After reboot then the root is gone. Any suggestions? Thanks a lot .
 

Attachments

  • Screenshot_20230331-081701.png
    Screenshot_20230331-081701.png
    216.6 KB · Views: 51
  • Screenshot_20230331-091229.png
    Screenshot_20230331-091229.png
    530.2 KB · Views: 51

zgfg

Senior Member
Oct 10, 2016
8,985
6,724
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11 Ultra
Pixel 6 Pro T3B2 here, tried many times to root my p6p and failed , I patched the p7p boot.img and fastboot it, after restarted and I press direct install. After reboot then the root is gone. Any suggestions? Thanks a lot .
On your screenshot it says:
Magisk
Installed Delta 25210

Zygisk Yes
Ramdisk Yes

Hence, as per that screenshot, Magisk (and the root) is installed
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    If official magisk lets you disable zygisk,
    It does...
    then yes. You literally just make sure you are hiding root from starling (on official magisk you can do this with denylist i think, but shamiko won't work without zygisk so be sure to enable magisk's own denylist toggle,
    ...but Denylist requires Zygisk too.
    on delta it's "MagiskHide") and reboot with zygisk disabled. Log into starling then when you're in, reboot with zygisk enabled again. When starling gets to one day left on their timer, redo the process.
    I did have the Firebase url blocked in adaway, unsure if that's strictly required now but it's probably doing no harm to have it blocked.
    👍

    FWIW, I've already tried this with my current Alpha Magisk setup which is a POC for the upcoming native bridge Zygisk loading refactoring. It seems it's not yet enough to hide Zygisk from this app, but even initial work is not yet completed
    IMG_20230521_122937.jpg

    and native bridge compatible Shamiko is also brand new.

    I suspect when the final function above and testing are completed and NB Zygisk hits official Magisk (expected with 27.0) Zygisk may be properly hidable finally just as NB based Riru was.

    Of course Riru had integrated RiruHide, but Zygisk will always rely on third party hiding going to forward so some further compatibility tweaks for Shamiko will probably also be required for proper Zygisk hiding...

    Meanwhile, someone else might be interested in trying official Magisk with firebaseremoteconfig.googleapis.com blocked and @huskydg's p-trace based portable MagiskHide...

    Please say if passing PI deviceIntegrity verdict is also needed... (I suspect it will be, but some banks don't check this.) If it is, @huskydg's (improved) forked Riru build and his Riru-based forked safetynet-fix build could also be applied to TJW Magisk...

    I may try this when time permits, but real Starling users may have more motivation.

    👍 PW

    Edit:

    Tried this with current Alpha w/ MagiskHide instead of Denylist (Zygisk disabled), and voilà!:
    IMG_20230521_133635~2.jpg

    ... I can confirm PI deviceIntegrity is not checked as it is failing and blocking firebaseremoteconfig.googleapis.com was not required either... (12 May 2023 update.)
    2
    Is magisk delta dead?
    This on TG Channel dt. 23-May-2023
    1
    I'm fairly new to MD, I have fdac22ba installed on Pixel 7 Pro. Its currently set up using Magisk Hide but I want to change it and use SU List instead but when I tried it I had trouble with 2 modules which showed as installed but I couldn't open them, BCR & AOSPMods. Anyone have similar issue with these apps. Or is there a specific way it has to be done. I tried reinstalling, rebooting etc.
    Install Su-List Auto-WhiteList module (scroll up in this thread to find about), or manually add module's apps to SuList (and reboot)
    1
    Starling bank app seems to be detecting root now regardless of Delta/Alpha,modules, or setting combos. Super frustrating.
    1
    Try this, it's per-app. Maybe it could help. (Lsposed)

    No luck with this either

    Edit:
    Got it working by disabling Zygisk entirely. App gives you 7 days from root detection once logged in so I guess I'll just turn zygisk off for a boot cycle once a week to keep the app going. Pain in the ass or what.
  • 54
    This is not an officially supported topjohnwu project.
    If you are looking for official Magisk source, please go to this page


    Introduction

    Custom Magisk fork by HuskyDG. Sync with official Magisk adding back MagiskHide.
    http://huskydg.github.io/magisk-files

    REPORT BUG IS STILL ACCEPTED ON XDA THREAD BUT PLEASE INCLUDE ADDITIONAL INFORMATION SUCH AS LOGCAT AND MAGISK LOG
    7
    Revive MagiskHide from Magisk v23.0
    • The implementation of MagiskHide is ptrace Zygote process, every forks of Zygote will be notified and traced also.
    • MagiskHide from Magisk v23.0 which monitors every thread spawn event of Zygote fork (app process is heavily a multithreads process which will spawn threads to trigger MagiskHide to check UID and cmdline)
    • There is an exception that app zygote does not spawn threads and thus it won’t trigger MagiskHide to unmount Magisk and detach. (MagiskDetector and Momo take advantages of this fact to detect MagiskHide through ptrace)
    • To fix this problem, we trace the syscalls prctl() instead of thread spawn event of Zygote fork like MagiskHide in Magisk v23.0
    • After processes has been forked from zygote, there will be atleast prctl() is called to change the process name. For normal app process and isolated process, the process name will be changed as followed:
      • zygote -> (unknown name) -> <pre-initialized> -> (process name). So the key is <pre-initialized>, after that we can guess it is target process or not.
    • For app zygote, there is only once prctl() is called to change process name: zygote -> package.name_zygote.
    • The changing process name happens before apk is being loaded so we can detach it from ptrace, do unmount all Magisk files and nearly there is no traces left after that.
    6
    Thread re-opened
    6
    And now Bingo, with today's Magisk-017cca27-delta(25205), Momo does no more detect Zygisk

    - Zygisk and MagiskHide enabled, Shamiko disabled
    👍
    Btw, maybe I should start thinking of Livin' by Mandiri 😁
    Interesting analysis from @5ec1cff here:
    https://github.com/5ec1cff/my-notes/blob/master/analyse-livin.md

    Seems Livin / others may use smap for detection... This study discusses TJW's sanitize environment commit not working properly and LSP fixes in Shamiko as well as efforts needed to hide zygisk hooks, esp for functions of libandroid_runtime.so:
    https://github.com/5ec1cff/my-notes/blob/master/new-idea-detect-zygisk.md
    ... I note dev refers to @canye's (Magisk Bravo) analysis of environment variables too...

    This article analyses more recent Zygisk changes and Dev's attempts to hide zygisk /proc/self/attr/current exposure etc:
    https://github.com/5ec1cff/my-notes/blob/master/zygisk-new-start-mode.md
    ... it ends with this conjecture:
    "Maybe it's time to consider loading zygisk with native bridge?"
    More on this and comparison w/ riru hiding / methods and plans for hiding Zygisk here:
    https://github.com/5ec1cff/my-notes/blob/master/maru.md

    Many of the ideas revealed in Dev's notes above are implemented in Magisk Maru fork (and adopted for now in Delta)... See top 4 commits here:
    https://github.com/5ec1cff/Magisk/commits/maru
    ... use of complete native/src/zygisk/elf_util.cpp file from LSPosed in inject with native bridge Is interesting...

    ... Many other interesting notes here:
    https://github.com/5ec1cff/my-notes
    incl. "build-magisk-on-windows" etc...

    ... I've only taken a cursory glance at notes I mentioned...

    Very credible Zygisk hiding efforts for a fork like Delta however... 👍 👀 PW