yashsingh1/xdaforums huggingface dataset:
[Magisk] topjohnwu:
More Announcements

These few months has been really busy (I think I've said this for like 1000 times...), so I had little time to do proper Magisk maintenance. However, today is Solar Eclipse day (for those in the US), and also the Android O day, I guess I'll announce "something" to celebrate it!

Hiding Magisk Manager

Despite the limited free time, I managed to squeeze out this highly anticipated feature into Magisk Manager, thinking the implementation would be interesting but not too complicated.

Here is a demo video in action:

[YOUTUBE]4iXiBLAcxBU[/YOUTUBE]

The method is far from perfect, but good enough to hide from many existing detection methods. As you can see in the video, after hiding Magisk Manager, it will automatically install a new app called "Unhide Magisk Manager". The cool stuff here is that the new app is given a new random package name and signed with test keys on-the-fly each time you hide Magisk Manager. This will prevent detection methods from detecting "Unhide Magisk Manager"'s' package name, a bit more "future-proof".

There are still some other stuffs I'd like to polish, expect this new feature to be available in the next beta release.

Pixel (XL) Support

People following me on Twitter might have known that I recently got my hands on a Pixel XL. After some brief research and investigation, the situation is not as complicated as I initially thought, so official Pixel support should be possible and pretty clean. However, it still requires quite a lot of adjustments, I wouldn't work on it until I have more free time, and also I would focus on pushing out a new stable release before I dive full in Pixel devices. In the meanwhile, Pixel (XL) users can use the unofficial builds if you want.

Unofficial Sites

I'm aware of some sites (such as https://magiskmanager.com) using the Magisk name to distribute Magisk. To be clear, all binary distribution are and will be hosted on XDA or my Github account, I do not own or be affiliated with these websites. I'm actually fine with websites like this using my project to gain ad revenue lol, but I still recommend users to download and seek for support from official sources, or even build Magisk yourself so it won't include any malware.
[Magisk] topjohnwu:
2017.12.29 Magisk v15.1

The previous stable release has been put into extensive testing from my testers, and also very thoroughly tested on my side (4 different device setups, 4 Android versions), but still some issues are kept under the radar and went through all the testing......

Please accept my sincere apology! There were some faulty code in magiskboot, which in some cases will cause fstab to be corrupted, leading to bootloops. The issue is now identified, reproduced, fixed, and tested. In addition, with reports and feedback from users, Magisk Manager is also updated with bug fixes and more robust sudb management.

For a more complete release note, please check v15.0 Release Notes

I added a highly requested feature in Magisk Manager: sort repos with last update, hope you will enjoy, forgive me, and please don't hunt me down :)
[Magisk] topjohnwu:
2018.1.1 Magisk v15.2

What is a better way to celebrate 2018 than a Magisk update fixing bugs. :p This update mainly fixes these main issues:

I fixed fstab ramdisk patches in the last release, but forgot to update the dtb part (both uses the same patching logic), my bad. Recently devices are starting to move fstabs from ramdisks into dtbs like OP5/OP5T Oreo beta. Since Magisk's dtb verity removal code is broken in v15.1, this causes devices that triggers dm-verity using the new setup to stuck in a bootloop.

Another major update is that new sepolicy rules are added to support stock Samsung ROMs. Samsung users has been complaining MagiskHide broken since the introduction of the refined MagiskHide system, and finally I spent an excessive amount of time and found the root to the issue: SELinux.

Lastly, thanks to [MENTION=1813976]shakalaca[/MENTION] joining the forces, there are some devices in the wild using Treble-like split sepolicy setup on a traditional non skip_initramfs devices, this release is updated to support these Frankenstein configurations.

Sorry for the frequent updates recently, but I really want things to work out on all devices. Hopefully this will be the last update in this series of v15.X release, finger crossed!

For a more complete release note, please check v15.0 Release Notes
[Magisk] topjohnwu:
2018.1.12 Magisk v15.3

Another bug fix update! This should fix a rather small but pretty serious bug that causes only one script would be executed in bootscripts.

To make things not that boring though, I've bring a small suprise that I think no root management apps has done before (at least I'm not aware of) - Fingerprint Authentication for Superuser requests! Devices using Android 6.0+ with a fingerprint scanner, you can enable this in Magisk Manager's settings.

