casualsnek / waydroid_script

Python Script to add OpenGapps, Magisk, libhoudini translation library and libndk translation library to waydroid !
GNU General Public License v3.0
1.72k stars 160 forks source link

Update to Magisk Delta 26.3 #143

Closed mistrmochov closed 8 months ago

mistrmochov commented 8 months ago

Your script works fine with last Magisk Delta (before Kitsune Mask update).

Also with modified setup for bootanim

casualsnek commented 8 months ago

Thanks, I'll merge this once I test and confirm if it works properly, including features like zygisk and module installation !

EDIT: Maybe off-topic to this MR, but do you have a copy of git repo of magisk delta up to the end of it ? I'd love to figure out what broken it when it changed to kitsune mask, having old repo would make some of the stuff I am stuck with easier to figure out !

mistrmochov commented 8 months ago

Hi, Well unfortunately I only have this apk file for the magisk app, don't have clone of the old repo, but I think there will probably be some forks on Github.

mistrmochov commented 8 months ago

Hi again, I think I found some fork, here: https://github.com/shuixi2013/Magisk-Delta

baptx commented 8 months ago

I found a copy of the APK file on https://web.archive.org/web/20240109183234/https://github.com/HuskyDG/magisk-files-old/releases (if you see a login form, you just need to scroll down). With the Linux diff command, we can see it matches the one from the pull request so we can also use https://web.archive.org/web/20240109183234mp_/https://github.com/HuskyDG/magisk-files-old/releases/download/0fe46c5a-delta/app-release.apk for the dl_link variable. I also needed the modified bootanim_component variable from the pull request and was able to install Magisk. However it still says "Zygisk: No" even when enabling Zygisk in Magisk settings and rebooting. Is there a solution for that?

casualsnek commented 8 months ago

I found a copy of the APK file on https://web.archive.org/web/20240109183234/https://github.com/HuskyDG/magisk-files-old/releases (if you see a login form, you just need to scroll down). With the Linux diff command, we can see it matches the one from the pull request so we can also use https://web.archive.org/web/20240109183234mp_/https://github.com/HuskyDG/magisk-files-old/releases/download/0fe46c5a-delta/app-release.apk for the dl_link variable. I also needed the modified bootanim_component variable from the pull request and was able to install Magisk. However it still says "Zygisk: No" even when enabling Zygisk in Magisk settings and rebooting. Is there a solution for that?

Zygisk sometimes only works when magisk is installed via magisk ! If you have su access, use the magisk app and install using 'Install directly to system partition' and reboot. If that works and zygisk starts up, i will merge this. Thanks for trying it !

mistrmochov commented 8 months ago

That's what this pull request would fix. Zygisk would work totally fine, with this different bootanim script

baptx commented 8 months ago

I have su access and Zygisk works when selecting "Direct Install into system partition" and rebooting, thanks for your contributions! Now when booting Waydroid, there is just a popup error "Android System" / "There's an internal problem with your device. Contact your manufacturer for details." so I have to close it, is it normal? There was also another option "Direct Install (Recommended)", isn't it better and working for Zygisk? By the way, is there any reason for using a fork instead of the official Magisk? I also tried to pass SafetyNet / Play Integrity (tested with Play Integrity API Checker from Google Play Store) using Magisk modules like https://github.com/kdrag0n/safetynet-fix and https://github.com/Displax/safetynet-fix but it is not working (even when modifying waydroid_base.prop: https://github.com/waydroid/waydroid/issues/935#issuecomment-1880040679 and enabling the setting "Hide the Magisk app"), maybe you have an idea, there is an issue for that: https://github.com/waydroid/waydroid/issues/182

mistrmochov commented 8 months ago

Hi again, the message with internal problem is pretty common in Waydroid, when installing bunch of modules, but as far as I know, It will not cause any issues. Bypassing SafetyNet Is unfortunately not possible at all on emulated androids

baptx commented 8 months ago

Hi, let me know if you have an idea for my other questions. I also noticed after installing Magisk, the phone is detected as rooted on many steps with the app https://github.com/KimChangYoun/rootbeerFresh and the Magisk fork from this pull request does not include the Zygisk "Enforce DenyList" option which is a replacement to MagiskHide to hide root: https://droidwin.com/how-to-hide-root-from-apps-via-magisk-denylist/

Various developers picked up that task and with the introduction of Zygis in Magisk, you once again have the option to hide root from apps and games using its DenyList feature.

Enable Zygisk and Enforce DenyList Launch the Magisk App on your device and tap on the Settings icon situated at the top right. After that, scroll to the Magisk section and enable the toggle next to Zygisk and Enforce Deny List.

Is there a way to get either MagiskHide or the "Enforce DenyList" option, maybe with another Magisk version? Also, do you know the technical reason why SafetyNet / Play Integrity would not work on emulated Android?

Update: by clicking on the button to update Magisk app, the MagishHide option appeared in settings and after configuring the hidelist I was able to hide root from rootbeerFresh app (the bypass was still enabled after reboot when MagiskHide appeared as disabled in settings). The latest app version R65A24840-kitsune (26404) is working with the old Magisk version 0fe46c5a-delta (26301).

baptx commented 8 months ago

@casualsnek It would be better for security to host app-release.apk on your own repository instead of a third-party repository (since the repository could be removed or inject malware in the APK file if you don't use the link to the specific version https://github.com/mistrmochov/magiskdeltaorig/raw/793a78430bac879b8eb9bf72d03003ebc205c294/app-release.apk).

casualsnek commented 8 months ago

@casualsnek It would be better for security to host app-release.apk on your own repository instead of a third-party repository (since the repository could be removed or inject malware in the APK file if you don't use the link to the specific version https://github.com/mistrmochov/magiskdeltaorig/raw/793a78430bac879b8eb9bf72d03003ebc205c294/app-release.apk).

Thanks, I have saved a copy and will switch to using it if required !

By the way, is there any reason for using a fork instead of the official Magisk? Yes, waydroid is different than typical android devices like, missing fstab, selinux support and so on. We at one point able to get su working but eventually found magisk-delta could be setup in waydroid more easily as it targeted emulators and devces that are alightly different as well , so we started using it.