yashsingh1/xdaforums huggingface dataset:
[Magisk] Feduz:
The problem was the latest build of Magisk that has some issues with systemloss. With LP can "update" the hosts file (in /etc) to add a blocking list, and also block some ads in the app. (of course you have to enable the module on Magisk)
[Magisk] J.Michael:
Is "LP" "Lucky Patcher"?

What does it have to do with editing the hosts file?

If you have a working copy of Magisk (almost anything before the last few versions), then a trivial module can overlay /system/etc/hosts -- just put the hosts file you want at /data/adb/modules/trivialmodulename/system/etc/hosts and reboot.
[Magisk] Feduz:
I've replaced the latest magisk version with magisk delta and now the module systemless works properly

There is a function on LP that blocks the ads (the same as adaway) updating the hosts file
[Magisk] zgfg:
You can download some hosts file from Internet, like:

https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardDNS.txt

Rename to hosts (with no extension!)

If you have old Android where System is not read-only, use TWRP and copy that downloaded & renamed hosts file over the original /system/etc/hosts

and reboot

(Magisk/root not required)

Otherwise, enable Systemless hosts in Magisk app and reboot.

Then use some root file manager like MiXPlorer and copy the downloaded & renamed hosts file over:

/data/adb/modules/hosts/system/etc/hosts

and reboot

---

But that way you have a 'fixed' hosts file - by using AdAway, AdAway will update the hosts file to stay up-to-date with the new ads sites

Or go to native Settings, Private DNS and switch to:

dns.adguard-dns.com

(root or TWRP not required, just Android 9 or later)
[Magisk] Feduz:
thanks,

I've found that LP patches the hosts file in both folder, should be used only the one in /data?
[Magisk] zgfg:
I don't use that app (btw, it's name is not welcome on XDA) but generally (on the read-only /system), you can not change /system/etc/hosts file

That's what Magisk then does, on every reboot when initializing Magisk, Magisk will mount (it's not copying!) /data/adb/modules/hosts/system/etc/hosts over /system/etc/hosts

Hence, AdAway does just that, it writes to the hosts file on /data and leave it to Magisk to mount over the /system hosts file

I don't know how LP works (btw, Play Protect will complain about the installed LP). It could do the same as AdAway or it could also execute the mount command directly
[Magisk] Feduz:
OK thanks for explanation, didn't know about the second folder. Yes I think that works on the same way as AdAway
[Magisk] osm0sis:
New Canary incoming... Let's all hope it's useable! 🤞😁

Release new canary build · topjohnwu/Magisk@39d1d23

The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.

github.com

Edit: Ooh, it's already out!

Update Canary Channel: Upstream to 69529ac5 · topjohnwu/magisk-files@0283ca1

Magisk File Host. Contribute to topjohnwu/magisk-files development by creating an account on GitHub.

github.com
[Magisk] pndwal:
Latest Canary (+Debug) Magisk:

Magisk (69529ac5) (25211)​

[General] Bump minimum supported Android version to Android 6.0

[MagiskPolicy] Update rules to support Android U

[MagiskBoot] Support amonet microloader devices

[MagiskBoot] Always use lz4_legacy compression on v4 boot images. This fixes boot image patching issues on Android U preview.

[Zygisk] Rewrite code unloading implementation

Diffs to v25.2​

[General] Bump minimum supported Android version to Android 6.0

[General] New magic mount backend. It supports loading modules into system with overlayfs files injected

[Zygisk] Release new API version 4

[Zygisk] Prevent crashing daemon in error

[Zygisk] Rewrite zygote code injection with new loader library approach

[Zygisk] Rewrite code unloading implementation

[MagiskBoot] Support amonet microloader devices

[MagiskBoot] Always use lz4_legacy compression on v4 boot images. This fixes boot image patching issues on Android U preview.

[MagiskInit] Support replacing existing *.rc files in overlay.d

[MagiskInit] Rewrite sepolicy.rules mounting and loading implementation

[App] Make stub patching 100% offline

[App] Support patching init_boot.img for Samsung ODIN firmware

[MagiskPolicy] Fix minor bug in command line argument parsing

[MagiskPolicy] Update rules to support Android U

https://github.com/topjohnwu/magisk-files/blob/0283ca1564a8533a10f7f55071211e7b2f0f8de3/notes.md

👍 PW
[Magisk] vlucchetti:
Adaway still not working for me with this update
[Magisk] zgfg:
Yeah. I upgraded from Canary v25206 to this brand new v25211 and /data/adb/modules/hosts/system/etc/hosts is again (like in v25210) not mounted to /system/etc/hosts