These bug fix releases on stable channel should come to an end, I'll start adding more experimental features/device support and those will be pushed through the beta channel before it hits the next major v16 release.

Magisk v15.3

- [Daemon] Fix the bug that only one script would be executed in post-fs-data.d/service.d

- [Daemon] Add MS_SILENT flag when mounting, should fix some devices that cannot mount magisk.img

- [MagiskBoot] Fix potential segmentation fault when patching ramdisk, should fix some installation failures

Magisk Manager v5.4.4

- Fix dtbo on-boot detection, should follow configured dtbo patching behavior on Pixel 2 devices

- Add fingerprint authentication for Superuser requests

Lastly for interested developers out there, I've updated the documentations to fully match the latest Magisk v15, please spend some time read through the docs and also the elaborate procedure graphs I've made.

2018.1.13 Hotfix (1531 and v5.5.5):

There is a very minor bug in MagiskBoot, fixed it and updated the zip in the OP.

No notification will be pushed to the stable channel, and users that already have Magisk installed don't need to upgrade.

For Magisk Manager, an update is pushed to fix crashes on Android Lollipop and some devices not following AOSP standards.
[Magisk] topjohnwu:
2018.2.13 Magisk v15.4

Massive MagiskBoot Improvements

A lot more boot images are supported with magiskboot - I would love to say magiskboot could be the most powerful single binary to handle Android boot images! Huge props to [MENTION=4544860]osm0sis[/MENTION] with his assistance and his AIK project for making this possible - we have some plans coming :)

Massive Magisk Manager Optimizations

I've rewritten Chainfire's zipadjust (originally from OpenDelta project) into Java (also fixed a typo in his code :P). This result in the removal of JNI in Magisk Manager, and great simplification in Magisk's building system for signing zips. Also, the portion of dealing with root is migrated to libsu, an Android Library I designed for root app developers, and for an exciting WIP project :D. I'll officially introduce libsu in a future post very soon, the documentations are not done yet, but developers interested can chime in the code and check out the cool features and designs.

There are also massive improvements in the way Magisk Manager handles the superuser database. It should be much more robust, fixes the bugs people has experienced, and make the repackaging of Magisk Manager (a.k.a hiding Magisk Manager) much more stable and error prone.

Socket Obfuscation

In previous Magisk releases (well, all CM based if not all root solutions), the daemon listens to a specific Unix socket, and requests can be sent via the socket to remotely start a root shell from the daemon and connect STDIN/OUT/ERR to the current terminal/process. So technically speaking, a process can directly talk to the socket instead of calling "su", since what "su" does can be oversimplified as basically establishing a socket connection to the daemon. This means that even if we have MagiskHide enabled, any app can discover the socket entry Magisk uses and detect, or even request root access. Starting from this release, the socket name will be randomly assigned each time the device boots up, so processes with MagiskHide enforced can effectively be blocked from root access.

Magisk Manager v5.6.0 is available through stable channel; Magisk v15.4 is currently in beta, and will soon be pushed to the stable channel once publicly tested.
[Magisk] topjohnwu:
2018.2.22 Magisk v16.0

F2FS Crash Fix

AOSP upstream updated SQLite to 3.21.0+, and starting from that version introduces a new atomic write ioctl to eliminate the use of journal files. That optimization is only available on F2FS filesystems. For some weird reason (@arter97 thinks it is F2FS bug or SQLite bug) the database setup will fail with a weird error code. I found a way to overcome the issue and so far tests are positive.

Welcome Huawei Treble Devices!

Thanks to [MENTION=8814170]Chris@Honor_USA[/MENTION] for reaching out and sent me a View 10 for development, support for Huawei/Honor Treble devices (Mate 10/10 Pro/View 10) is officially added to Magisk! It's quite interesting to see the differences between implementations of Treble :)