It's not about AdAway, it's just the Magisk built-in Systemless hosts feature that is still broken
[Magisk] Gordietm:
Same here. I went back to Magisk Delta.
[Magisk] osm0sis:
Interesting... They specifically added workarounds for it:

Make module mirror read only · topjohnwu/Magisk@15cab86

The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.

github.com

So you'd think they'd have tested it. 🤔
[Magisk] vlucchetti:
Waiting for 25212 😊
[Magisk] zgfg:
I think that it worked with the Action build back then when it was fixed (but not sure now anymore)
[Magisk] vlucchetti:
Just a Canary issue then?
[Magisk] zgfg:
Use Canary v25206 or Stable v25.2

It's a regression bug in Canary v25210 and now again in v25211 (although it should have been fixed here?)

Btw, I don't see anything about that fix in the v25211 rel. notes
[Magisk] vlucchetti:
I was going to wait for the April update for my 6pro to uninstall magisk and load 25206.
[Magisk] zgfg:
Interesting, I played a little bit by 'enabling' Systemless hosts again (although it was already enabled and the module listed under Modules) and by updating AdAway again (but the last time I also had 15.6 MB hosts file on /data that was not mounted to /system over the original few KB hosts file there), and now after the new reboot, /data/adb/modules/hosts/system/etc/hosts is properly mounted to /system/etc/hosts

Hence AdAway works now for me
[Magisk] pndwal:
Interesting that that:

[URL[https://github.com/topjohnwu/Magisk/pull/6805[/URL]

was supposed to fix ancient F2FS loopback bug old Google issue with F2FS driver in kernels with this commit:

https://git.kernel.org/pub/scm/linu...y&id=af2db431bea131416895e2ed3526405864660afe... Seems a random issue that manifests with Magisk modules incl. systemless hosts installed much like old F2FS loopback driver issue...

https://github.com/topjohnwu/Magisk/issues/3171

Still work to do? 👀 PW

Edit: seems from further comments, old settings may have caused false alarms... It may actually be fully resolved...
[Magisk] Makishima:
Also updated to 25211 and the latest AdAway from GitHub (6.1.0), re-enabled systemless hosts etc... But it still does not work.
[Magisk] martyfender:
@osm0sis

I tried both direct install first, then flashing the renamed zip file in TWRP and in both cases my Onn 8 Android 9 1st gen freezes on the boot logo then boots to bootloader mode showing the fastboot prompt. I came from the previous ca, topjohnwu approved build. Reflashing that previous build again works. I also just now tried patching the stock boot.img and flashing it in fastboot with the same result.

I entered this in the github issue section and the bot keeps closing it. What am I doing wrong, I am using the latest debug build?

Device:Onn 8 1st gen tablet

Android version:9

Magisk version name:canary debug 25211

Magisk version code: 69529ac

Thanks
[Magisk] vlucchetti:
Hmm, did that, no change. Did you remove the module or turn it off, reboot, enable systemless again?
[Magisk] osm0sis:
Decided to give it a whirl. Worked first try updating from 25206, /system/etc/hosts is the correct AdAway generated one, and no complaints when I open AdAway. 🤞😯
[Magisk] vlucchetti:
I've gone through the process five times and nothing has changed for me. Either I'm doing something wrong or there's something else going on
[Magisk] pndwal:
Heads-up: I think you mean CI build in your GitHub issue... Unless it means Canary?... PW
[Magisk] martyfender:
I reopened and fixed the version and build numbers. I had install the latest canary debug build released as you posted and that is the one that boots to fastboots instead of system.

Latest debug build 25211 69529ac5 #6813​

The latest ca build that I tried that works is:

Better string split implementation #2966​
[Magisk] Lughnasadh:
Pixel 6 Pro

Andorid 14 DP2

Canary Magisk 25211

Can confirm that that patching the Pixel 6 boot image to obtain root is now working again (previously had to use the Pixel 7 boot image).
[Magisk] pndwal:
Ok... Confusing because you mentioned actions (CI) build and CA build... Nb. Canary and Debug are produced simultaneously in Canary branch, but Canary builds are no longer produced with debug flags... Canary is now always produced as release... Debug is the new build built with debug flags...There's really no Canary debug build any more. (Don't be confused by the branch name; In Magisk App, Canary channel always calls release build and Debug channel always calls debug build.) 🙂 PW
[Magisk] immortalwon:
I will wait on the next stable version by topjohnwuu himself. Is he still actively deving Magisk? Or is he now fully owned by google?
[Magisk] bombadier:
Add me to the list that cant get adaway to work with 25211, tried toggling systemless hosts, rebooting etc, updating adaway, doesnt work for me
[Magisk] pndwal:
Open main Magisk GitHub page and click the commit history (clock) icon to see who merges all major commits...

You may want to read this old blog too:

https://topjohnwu.medium.com/state-of-magisk-2021-fe29fdaee458

🤠 PW
[Magisk] pndwal:
Confirmed issue... PR now made: Fix a typo #6817

👀 PW
[Magisk] manjaroid:
Same here. Systemless hosts with 25211 isn't working (stock 13 on Pixel 5). First I tried what worked for @osm0sis, then what worked for @zgfg. Also tried clearing storage for Adaway for a fresh start. No progress so I went back to 25206 and Adaway works again. Maybe 25211 from scratch will make a difference.
[Magisk] bombadier:
While I have you there, what are the instructions again to rebuild the module database, cant find your post from a while ago but am sure you mentioned something about deleting a couple of files to get magisk to clean up some database or other, thanks
[Magisk] Nergal di Cuthah:
So wait for 25212?
[Magisk] rodken:
Uninstall TB Checker > reboot > reinstall TB Checker > Do Not Lauch it > Reboot > Launch TB Checker.
[Magisk] pndwal:
Guessing that may be a hot fix, but who knows? Could be short/long time. 🤪 ... Wait or revert... PW
[Magisk] pndwal:
You can delete everything in /data/adb and reboot (daemon will rebuild clean configuration), or delete just magisk.db and magisk directory to rebuild Magisk database and other config files (eg if becomes incompatible when downgrading or if it just becomes corrupted) but keep modules... It'll be like a clean installation after reboot other than modules if they were left...

🤠 PW
[Magisk] osm0sis:
Weird. Wonder why it worked for me. 😯
[Magisk] choiia:
Same Here: 25211 still Not working with Systemless hosts
[Magisk] martyfender:
I tried this build and on my Onn 8 1st gen, Android 9 tablet it still just eventually boot to bootloader or fastboot mode instead of system. When I reported the issue it was closed more than once. I'm not sure how to get log since it won't boot past that point, does anyone know how?
[Magisk] karimo22:
does rooting your android device give you access to the hardware of the device ?

hardware = physical components of smartphone, e.g. CPU, memory, RF chip, motherboard, hard drive, Flash led , Screen , Speaker , etc.

if the answer is YES :

i need a way that will delete the android operating system in my device forever so i can make mine ,

my new operating system will be really simple a big "Hello World" in the screen of the device while the device has power , how i can make such this ?

if the answer is NO :

don't you think its time to change the meaning of rooting a device ?

wrong question to ask : show me the right one please.
[Magisk] J.Michael:
Congratulations, you have achieved a new level of unintelligible post.

color bad; monochrome good; don't work so hard and each reader will enjoy his personal preference

Your goal sounds more like destroying someone else's device than like taking control of yours.
[Magisk] Nergal di Cuthah:
As far as I'm aware to access that you'll have to create an entire kernel. all rooting does is give the user access to perform administrative comands (acess to root user) https://en.wikipedia.org/wiki/Rooting_(Android)

Rooting uses the android system's boot.img. What you propose is creating your own boot.img (and system.img) a whole new os, you'll need to build hardware to software interfaces, drivers and more; it's much more difficult than a couple lines of hello world.

And i agree next time don't format your post just type it like the rest of us.
[Magisk] vMAC:
Wish I understood this. Can someone explain this for me? Considering that I only root to block ads and to do Hotspot without it reporting to my carrier; I need to get to a version that gives me back host access. Does anyone have a step by step for this?
[Magisk] J.Michael:
Could you give us a hint which parts you understand and which parts you don't?

Do you currently have a working Magisk installed?

Do you have TWRP?

I don't see that you even asked this question. What step-by-step are you looking for? How to install Magisk? How to install an old version of Magisk?
[Magisk] vMAC:
I was quoting pndwal who was stating how to remove magisk and revert to older version of the magisk so that my hosts adaway works.

Wish I understood this. Can someone explain this for me? Considering that I only root to block ads and to do Hotspot without it reporting to my carrier; I need to get to a version that gives me back host access. Does anyone have a step by step for this?
[Magisk] zgfg:
It was suggested many times to use Canary 25206 (or Stable v25 2) - newer Canary versions have issues regarding to modules (incl. Systemless hosts).

You can also find instructions how to downgrade Magisk in those previous posts

Please take time and read the previous conversation in this thread (last few days or so)

Btw, there is also a more simple way to block ads - to use Private DNS option in the native Settings (root, Magisk, TWRP, nothing special needed). Just scroll back, find the yesterday post with details
[Magisk] pndwal:
Wrong post... That one was about how any Magisk build can be restored to 'clean' when it's config files are causing issues... It's a bit like clearing an app's data but Magisk data, incl. loaded modules and settings, are in /data/adb directory, not in Magisk app data...

You want this recent post:

https://xdaforums.com/t/magisk-general-support-discussion.3432382/post-88369459

BTW, a fix for 'hosts' issue is already merged, so next Canary should be fixed... 🙂 PW
[Magisk] zgfg:
You don't need Magisk

You need to unlock Bootloader, make/write your own ROM and flash

How to unlock Bootloader - you should search yourself on Internet, it depends on your device

How to make custom ROMs, etc - feel free to search and learn on the Net, it's completely out-of-scope for this Magisk thread.

Good luck with writing your drivers for your particular hardware components

PS:

"root" = superuser

Unlocking Bootloader and flashing your own ROM has nothing with UNiX/Linux/Android superuser privileges (hence nothing with Magisk)

While flashing, you don't even boot and login to Android (as superuser or not).

Instead, you connect your phone by USB cable to your PC, you reboot your phone to Fastboot mode, you run fastboot flash commands from your PC (if not familiar with, please search the guides on the Net) and Fastboot checks if Bootloader was unlocked to allow you flashing or not

Then you reboot and if the phone was not bricked by flashing the 'wrong' IMG files, you enjoy in your own ROM

As 'simple’ as that

Btw, when you boot to Fastboot, you will see only a big Fastboot logo on the screen (it's not Hello world but kind of similar). And you can not do anything on your phone (touch screen does not work, you can not receive or make even emergency calls, nothing), you can only use Power button to reboot.

IMHO, much easier to achieve but similar to the dreamed Hello world ROM (not based on Android)😁

Btw, you could search on the Net for custom ROMs based on eg Linux Ubuntu (it's still Linux) or something even more exotic.

But again, you will need to find the one that is customized to your device and its hardware, or you will need to customize yourself
[Magisk] pndwal:
https://twitter.com/i/web/status/1643523279075020801

👍 PW
[Magisk] pndwal:
Custom Recovery Magisk installation

FWIW, Installation Instruction page is already updated... As expected, users installing Magisk using .zip installation from custom recovery will be greeted with a dialog asking for Magisk reinstallation on opening the Magisk App... This will flash proper config including setting up the directories for new selinux (module rules) environment which is no longer possible (with refactoring) unless device is booted when boot image patch is made...

👀 PW
[Magisk] m0han:
Would (i) extracting boot.img, (ii) patching it using a properly working Magisk environment, (iii) rebooting to recovery and (iv) flashing the patched .img still work as required?
[Magisk] zgfg:
Magisk cannot know if you are flashing the patched boot.img from Fastboot or from TWRP

Described change is about flashing the Magisk (zip) through TWRP, instead of patching and flashing the boot.img or direct installing (upgrading) in Magisk app
[Magisk] kevinco1:
He has spoken -

2023.4.5 Magisk v26.0

The Magic Mask for Android

topjohnwu.github.io
[Magisk] huskydg:
v26 on the way
[Magisk] pndwal:
🎉🎊👍👏

Upcoming Stable Release Notes:

Latest Public Beta Magisk Release Notes:

Magisk​

2023.4.5 Magisk v26.0​

Hey! Long time no see!

Bumping Minimum Android Version to 6.0​

Magisk’s support for Android Lollipop has been pretty broken for a while without it being noticed. Also, none of the active developers of Magisk have actual hardware to run Android Lollipop. We rely on using the official Android emulator for regression testing on older platforms, however Google never shipped a Lollipop emulator image with SELinux support, leaving us with no option but to drop Lollipop support since we don’t feel comfortable supporting Android Lollipop without adequate testing.

New Magic Mount Implementation​

Magic Mount, the feature that make modules modify partitions, has gone through a major rewrite. The existing implementation doesn’t work well with OEMs injecting overlays into their system using overlayfs. The new implementation fundamentally changes how filesystem mirrors are created, giving us a more accurate clone of the unmodified filesystem.

New sepolicy.rule Implementation​

Magisk allows modules to provide custom SELinux patches by including the file sepolicy.rule. Due to the complicated nature of SELinux patching, the compatibility of this functionality has been pretty spotty; many devices are not supported. In this release, a brand new pre-init partition detection mechanism has been designed to support even more devices. Due to complicated reasons, this detection mechanism cannot be performed in a custom recovery environment.

This means that any installation of Magisk v26+ using custom recovery will be incomplete; a subsequent re-installation through the Magisk app after booting up is required.

Zygisk Updates​

The new Zygisk API v4 is now live! It comes with new features and a refined PLT function hook API. The implementaton of Zygisk has also gone through some major refactoring, including new code loading/unloading mechanisms and a new PLT function hook implementation.

Head over to the Zygisk Module Sample repository to check out the new API and documentation!

Full Changelog: here​

https://topjohnwu.github.io/Magisk/releases/26000.html

👀 PW
[Magisk] pndwal:
🎉🎊👍👏

Upcoming Stable Magisk:

Latest Public Beta Magisk:

Magisk​

Magisk Changelog​

v26.0​

[General] Bump minimum supported Android version to Android 6.0

[General] New magic mount backend. It supports loading modules into system with overlayfs files injected

[Zygisk] Release new API version 4

[Zygisk] Prevent crashing daemon in error

[Zygisk] Rewrite zygote code injection with new loader library approach

[Zygisk] Rewrite code unloading implementation

[MagiskBoot] Support amonet microloader devices

[MagiskBoot] Always use lz4_legacy compression on v4 boot images. This fixes boot image patching issues on Android U preview.

[MagiskInit] Support replacing existing *.rc files in overlay.d

[MagiskInit] Rewrite sepolicy.rules mounting and loading implementation

[App] Make stub patching 100% offline

[App] Support patching init_boot.img for Samsung ODIN firmware

[MagiskPolicy] Fix minor bug in command line argument parsing

[MagiskPolicy] Update rules to support Android U

https://topjohnwu.github.io/Magisk/changes.html

👍 PW
[Magisk] pndwal:
Shamiko-v0.6-141 released TG only for now...

👀 PW

Edit: Public channel now, but still requires unofficial Alpha:

... Guess it may work with official 26.0...
[Magisk] osm0sis:
Does it work on official Magisk? The last few 141 builds there were Magisk-alpha only.
[Magisk] pndwal:
No... Just confirmed it's the same build though now in Alpha public channel... Hope it works w/ TJW 26.0 per my edit above... 🤔 PW
[Magisk] pndwal:
... Zygisk API is bumped to v4 w/ 26000... (24000; v2, 24300; v3)

https://github.com/topjohnwu/zygisk-module-sample/compare/v3..master

🙃 PW
[Magisk] zgfg:
Btw, when installing a module from local storage (phone), in Canary v25211 you now have to confirm (screenshot)
[Magisk] pndwal:
Yes, since patch was made with system booted!

.zip installations from Magisk App (as a module) should work fine too... .zip installation from custom recovery is different simply because patch wasn't produced while system was booted as I said... It still produces 'limited' root that works fine for in-App Direct Install however, so installation can be completed properly once system is booted. PW
[Magisk] HippoMan:
Agreed.

And another way to think of it is this:

A typical desktop or laptop computer has something called "ROM BIOS" which controls the hardware and the machine configuration. It is resident in some sort of programmable ROM.

An OS can be installed on the machine, for example, Linux or MS Windows. That OS interfaces with the machine hardware via the drivers and modules which are made available via ROM BIOS.

If Linux, there is something called "root mode", or "superuser mode", and if Windows, there is something called "administrator mode". When in this mode under either OS, file permissions and other permissions relatiing to program excecution can be overridden.

Given that much of the functionality of Linux and Windows is managed via those OS's themselves, root mode and administrator mode can allow the user to have many "powers" that normally are not granted to a "normal" user.

Android is a little different: a lot of it is similar to a big ROM BIOS. In addition to the hardware and device configuration modules, this BIOS-like module manages and controls a number of functions that the Linux and Windows OS's manage themselves (outside of their "ROM BIOS").

Android is indeed running a version of Linux as its OS, and anything relating to "root" is managed in the Linux OS part of the device configuration. But since lots of the Android device configuration is managed in its BIOS-like module, running software under "root" under Android does not have as much power as root mode or administrator mode grant to users in Linux and Windows machines.

The way to get around this is to run something other than standard, garden-variety Android on your device. You could write your own custom ROM (and ROMs contain both the BIOS-like part and the Linux OS itself), and in that way, you could allow root to have more capabilities than it has under "normal" Android.