NDK Compiler Bug

Due to complicated reasons, Magisk release binaries are all compiled with the very old NDK r10e. However the x86/x64 compiler contains an optimization bug causing critical strings being stripped out of the binary, which wasn't fixed until r13 when Google switched from GCC to Clang. This causes some bootloops on some devices in v15.4, and by using a workaround, this issue was eliminated.

libsu

Here I officially announce that my Android library for root app developers - libsu, is finally fully documented and ready for a proper release! I extracted all the experience I gained from developing Magisk Manager over the past year and crafted it into an independent library for developers. It was designed to easily share an interactive root shell across the whole application, which many root apps fail to do so since it is pretty complicated to maintain. Using the high level APIs are so simple that you won't even notice you are sharing a shell!

I spent a lot of time re-creating many java.io.* classes so developers can directly use Java to do I/O operations with root access without messing with dirty command-lines. In addition, a lot of effort has put into optimizing the I/O streams so the performance is amazingly fast. It also comes with a bundled busybox binary and supports a lot more advanced feature for experienced developers.

Simple tutorial, example code, and full Javadoc are now all available: https://github.com/topjohnwu/libsu

Huge Announcement

Starting from Feb. 22nd (yes, I'm about to leave in a few hours....), I will start serving the mandatory military service for 4 months. In these 4 months I will be disconnected from the Internet... umm... actually, disconnected from the entire world should be more precise LOL. I worked full time the last few weeks in order to push out some quality stuffs before I leave for quite a long period of time. The submission server is not robust enough for me to deploy it on a remote machine, so the server will be down for most of the time in the following months. Occasionally when I have a few days off in the weekends, I will ramp up the server and gobble through the requests, and maybe check some easy issues if I found the time, but don't expect anything from me.

I hope this release is good enough for my temporary departure. Good bye Internet :)

Logout.
[Magisk] topjohnwu:
2018.3.11 Magisk v16.1

I'm supposed to be gone for a few months, but it turns out that I can leave the military camp every weekend, so hey why not do some updates :p

MagiskBoot Fixes

Thanks to [MENTION=1813976]shakalaca[/MENTION] and [MENTION=390630]worst[/MENTION]person (on Github) submitting patches, several bugs and new device has been supported! I also updated the logic detecting high compression mode, it should now properly detect whether high compression mode is necessary.

Android P Support

The big thing here is Android P Preview 1 support! As usual, a new version of Android means more security updates, so some additional patches are needed to run properly. Some fun things are undocumented weird changes such as weird SQLite behavior, renamed non-platform property contexts, and some tools replaced with new ones.

This version is tested on Pixel XL and Pixel 2 XL on Android P, and also backward tested on Android 5.0, so things should be relatively stable. But since I only have a few hours a week to work on development, I pushed it to public beta before doing a proper release. Gonna rush back to the camp in a few hours, bye guys :)

2018.3.18 Magisk v16.2

Fix module installation on Android P
[Magisk] topjohnwu:
2018.3.28 Magisk v16.3

Remove Backward Compatibility Symlinks

The paths of some static files have been moved to secure directories for quite some while. I've added symlinks to reduce breakage at that time, but it also introduces a ton of dirty workarounds into the hiding mechanism. The module template was already updated with these changes for over 4 months, I think it is about time to remove these symlinks.

Remove SafetyNet Blacklists

Previously, Magisk Manager has an internal list of apps that uses SafetyNet. It will blacklist these apps to prevent users from double hiding them. However a recent update of Pokemon GO introduces its own detection method in addition to the existing SafetyNet check, so I decided to simply just remove this list all together. Pokemon GO users will now need to explicitly add the app to the hide list for the best experience.

Future Plans

I'm aware of Magisk currently doesn't work on Samsung S9(+). It is most likely caused by yet another weird Treble implementation from OEMs. So the next goal is to of course add support for these new Sammys.

Also another controversy news has caught the spotlight: Google banning none certified devices from Google Play Services upon setup. This can be workarounded with installing Magisk before running the setup. I would love to add some optimization so it can play better with Treble ROMs (GSI) out of the box to prevent these issues.

But keep in mind that I'm still in charge of the military training, so development will be slow.
[Magisk] topjohnwu:
2018.4.29 Magisk v16.4

Massive Refactoring

I spent weeks redesigning the way Magisk starts up, including how /sbin tmpfs overlay is constructed. Along with the redesign, I cleaned up the sepolicy rules and also switched the domain root processes will run in to prevent conflicts. Some parts of procedure graph in the docs thus became obsolete, but I haven't have the time to update it yet.

In this major refactoring, I finally decided to remove post-fs mode. As a replacement, the files for simple mount should now be moved from /cache/magisk_mount to /data/adb/magisk_simple, and will be mounted immediately in post-fs-data mode before the daemon initialization.

MagiskHide Improvements

There is an increasing amount of apps that run device verification / root detection in a separate service, which was under the radar of MagiskHide's implementation. These services are now included as the target.

I still haven't had the time to check out Galaxy S9 support yet, as these under-the-hood changes took more time than I expected.

Here are the changelogs:

Magisk v16.4

- [Daemon] Directly check logcat command instead of detecting logd, should fix logging and MagiskHide on several Samsung devices

- [Daemon] Fix startup Magisk Manager APK installation on Android P

- [MagiskPolicy] Switch from AOSP u:r:su:s0 to u:r:magisk:s0 to prevent conflicts

- [MagiskPolicy] Remove unnecessary sepolicy rules to reduce security penalty

- [Daemon] Massive re-design /sbin tmpfs overlay and daemon start up

- [MagiskInit] Remove magiskinit_daemon, the actual magisk daemon (magiskd) shall handle everything itself

- [Daemon] Remove post-fs stage as it is very limited and also will not work on A/B devices; replaced with simple mount in post-fs-data, which will run ASAP even before the daemon is started

- [General] Remove all 64-bit binaries as there is no point in using them; all binaries are now 32-bit only.

Some weirdly implemented root apps might break (e.g. Tasker, already reported to the developer), but it is not my fault :)

- [resetprop] Add Protobuf encode/decode to support manipulating persist properties on Android P

- [MagiskHide] Include app sub-services as hiding targets. This might significantly increase the amount of apps that could be properly hidden

Magisk Manager v5.7.0

- Add app shortcuts for Android 7.1+

- Bump minimal module minMagisk requirement to 1500

- Adjustments for new sepolicies on v16.4+

- Fix crashes when refreshing the online repo
[Magisk] topjohnwu:
2018.7.19 Magisk v16.7

A stable release is imminent!

Hot Fix (versionCode: 1671)

Fix booting to fastboot on half-treble devices (OP5/5T on stable OOS, maybe more)

Detect ramdisk partition for Huawei

Bug Fixes

EMUI's logcat for some reason will change the permission of its output file, and since Magisk will do several logcat commands dumping output to /dev/null, the permission is messed up, causing tons of stuff to break, including adbd; the issue is now fixed. Some new Treble devices (e.g. OnePlus 5/5T) had some issues with the "lazy" method I used to early mount partitions, so the "proper" way is introduced: magiskinit will start reading fstab in device trees to detect the partition partname. A positive side effect is that some custom Treble devices (many Xiaomi devices) modifies the device tree to redirect vendor to an unused partition, and this is now fully supported!

Legacy Support

Starting from v16.7, the native part of Magisk is compiled against SDK 16 (Android 4.1 JellyBean), which is the beginning of legacy support. This doesn't mean you can flash Magisk on your obsolete devices now, as there are tons of stuffs needed to be done: Magisk Manager does not install on anything lower than Android 5.0; most features are not even tested yet. Proper legacy support won't happen until the next release is pushed to the stable channel though, v17 is my top priority now and I want it to be as bug free as possible!
[Magisk] topjohnwu:
2018.9.1 Magisk v17.1

This long awaited stable release is delayed due to me moving to the US and some unexpected issues in the meantime. But hey it's here guys!

I suggest those who care (e.g. module developers) follow me on Twitter, as I do most of the announcements other than Magisk releases over there.

Hotfix v17.1

There was some incompatibility issues when upgrading from v16.0 to v17.0. If you are caught in a bootloop, first use the uninstaller to completely remove Magisk, then flash v17.1, I'm extremely sorry for all stuck in bootloops.

Release Cycles

Starting from v17.0, the stable channel and the beta channel are considered as "public releases", meaning both will be well tested before release and should be good for most normal users as daily driver. In general (meaning no catastrophic bugs), each major version bump (e.g. v17 -> v18) will be on the stable channel, and each minor version bump (e.g. v17.0 -> v17.1) will be on the beta channel. For version codes, the first 3 digits represent the version of a public release (e.g. 17500 will be v17.5), the last 2 digits are for internal iterations (e.g. 17521 will be v17.6 WIP, iteration 21). There will be a separate "Experimental Channel" in the cutting edge, but this is out of scope for this post.

New Module Template: 17000

Due to some oddities to FBE, the path Magisk used to store persist files (/data/adb) cannot be created/accessed in custom recoveries if the folder/data decryption does not exist. Magisk has to install files to an alternative path, and the new template is updated for this change, which at the same time prevents corrupting data on FBE when installing in custom recoveries.

Install to Inactive Slot is Back!

Due to some changes in the Pixel OTA engines, the feature to install Magisk to inactive slots after OTA was broken for quite a while. This update added the ability for Magisk to force a slot swap using bootctl, so this super fascinating feature (that I personally do use a lot) is now back!

SafetyNet Check is Back!

People are panicking about the "Invalid Response" of SN checks in Magisk Manager. It is actually just a cosmetic issue as Google banned the old API (which Magisk Manager and tons of SN apps in Play Store was still using).

I'm well aware of several games in the wild was recently updated to detect Magisk yet again, I'll focus on that after this stable release, no worries!

Highlights

For those that were on the stable channel, here is a highlight of what has changed from v16.0 to v17.0

Android Pie (9.0) support

Support targeting sub services when selecting an app to hide with MagiskHide, meaning background services of hidden apps would not be able to detect root

Fix root loss issue when MagiskHide is enabled

Support Samsung S9/S9+/Note 9

And of course, tons of bug fixes and improvements you're not aware of :)
[Magisk] topjohnwu:
2018.9.21 Magisk v17.2

Unexpected early release due to a bug in Magisk Manager that never surfaced until some online repo triggered it LOL. But well this means you get several sweet features early too :)

Magisk Manager Obfuscation

There are some detection method out in the wild (e.g. PS4 Remote Play) that analyzes all installed APKs to find signs of Magisk Manager to mitigate the package name randomization feature within the app. The counter-counter-attack here is to do excessive obfuscation so it can no longer do so.

New Communication Scheme

However, for full obfuscation to be possible, it creates some issues. In MagiskSU's code, some Java class names in Magisk Manager are hardcoded as destinations to send requests and logging information. A completely new communication scheme is written from scratch to eliminate any class name assumptions in MagiskSU, so that 100% Magisk Manager obfuscation is achievable. This current release (Magisk Manager 6.0.0), however, is not built with full obfuscation due to the requirement to be backwards compatible with v17.1.

Randomize Service Names

Magisk injects several init services to startup the daemon. Some apps (e.g. Fate Grand Order) are updated to detect these specific service names to determine whether Magisk services are running on your device. MagiskInit is updated to randomly generate service names pre-init, so every time your device reboots it will use a different service name.

Updated Resetprop

Android Pie introduced a new type of system property format that previous resetprop is not able to handle. Several properties, for example device fingerprint props, are therefore unable to be modified (many people modify device fingerprint to pass CTS). Resetprop is updated to use the upstream AOSP code base to process system properties.