Install Magisk on Huawei Mate 9 - Magisk

I am currently using rooted Huawei Mate 9 using this guide.
Before proceeding to install Magisk, may I confirm:
1. is it possible for me to install Magisk with the current setup?
2. will I be able to do OTA update after installing Magisk?
3. Is there anything I have to take note?
Thanks in advanced for the reply.

A user in the main discussion thread noted that installation failed on his Mate 9.

jash1412 said:
I am currently using rooted Huawei Mate 9 using this guide.
Before proceeding to install Magisk, may I confirm:
1. is it possible for me to install Magisk with the current setup?
2. will I be able to do OTA update after installing Magisk?
3. Is there anything I have to take note?
Thanks in advanced for the reply.
Click to expand...
Click to collapse
Were you ever successful in getting Magisk on your Mate 9 (I have a Mate 9 Pro coming next week)

jash1412 said:
I am currently using rooted Huawei Mate 9 using this guide.
Before proceeding to install Magisk, may I confirm:
1. is it possible for me to install Magisk with the current setup?
2. will I be able to do OTA update after installing Magisk?
3. Is there anything I have to take note?
Thanks in advanced for the reply.
Click to expand...
Click to collapse
I too would like to know if you got this working. Found an article online that seems to say it's possible, but I'm dubious.

Bumping this. I tried to install Magisk via TWRP and it didn't work. Anyone have any luck?

allen099 said:
Bumping this. I tried to install Magisk via TWRP and it didn't work. Anyone have any luck?
Click to expand...
Click to collapse
What does the recovery log from the installation say?
There's been a lot of work on compatibility lately, so if there's an issue like that you might have better luck with the next release. Meanwhile it could be worth trying the unofficial build snapshots to see if it installs: https://forum.xda-developers.com/apps/magisk/unofficial-magisk-v10-beta-built-t3521901

Didgeridoohan said:
What does the recovery log from the installation say?
There's been a lot of work on compatibility lately, so if there's an issue like that you might have better luck with the next release. Meanwhile it could be worth trying the unofficial build snapshots to see if it installs: https://forum.xda-developers.com/apps/magisk/unofficial-magisk-v10-beta-built-t3521901
Click to expand...
Click to collapse
The installation of Magisk crashes when loop mounting /data/magisk.img. It does something like
Code:
make_ext4fs ... /data/magisk.img
losetup /dev/block/loop0 /data/magisk.img
mount -t ext4 -o loop /dev/block/loop0 /magisk
But that's not an issue that Magisk can solve.
It seems that the current TWRP implementations for the Mate 9 cannot handle loop mounts.

st_voss said:
The installation of Magisk crashes when loop mounting /data/magisk.img. It does something like
Code:
make_ext4fs ... /data/magisk.img
losetup /dev/block/loop0 /data/magisk.img
mount -t ext4 -o loop /dev/block/loop0 /magisk
But that's not an issue that Magisk can solve.
It seems that the current TWRP implementations for the Mate 9 cannot handle loop mounts.
Click to expand...
Click to collapse
I read that the setup works but the mounts fails. Stock kernel problem.

Confirm the same. Does not install the zip. i wonder if we temp flash a custom kernel, then install, and reflash will that work? or perhaps manually place files from the zip in place and set perms?
---------- Post added at 05:12 AM ---------- Previous post was at 05:11 AM ----------
what files would be needed to overcome this hurdle?

Not sure if this helps, but with the superroot script, someone mentioned adding a boot line to fix the install... or maybe it was supersu...
https://forum.xda-developers.com/mate-9/development/root-supersu-2-79-t3573155

seems the build 170416 installs, but the manager still says to install the zip.

wrecklesswun said:
Confirm the same. Does not install the zip. i wonder if we temp flash a custom kernel, then install, and reflash will that work? or perhaps manually place files from the zip in place and set perms?
---------- Post added at 05:12 AM ---------- Previous post was at 05:11 AM ----------
what files would be needed to overcome this hurdle?
Click to expand...
Click to collapse
Of course a custom kernel would help a lot. But Huawei so far hasn't released the kernel sources for its Kirin 960 devices. So currently we have no custom kernel for Mate 9 etc.
I don't think that manually placing/copying files from the zip would help.
IMO the main purpose of Magisk is to avoid any modifications of /system. To reach that goal it uses loop mounts so that certain files/binaries that normally would be placed somewhere into /system can be placed in /data or elsewhere.

Tikerz said:
I read that the setup works but the mounts fails. Stock kernel problem.
Click to expand...
Click to collapse
Some update:
Looks like with newer EMUI builds loop mounting works with the stock kernel. I'm on currently on MHA-L29C432B182.
This is the kernel version:
Code:
> adb shell uname -a
Linux localhost 4.1.18-g0ad0fb3 #1 SMP PREEMPT Tue Apr 11 12:25:26 CST 2017 aarch64

st_voss said:
Some update:
Looks like with newer EMUI builds loop mounting works with the stock kernel. I'm on currently on MHA-L29C432B182.
This is the kernel version:
Code:
> adb shell uname -a
Linux localhost 4.1.18-g0ad0fb3 #1 SMP PREEMPT Tue Apr 11 12:25:26 CST 2017 aarch64
Click to expand...
Click to collapse
Did you manage to install magisk?

Andy4Shurr said:
Did you manage to install magisk?
Click to expand...
Click to collapse
Yes, please see https://forum.xda-developers.com/showpost.php?p=72070388&postcount=692

Do not reboot with Magisk Hide activated
Just a warning when using Magisk Hide on the Mate 9!
Avoid rebooting with Hide activated. You won't be able to unlock your device. Neither with fingerprint nor with PIN.
Seems that Hide conflicts with some Trusted Execution Environment of the device.

Related

Addon.d script for Xposed to survive CM12 flashes

/system/addon.d/ is a folder in CM roms where the user (and sometimes apps) can put scripts that will be run when you flash a new version of the rom.
Tipically those scripts are used to backup system apps, and their files, so that they can survive a format and reflash.
For example, this is how you would keep SuperSU (root), Avast Agent,...
I made the script below so that @rovo89's Xposed for Lollipop will survive (that is keep it installed) when I flash a new CM12 nightly.
Tested on my phone (32bits), just flashed latest CM12 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on TWRP 2.8.5.1, might not work with other recovery.
Warning: It's for Xposed for Lollipop only. It work as of today. It might not work later with new future versions of Xposed. Also not sure it would work for 64bits.
Download script only:
If you use SuperSu:
81-Xposed.sh
Or flashable zip, see post attachment below:
If you don't use SuperSu, see and flash this other version by DualJoe, see http://forum.xda-developers.com/showthread.php?p=59199445.
So to clarify, this works when you dirty flash? But if you clean flash you need to set everything up again?
click here for my device info:
~~~~~~~~~~~~~~~~~~
DEVICE: SM-N900W8
ROM: Temasek's CM12 v7.7
BASEBAND: N900W8VLUCNI1
KERNEL: 3.4.106-f2fs-temasek-cm12-hlte-v0.66+
RECOVERY: TWRP 2.8.5.0 hlte
XPOSED? YEAH BABY!
vanisleguy1976 said:
So to clarify, this works when you dirty flash? But if you clean flash you need to set everything up again?
click here for my device info:
~~~~~~~~~~~~~~~~~~
DEVICE: SM-N900W8
ROM: Temasek's CM12 v7.7
BASEBAND: N900W8VLUCNI1
KERNEL: 3.4.106-f2fs-temasek-cm12-hlte-v0.66+
RECOVERY: TWRP 2.8.5.0 hlte
XPOSED? YEAH BABY!
Click to expand...
Click to collapse
That's indeed a very good question ?.
Yes, I use it when dirty flashing, primarily to save time and streamline the process, that is, I avoid having to flash the Xposed zip over again.
If you do a clean flash (ie. with a wipe data) I think it should keep all the stuff in place (all the stuff installed by the Xposed zip). In that case thought, you'll need to reinstall the Xposed Installer, as well as all the modules you add. In that case you wouldn't really save much time I believe.
Sent from my OnePlus One using Tapatalk
And if real clean flash as like wipe system, it won't survive..
But for dirty it's great, going into recovery as writing it, thanks you..
reemar said:
And if real clean flash as like wipe system, it won't survive..
But for dirty it's great, going into recovery as writing it, thanks you..
Click to expand...
Click to collapse
Yeah, true, if you wipe system you remove that whole addon.d folder, which is good (might be needed).
Yes, it's basically for those who flash Nightlies every now and then (which don't require wiping more than cache and dalvik).
Sent from my OnePlus One using Tapatalk
adlx.xda said:
That's indeed a very good question ?.
Yes, I use it when dirty flashing, primarily to save time and streamline the process, that is, I avoid having to flash the Xposed zip over again.
If you do a clean flash (ie. with a wipe data) I think it should keep all the stuff in place (all the stuff installed by the Xposed zip). In that case thought, you'll need to reinstall the Xposed Installer, as well as all the modules you add. In that case you wouldn't really save much time I believe.
Sent from my OnePlus One using Tapatalk
Click to expand...
Click to collapse
I'll have to wait till Temasek comes back from holidays before I can test this
adlx.xda said:
/system/addon.d/ is a folder in CM roms where the user (and sometimes apps) can put scripts that will be run when you flash a new version of the rom.
Tipically those scripts are used to backup system apps, and their files, so that they can survive a format and reflash.
For example, this is how you would keep SuperSU (root), Avast Agent,...
I made the script below so that @rovo89's Xposed for Lollipop will survive (that is keep it installed) when I flash a new CM12 nightly.
Tested on my phone (32bits), just flashed latest CM12 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on TWRP 2.8.5.1, might not work with other recovery.
Warning: It's for Xposed for Lollipop only. It work as of today. It might not work later with new future versions of Xposed. Also not sure it would work for 64bits.
Download script only: 81-Xposed.sh
Or flashable zip, see post attachment below:
Click to expand...
Click to collapse
I have some questions, please forgive my lack of knowledge.
How do you get the script into the addon folder in the CM nightly?
Also, do you know if it can be used in conjunction with Cyandelta updater?
Thnx, Alex
alexdpaul said:
I have some questions, please forgive my lack of knowledge.
How do you get the script into the addon folder in the CM nightly?
Also, do you know if it can be used in conjunction with Cyandelta updater?
Thnx, Alex
Click to expand...
Click to collapse
Just flash the zip in the fist post. This will install the script in the right place in your phone. After that you can flash Nightlies like you always do, manually or with Cyandelta (I use Cyandelta myself too).
You just have to flash the script once, it will also survive future flashes.
Sent from my OnePlus One using Tapatalk
adlx.xda said:
Just flash the zip in the fist post. This will install the script in the right place in your phone. After that you can flash Nightlies like you always do, manually or with Cyandelta (I use Cyandelta myself too).
You just have to flash the script once, it will also survive future flashes.
Sent from my OnePlus One using Tapatalk
Click to expand...
Click to collapse
Thanks, flashed the zip, just need to wait for the next nightly to see if it works for me.
Thanks for your quick reply!
You're missing at least one file (app_process32):
Code:
localhost bin # ls -l |grep app_
lrwxr-xr-x 1 root shell 13 Feb 23 20:53 app_process -> app_process32
lrwxrwxrwx 1 root root 32 Feb 24 17:36 app_process32 -> /system/bin/app_process32_xposed
-rwxr-xr-x 1 root shell 13664 Feb 23 20:53 app_process32_original
-rwxr-xr-x 1 root shell 72757 Feb 24 17:36 app_process32_xposed
DualJoe said:
You're missing at least one file (app_process32):
Code:
localhost bin # ls -l |grep app_
lrwxr-xr-x 1 root shell 13 Feb 23 20:53 app_process -> app_process32
lrwxrwxrwx 1 root root 32 Feb 24 17:36 app_process32 -> /system/bin/app_process32_xposed
-rwxr-xr-x 1 root shell 13664 Feb 23 20:53 app_process32_original
-rwxr-xr-x 1 root shell 72757 Feb 24 17:36 app_process32_xposed
Click to expand...
Click to collapse
I've been flashing various nightly and Xposed has survived all of them, so it works for me, no file missing as far as I can tell.
On my phone app_process32 is modified by SuperSu, and flash survival is handled by SuperSu script in addon.d (99-supersu.sh).
Sent from my OnePlus One using Tapatalk
adlx.xda said:
/system/addon.d/ is a folder in CM roms where the user (and sometimes apps) can put scripts that will be run when you flash a new version of the rom.
Tipically those scripts are used to backup system apps, and their files, so that they can survive a format and reflash.
For example, this is how you would keep SuperSU (root), Avast Agent,...
I made the script below so that @rovo89's Xposed for Lollipop will survive (that is keep it installed) when I flash a new CM12 nightly.
Tested on my phone (32bits), just flashed latest CM12 nightly, wiped cache and dalvik-cache and the phone rebooted fine (and Xposed was still working). Tested on TWRP 2.8.5.1, might not work with other recovery.
Warning: It's for Xposed for Lollipop only. It work as of today. It might not work later with new future versions of Xposed. Also not sure it would work for 64bits.
Download script only: 81-Xposed.sh
Or flashable zip, see post attachment below:
Click to expand...
Click to collapse
Work for me cm12(32bit) thx
Nice, it's work on my Xperia Z1 with CM12.
Not working for me on Oneplus One CM12, the XposedBridge.jar survives but not app_process, the OnePlus One has an ARM v7, so what do I need to modify in the config file?
card13 said:
Not working for me on Oneplus One CM12, the XposedBridge.jar survives but not app_process, the OnePlus One has an ARM v7, so what do I need to modify in the config file?
Click to expand...
Click to collapse
I also have a Oneplus One.
Do you have SuperSu? Go in SuperSu settings and check if you have installed the script to survive flashes.
Sent from my OnePlus One using Tapatalk
I don't have SuperSu, haven't used that since the nightlies became official and builtin su was working properly.
card13 said:
I don't have SuperSu, haven't used that since the nightlies became official and builtin su was working properly.
Click to expand...
Click to collapse
Ok, that's the reason why it fails for you then... I'll have to work that our then.
Sent from my OnePlus One using Tapatalk
How unistall this?
Rygiel98 said:
How unistall this?
Click to expand...
Click to collapse
Uninstall? Remove the file /system/addon.d/81-xposed.sh from your system.
Sent from my OnePlus One using Tapatalk
card13 said:
Not working for me on Oneplus One CM12, the XposedBridge.jar survives but not app_process, the OnePlus One has an ARM v7, so what do I need to modify in the config file?
Click to expand...
Click to collapse
Here is a fixed version.
Added entry:
[...]
list_files() {
cat <<EOF
bin/app_process32
bin/app_process32_xposed
bin/dex2oat
bin/oatdump
[...]
Click to expand...
Click to collapse

Magisk not installed yet properly rooted

Hi guys, I've been having problems getting magisk v11.1 to install correctly.
I have a Samsung galaxy s5 which I use to play about with. I flashed magisk v11.1 which installed properly. After starting up my phone and getting the Magisk manager app it's telling me magisk is not installed. Yet the manager also tells me its properly rooted 6:MAGISKSU (topjohnwu)
The manager gives me the option to download and install v11.1 when I install it through the manager app it says installation succeeded, yet when I reboot I get the same results again. Magisk is not installed, properly rooted.
Does anyone have any ideas what I might be doing wrong?
Ok. This has been reported a few times, but I've not seen it properly troubleshooted yet.
1 - Root is working on your device? You can grant root to root apps?
2 - Do you have a file called magisk.img in /data?
I can't see the file in that directory. I also did a search and nothing came up
I can use root explorer in ES file explorer
Just to make sure: it's supposed to be in the /data folder found in root (where you'll also find /etc, /system, and so on), not in your main storage. If it's not there, that's your problem. That the Magisk image isn't installing correctly.
Could you also upload a recovery log from flashing Magisk in recovery?
Sorry I made a mistake, I was looking in Data>Magisk folder, in / Data there is a file called magisk.img
Awesome. Then that's not the issue then...
Recovery log and Magisk log, please...
Sorry for the noob question, but where do I find the logs?
Exactly the same problem with my NOTE 4 on Android 6.0.1. After Reboot Magisk is gone. Without Reboot works perfect (SU and Safetynet).
Looks like temporary "magisk".
The Boot Image Path is automatic (mmcblk0p17). Maybe change. But which one? There are about 20 paths.
I did a quick search and found another couple of posts in the support thread about this issue. Guess what you all have in common? Samsung... The statistical material is way to small to make any definite assumptions, but it points to a trend. And we know that Samsung doesn't always play nice with Magisk.
Have you guys tried a custom kernel? No guarantees, of course...
Possibly useful logs for troubleshooting:
- Recovery log from installation (saved in recovery right after flashing Magisk, can also possibly be found in /cache/recovery after booting up the device).
- Magisk log. Found and exported from the Manager (make sure verbose logging is enabled), or if that doesn't work it can be found in the /cache folder (accessible though TWRP if nothing else works).
- Logcat from boot. Use a computer, connect the device and use ADB to catch a logcat from boot up until you can confirm that Magisk reports "not installed" (How to logcat).
If nothing works, open an issue on GitHub with a detailed description, logs and boot image attached (just make sure no-one else has opened one before, if so post your information to that issue).
Same problem
Same problem here in a G900F (galaxy s5) with [ROM][G900F][ALEXNDR] CQBW, i can grant access to apps and the magisk.img is in /data, but magisk manager says that magisk is not installed.
Attached magisk and recovery logs
recovery and magisk logs
I tried a custom kernel like you said and it seems to work now. The status is all passes. I used this [EOL][KERNEL] [SM-G900F] [Samsung Stock M/LP] Boeffla-Kernel (25-11-2016) kernel
K3vG said:
I tried a custom kernel like you said and it seems to work now. The status is all passes. I used this [EOL][KERNEL] [SM-G900F] [Samsung Stock M/LP] Boeffla-Kernel (25-11-2016) kernel
Click to expand...
Click to collapse
Did somebody knows something like this above for the NOTE 4 SM-N910F? I have no experience with custom kernels.
Since @K3vG managed to fix the problem with a custom kernel it's very probable that this is a compatibility issue with the stock boot image.
Would any of you fine gentlemen like to contribute to the community and development of Magisk? It'd be helpful if one of you could open an issue on GitHub about this, with details and a copy of the problem boot image. It'd probably also be helpful if the rest of you then could add your boot images...
Of course, there are no guarantees, but if there's an open issue on GitHub with the above mentioned information there's at least a chance that @topjohnwu can take a look at it and possibly even fix the compatibility issue.
Didgeridoohan said:
Since @K3vG managed to fix the problem with a custom kernel it's very probable that this is a compatibility issue with the stock boot image.
Would any of you fine gentlemen like to contribute to the community and development of Magisk? It'd be helpful if one of you could open an issue on GitHub about this, with details and a copy of the problem boot image. It'd probably also be helpful if the rest of you then could add your boot images...
Of course, there are no guarantees, but if there's an open issue on GitHub with the above mentioned information there's at least a chance that @topjohnwu can take a look at it and possibly even fix the compatibility issue.
Click to expand...
Click to collapse
There is already an open issue https://github.com/topjohnwu/Magisk/issues/94
ccerrillo said:
There is already an open issue https://github.com/topjohnwu/Magisk/issues/94
Click to expand...
Click to collapse
Awesome! I checked but missed that one. Then someone should upload a boot image to that issue.
Didgeridoohan said:
Awesome! I checked but missed that one. Then someone should upload a boot image to that issue.
Click to expand...
Click to collapse
What is that image? /data/magisk.img??
ccerrillo said:
What is that image? /data/magisk.img??
Click to expand...
Click to collapse
You'll find boot.img in your ROM zip or factory image. Alternatively you can make a backup of Boot in TWRP and upload that.
K3vG said:
I tried a custom kernel like you said and it seems to work now. The status is all passes. I used this [EOL][KERNEL] [SM-G900F] [Samsung Stock M/LP] Boeffla-Kernel (25-11-2016) kernel
Click to expand...
Click to collapse
I flashed that kernel too, and then i can install magisk, but magisk manager tell's "SafetyNet failed CTS profile missmatch"
What i do:
1.- Flash Alexndr rom (G900FXXS1CQBW_DevBase_v3.8.zip << Android 6.0.1 - stable)
2. Reboot
3.- Flash [EOL][KERNEL] [SM-G900F] [Samsung Stock M/LP] Boeffla-Kernel (25-11-2016) kernel
4.- Reboot
5.- Flash Magisk V11.1
6.- Reboot
7.- Enable Magisk Hide
8.- Reboot
9.- "SafetyNet failed CTS profile missmatch" :crying:
What i'm missing?? What steps did you follow to bypass SafetyNet??
---------- Post added at 09:11 PM ---------- Previous post was at 09:06 PM ----------
Didgeridoohan said:
You'll find boot.img in your ROM zip or factory image. Alternatively you can make a backup of Boot in TWRP and upload that.
Click to expand...
Click to collapse
I got it!! Thanks!
ccerrillo said:
I flashed that kernel too, and then i can install magisk, but magisk manager tell's "SafetyNet failed CTS profile missmatch"
What i do:
1.- Flash Alexndr rom (G900FXXS1CQBW_DevBase_v3.8.zip << Android 6.0.1 - stable)
2. Reboot
3.- Flash [EOL][KERNEL] [SM-G900F] [Samsung Stock M/LP] Boeffla-Kernel (25-11-2016) kernel
4.- Reboot
5.- Flash Magisk V11.1
6.- Reboot
7.- Enable Magisk Hide
8.- Reboot
9.- "SafetyNet failed CTS profile missmatch" :crying:
What i'm missing?? What steps did you follow to bypass SafetyNet??
---------- Post added at 09:11 PM ---------- Previous post was at 09:06 PM ----------
I got it!! Thanks!
Click to expand...
Click to collapse
did u manage to get this fixed?
I mean, did you found a way to get safetynet to pass with a custom kernel?

[DEPRECATED] [Module/Tool] [2018.10.9] F2FS Loopback Bug Workaround -- No Kernel Patch Needed

THIS PROJECT IS NO LONGER SUPPORTED.
# F2FS Loopback Bug Workaround
## README.md
### Copyright (C) 2017-2018, VR25 @ xda-developers
#### License: GPL v3+
---
#### DISCLAIMER
This software is provided as is, in the hope that it will be useful, but without any warranty. Always read/reread this reference prior to installing/upgrading. While no cats have been harmed, I assume no responsibility under anything which might go wrong due to the use/misuse of it.
A copy of the GNU General Public License, version 3 or newer ships with every build. Please, read it prior to using, modifying and/or sharing any part of this work.
To prevent fraud, DO NOT mirror any link associated with this project; DO NOT share ready-to-flash-builds (zips) on-line!
---
#### DESCRIPTION
Some kernels from devices with F2FS-formatted data partition (i.e., Motorola) have a bug which prevents loopback devices (.img files) from being mounted read-write. This limits systemless modifications that can otherwise be achieved with Magisk.
This module works by moving magisk.img to the cache partition (EXT[2-4]-formatted) and linking it to its actual location (i.e., /data/adb/magisk.img). The other half of the process consists on automatically recreating magisk_merge.img shortly after boot and handling it the same way as magisk.img.
With this workaround, a patched kernel is dispensable.
Cache partition's size is essentially the only limiting factor -- and that's pretty much self-explanatory.
/cache/magisk_.img is automatically backed up to/data/adb on boot (only if modified) & restored on install. Thus, whenever cache is wiped, magisk_.img and its respective symlink can easily be restored by simply reinstalling the module.
---
#### PRE-REQUISITES
- Magisk v15+
- F2FS-formatted data partition
- EXT[2-4]-formatted cache partition
---
#### SETUP STEPS
Fist time
- Install from custom recovery as a regular flashable zip.
Upgrades
- Install from Magisk Manager or custom recovery.
- Reinstall after cache wipes to restore magisk.img backup.
---
#### NOTES/TIPS
Always install large modules from custom recovery only. In fact, I recommend installing every module from recovery if your device's cache partition has a very small size (i.e., only a few Megabytes).
To revert changes, uninstall the module, boot into custom recovery and delete </data/adb/magisk.img> & <magisk.img.bkp>. Lastly (while still in custom recovery), move </cache/magisk_.img> to </data/adb/magisk.img>.
Updates and reinstalls can be carried out from Magisk Manager as well.
---
#### ONLINE SUPPORT
- [Facebook Support Page](https://facebook.com/VR25-at-xda-developers-258150974794782/)
- [Git Repository](https://github.com/Magisk-Modules-Repo/f2fs-loopback-bug-workaround/)
- [XDA Thread](https://forum.xda-developers.com/apps/magisk/guide-magisk-official-version-including-t3577875/)
---
#### RECENT CHANGES
**2018.10.9 (201810090)**
- Bug fixes
- Latest module template, with added sugar.
- Magisk 15-17.2 support
- Updated documentation
**2018.9.2 (201809020)**
- Improved compatibility
- Major optimizations
- Updated documentation
**2018.8.1 (201808010)**
- General optimizations
- Striped down (removed unnecessary code & files)
- Updated documentation
**2018.7.24 (201807240)**
- Fixed modPath detection issue (Magisk V16.6).
- Updated documentation
Works with stock roms as well ?
My cat lost two and half lives because of this thread. Sadly, the disclaimer is in order, so I can't sue.
Is this for Nougat or Marshmallow?
does this work on nougat update or only on MM?
Can someone please confirm if it will work on retin channel with dual sim... I am running stock nougat... Will it work or does it only work on MM rom...
Anybody know how to fix notifications without breaking safety net?
VR25 said:
DISCLAIMER
Not taking responsibility for any thermonuclear war or cat harm. Do it at your any risk.
NEEDED
[Unlocked Bootloader] https://youshouldknowthisbynow.com
[Latest TWRP] https://forum.xda-developers.com/mo...recovery-unofficial-twrp-moto-z-play-t3495629 credits @Alberto97
[Latest FSFS patched Kernel] https://forum.xda-developers.com/moto-z-play/development/kernel-stock-kernel-f2fs-patched-t3546732 credits @tomparr
[Latest Magisk zip] https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 credits @topjohnwu
[Latest Magisk Manager app] https://play.google.com/store/apps/details?id=com.topjohnwu.magisk&hl=en credits @topjohnwu
PROCEDURE
0. reboot bootloader
1. fastboot boot twrp.img
2. adb sideload fsfs patched kernel
3. adb sideload magisk
4. reboot system
5. install magisk manager from play store
6. reboot bootloader [yes, again]
7. fastboot boot twrp.img [yes, again]
8. adb sideload magisk [yes, again]
9. reboot system [yes, ag... you get the point]
10. open magisk manager settings, enable "magisk hide"
11. reboot, done
Click to expand...
Click to collapse
Works like a charm.
I however did not temporarly boot into TWRP, I flashed it as such.
mhp1995 said:
does this work on nougat update or only on MM?
Click to expand...
Click to collapse
I'm on Android 7.0 Nougat.
Thanks!
Erwin
fortunz said:
My cat lost two and half lives because of this thread. Sadly, the disclaimer is in order, so I can't sue.
Click to expand...
Click to collapse
Hopefully your cat is ok now
jjdavis699 said:
Is this for Nougat or Marshmallow?
Click to expand...
Click to collapse
mhp1995 said:
does this work on nougat update or only on MM?
Click to expand...
Click to collapse
mhp1995 said:
Can someone please confirm if it will work on retin channel with dual sim... I am running stock nougat... Will it work or does it only work on MM rom...
Click to expand...
Click to collapse
It should work on both Marshmallow and Nougat, as long as you pick the appropriate kernel for your system version (6 or 7). @mhp1995, I don't think the software channel matters. It should work across all (retus, retin , reteu, etc.).
xxBrun0xx said:
Anybody know how to fix notifications without breaking safety net?
Click to expand...
Click to collapse
No idea at this point, man. I've never had to fix mine. Perhaps only some people have it...?
@erwin, I chose not to touch the stock recovery to keep OTA installations straightforward. Easy for everyone.
one question... if i wanted to install viper4android and xposed framework, should i download it from the magisk download tab or shud i flash them manually via TWRP? thanks
mhp1995 said:
one question... if i wanted to install viper4android and xposed framework, should i download it from the magisk download tab or shud i flash them manually via TWRP? thanks
Click to expand...
Click to collapse
There are specific versions of these modified for systemless root. DO NOT install the standard versions. You should follow the instructions given in Magisk Manager app to download and install.
VR25 said:
There are specific versions of these modified for systemless root. DO NOT install the standard versions. You should follow the instructions given in Magisk Manager app to download and install.
Click to expand...
Click to collapse
Ok :good: I think xposed is not available at the moment for nougat ..Its WIP....If possible when the time comes try to include installing xposed via Magisk tutorial in this thread too.... Coming to the posts, u mind if i add this rooting tutorial in my all-in-one thread? Of course credits will be given
mhp1995 said:
Ok :good: I think xposed is not available at the moment for nougat ..Its WIP....If possible when the time comes try to include installing xposed via Magisk tutorial in this thread too.... Coming to the posts, u mind if i add this rooting tutorial in my all-in-one thread? Of course credits will be given
Click to expand...
Click to collapse
Oh, yes the availability... I forgot to mention that. Hopefully a proper Xposed version will be available for nougat very soon. When that happens, I'll update the thread.
About adding the tutorial to your thread... sure, go ahead.
I honestly declare I didn't read whole thread - is this method work for stock Nougat rom - I need root for Titanium Backup only for now , since facebook messenger goes crazy on my new phone MZP :-/ . Or maybe there is a way to restore old conversations ,not restored automatically in Facebook Messenger - anybody knows how to do it ? . On every phone I had I used root for two things mainly - Titanium Backup and to block adds - dns66 do block adds very well without root but , Titanium Backup has no alternative for me .
Just for the records: Magisk 12 release works fine.
@sebx_g1 incredible 2 pages! That are more than 10 postings! Sure nobody can read so much. And nearly all ask or answer your question, but it is just too much ...
tag68 said:
Just for the records: Magisk 12 release works fine.
@sebx_g1 incredible 2 pages! That are more than 10 postings! Sure nobody can read so much. And nearly all ask or answer your question, but it is just too much ...
Click to expand...
Click to collapse
[emoji4] but voting is only 3 works 2 not, so?
Wysłane z mojego XT1635-02 przy użyciu Tapatalka
What is expected to be done for next OTA to work? Just restore Nandroid backup of boot partition and everything should be ready for patchlevel newer than January 2017, right? And afterwards f2fs fixed kernel and Magisk again for having root again of course.
(twrp not flashed, no logo modified, system should be untouched)
---------- Post added at 09:14 PM ---------- Previous post was at 09:11 PM ----------
sebx_g1 said:
[emoji4] but voting is only 3 works 2 not, so?
Click to expand...
Click to collapse
Xposed does not work on Nougat by now. Magisk does. The 2 negative votes you counted referred to Xposed
Anyone have an adblock that works with systemless and passes safetynet? Do we need to check the "enable systemless for adblocks" in Magisk settings?
DNS66 do the same what do adblock, you can use it without root. But yes, there is special version of adblock systemless.
Wysłane z mojego XT1635-02 przy użyciu Tapatalka
Worked fantastically, thanks a lot!

How can I make changes to /system in nougat?

Quick summary, I can not:
mount -o remount,rw /system in normal mode even with root permission. Error is "Device busy"
modify files in /system in twrp and keep it persistent. It somehow roll back to the stock state after reboot into normal mode.
I'm a long-time linux user, and fairly familiar with rooting in pre-nougat versions. My previous phone is Oneplus-X in LineageOS-14, and I could do whatever I like with the system partition. Recently I received a P9 as present. I updated the rom to B377 and flashed OldDroid's TWRP-3.1.0+phh su. But I can not find a way to modify the /system partition. I need to change a lot of things, like /system/etc/hosts, adding apk into /system/priv-app, etc.
Could someone help?
ccaappton said:
Quick summary, I can not:
mount -o remount,rw /system in normal mode even with root permission. Error is "Device busy"
modify files in /system in twrp and keep it persistent. It somehow roll back to the stock state after reboot into normal mode.
I'm a long-time linux user, and fairly familiar with rooting in pre-nougat versions. My previous phone is Oneplus-X in LineageOS-14, and I could do whatever I like with the system partition. Recently I received a P9 as present. I updated the rom to B377 and flashed OldDroid's TWRP-3.1.0+phh su. But I can not find a way to modify the /system partition. I need to change a lot of things, like /system/etc/hosts, adding apk into /system/priv-app, etc.
Could someone help?
Click to expand...
Click to collapse
Hopefully this might help:
1. revert back to unmodified boot image (in TWRP flash from here[/URL or restore your backup from the unmodified boot image] , leave anything else untouched (especially TWRP 3.1.0-0 for EMUI 5)
2. flash this [URL="https://forum.xda-developers.com/showpost.php?p=71588837&postcount=102"]SuperSU image in TWRP (read the comments in the post please ... single bootloop ... then everything is ok and rooted)
3. install JRummy's BusyBox from Google Play (Stephen's won't work)
You are done and good to modify /system.
Note: resulting earthquakes, thunderstorms and spring floods from this work are solely under your own responsibility :laugh:
hakaz said:
Hopefully this might help:
1. revert back to unmodified boot image (in TWRP flash from here[/URL or restore your backup from the unmodified boot image] , leave anything else untouched (especially TWRP 3.1.0-0 for EMUI 5)
2. flash this [URL="https://forum.xda-developers.com/showpost.php?p=71588837&postcount=102"]SuperSU image in TWRP (read the comments in the post please ... single bootloop ... then everything is ok and rooted)
3. install JRummy's BusyBox from Google Play (Stephen's won't work)
You are done and good to modify /system.
Note: resulting earthquakes, thunderstorms and spring floods from this work are solely under your own responsibility :laugh:
Click to expand...
Click to collapse
1. I did a backup of boot partition before phh root, so should be able to restore the backup, instead of download the boot partition from others?
2. Is systemless supersu binaries need be individualized for every phone? Can I download systemless supersu from somewhere more semi-official? I'm not exactly comfortable installing zips from random links. ()
Ad 1. Till now rooting on our P9 works through injection of the su mounting routine into the kernel in boot section (if using a modified kernel + su installation or modifying the kernel during su installation itself doesn't make a difference). So any su installation modifies the boot section and you mess things up if you try to install another su on top of the other. Therefore reverting to the original boot image is mandatory before installation of another su.
Ad 2. The su is compiled against different platforms​ not phones (in our case arm64). So @Chainfire has the different platform variations in his package. The "shady" package in our case is basically the v2.79 stable version of 12/20 2016 (you can unpack both packages and compare them against each other, they are bit for bit equal) but has an P9 specific injection routine to modify the kernel. After installation you have pure su v2.79 stable on board - not more, not less.
Sorry, "normal" SuperSU packages won't work due to lacking the kernel modification (phh uses a modified kernel instead you have to flash separately on P9).
Cheers!
hakaz said:
Ad 1. Till now rooting on our P9 works through injection of the su mounting routine into the kernel in boot section (if using a modified kernel + su installation or modifying the kernel during su installation itself doesn't make a difference). So any su installation modifies the boot section and you mess things up if you try to install another su on top of the other. Therefore reverting to the original boot image is mandatory before installation of another su.
Ad 2. The su is compiled against different platforms​ not phones (in our case arm64). So @Chainfire has the different platform variations in his package. The "shady" package in our case is basically the v2.79 stable version of 12/20 2016 (you can unpack both packages and compare them against each other, they are bit for bit equal) but has an P9 specific injection routine to modify the kernel. After installation you have pure su v2.79 stable on board - not more, not less.
Sorry, "normal" SuperSU packages won't work due to lacking the kernel modification (phh uses a modified kernel instead you have to flash separately on P9).
Cheers!
Click to expand...
Click to collapse
Thanks buddy! I flashed systemless supersu, and stucked in infinite bootloop(it is only once in your post), probably because my model is EVA-AL00. I have to restore the previous boot.img.
ccaappton said:
Quick summary, I can not:
mount -o remount,rw /system in normal mode even with root permission. Error is "Device busy"
modify files in /system in twrp and keep it persistent. It somehow roll back to the stock state after reboot into normal mode.
I'm a long-time linux user, and fairly familiar with rooting in pre-nougat versions. My previous phone is Oneplus-X in LineageOS-14, and I could do whatever I like with the system partition. Recently I received a P9 as present. I updated the rom to B377 and flashed OldDroid's TWRP-3.1.0+phh su. But I can not find a way to modify the /system partition. I need to change a lot of things, like /system/etc/hosts, adding apk into /system/priv-app, etc.
Could someone help?
Click to expand...
Click to collapse
Same here with Oneplus 3T.
I just posted in another post (Google Pixel).
There I just guess it was a new encription way, now Im sure, all three devices with Android 7.1.1.....

[solved] Uninstall Magisk module offline/without Magisk?

(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
zdimension said:
(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
Click to expand...
Click to collapse
Use mount-magisk.zip found in collection of modules thread and delete the folder via twrp in /magisk
@duxishere Thanks so much!
I searched for "Magisk module offline uninstall" but did find anything. This was exactly what I needed! The culprit was App Systemizer. I've had it installed for some time and it didn't cause any problems. I uninstalled it, and it worked! Flashing it again restored the boot problem.
zdimension said:
@duxishere Thanks so much!
I searched for "Magisk module offline uninstall" but did find anything. This was exactly what I needed! The culprit was App Systemizer. I've had it installed for some time and it didn't cause any problems. I uninstalled it, and it worked! Flashing it again restored the boot problem.
Click to expand...
Click to collapse
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
gonsa said:
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
Click to expand...
Click to collapse
Start reading the thread from the beginning and you'll find it.
gonsa said:
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
Click to expand...
Click to collapse
Install "Uninstaller Mod Magisk" from TWRP. Then go in the TWRP terminal and type uninmod_magisk and follow the instructions.
please post the link to thread unistaller magisk module, to other users follow the solution!
edit:
there is https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
nodio said:
please post the link to thread unistaller magisk module, to other users follow the solution!
edit:
there is https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
Click to expand...
Click to collapse
Not working for me!
I will uninstall "Audio Compatibility Patch" V1.0 from zackptg5 & ahrion
In Magisk Manger Status is always " Module will be updated at the next start"
If i use the "TWRP-Uninstaller" the Modul is not in List!
dewois said:
Not working for me!
I will uninstall "Audio Compatibility Pach" V1.0 from zackptg5 & ahrion
In Magisk Manger Status is always " Module will be updated at the next start"
If i use the "TWRP-Uninstaller" the Modul is not in List!
Click to expand...
Click to collapse
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Didgeridoohan said:
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Click to expand...
Click to collapse
".... Go the module folder under /sbin/.core/img ..."
I dont have this folder in /sbin!
tobi14 said:
".... Go the module folder under /sbin/.core/img ..."
I dont have this folder in /sbin!
Click to expand...
Click to collapse
If you have a current version of Magisk installed, yes you do. Enable viewing hidden files and folders in your file explorer. The dot at the beginning of the folder name means it's hidden...
zdimension said:
(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
Click to expand...
Click to collapse
If you can launch TWRP then :
Check magisk.img exist
1. Go to "advanced" and then click on "File Explorer".
2. Check there is "magisk.img" file under "/data"
Backup magisk.img
1. Go to "advanced" and then click on "terminal command".
2. type following command
Code:
cp /data/magisk.img /data/magisk.img.bk
Mount magisk.img
1. Make a temp folder
Code:
mkdir /mktmp
2. Mount magisk.img to /mktmp
Code:
mount -o loop /data/magisk.img /mktmp
3. Navigate to mktmp and remove your module
Code:
cd /mktmp
rm -rf /mktmp/xxxx
Unmount magisk.img and reboot to check if it's work
1. Unmount magisk.img
Code:
umont /mktmp
2. Leave terminal and reboot the phone
3. Enjoy!
mklee11224 said:
If you can launch TWRP then :
Check magisk.img exist
1. Go to "advanced" and then click on "File Explorer".
2. Check there is "magisk.img" file under "/data"
Backup magisk.img
1. Go to "advanced" and then click on "terminal command".
2. type following command
Code:
cp /data/magisk.img /data/magisk.img.bk
Mount magisk.img
1. Make a temp folder
Code:
mkdir /mktmp
2. Mount magisk.img to /mktmp
Code:
mount -o loop /data/magisk.img /mktmp
3. Navigate to mktmp and remove your module
Code:
cd /mktmp
rm -rf /mktmp/xxxx
Unmount magisk.img and reboot to check if it's work
1. Unmount magisk.img
Code:
umont /mktmp
2. Leave terminal and reboot the phone
3. Enjoy!
Click to expand...
Click to collapse
Thanks mate ! it worked like a charm !
just use "ls" command on step 3 after changing directory to mktmp , to show installed modules.:silly:
My Phone Specification : Moto X Play ------ 7.1.1 Stock Firmware -------- Squid kernel --------- rooted using Magisk ------ systemless xposed module "xposed_25" installed using magisk module(Uninstalled by this method !) .:victory:
Tanks a lot!
Crossbreeder lite made my phone unusable. Working fine again!
magisk.img not found in /data
This works like charm, if you can't find the magisk.img in `/data` check `/data/adb` ... I hope this work .
Didgeridoohan said:
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Click to expand...
Click to collapse
Own domain huh? Business growing? Hehehe I only came for the uninstall zip, hey quick question, I'm on a micro sd-less phone (big news), still a flashaholic, kinda, but my phone so happens to require a data format every time for gsi's, where would you recommend keeping the "things to keep on your device" (Magisk related) so i don't have to carry an otg and drive everywhere i go? Thank you sir, you almost get more thanks than posts! Talk about reputation!
culiacanazo said:
Own domain huh?
Click to expand...
Click to collapse
I keep a few of them around. It was nice to finally find a good use for that one...
but my phone so happens to require a data format every time for gsi's, where would you recommend keeping the "things to keep on your device" (Magisk related) so i don't have to carry an otg and drive everywhere i go?
Click to expand...
Click to collapse
Do you have to completely wipe the device? Or can you keep internal storage intact? If not, it sounds like you're out of luck.
Nice thread hijack, by the way... :laugh:
Didgeridoohan said:
Do you have to completely wipe the device?
Click to expand...
Click to collapse
Well i do a factory reset, flash system img and reboot, let it loop because it will, and then do a data format before it will boot, so system, caches, and data go... (Huawei, see)
Didgeridoohan said:
Nice thread hijack, by the way... :laugh:
Click to expand...
Click to collapse
I kinda stayed on topic didn't i? :crying:
You linked to your help guide which i read the beginning of that by the way has nothing to do with the help you offered to the op and reminded me of my struggles with a totally different device and problem!!
It's like how I'm related to my grandma's cousin's wife's sister's doctor's neighbor's son's friend, ain't it?
Sent from my Huawei Mate 10 Pro using XDA Labs
Would be cool if someone could share the adb solution. In the FAQ is just written "email me for this" wtf?!? It is ****ing anoying to reflash the whole system everytime a module isnt working (yeah thats what you need to do if your device doesnt have twrp, and a lot of a/b devices dont have twrp). Also you need to delete all user datas because you flashed the system new and the new system doesnt know the encryption key for the user datas. There need to be a better solution than using twrp or email the dev for adb solution.
The easiest way would be to make it possible that magisk manager can manage (remove/deactivate) the modules while there is no patched boot.img installed. This would solve all problems related to a/b devices without twrp and magisk modules (not booting or anything else) just flash stock boot.img remove the problematic module flash patched boot.img and done. This is not possible because the module section in magisk manager is hidden when there is no patched boot.img installed.
Second thing i noticed, magisk manager doesnt reset the active modules when you wipe the app data. This should be a MUST. Would also solve the problem of not booting modules without wiping the whole system on a/b devices without twrp.
Apply .disable_magisk
saturday_night said:
Would be cool if someone could share the adb solution. In the FAQ is just written "email me for this" wtf?!? It is ****ing anoying to reflash the whole system everytime a module isnt working (yeah thats what you need to do if your device doesnt have twrp, and a lot of a/b devices dont have twrp). Also you need to delete all user datas because you flashed the system new and the new system doesnt know the encryption key for the user datas. There need to be a better solution than using twrp or email the dev for adb solution.
The easiest way would be to make it possible that magisk manager can manage (remove/deactivate) the modules while there is no patched boot.img installed. This would solve all problems related to a/b devices without twrp and magisk modules (not booting or anything else) just flash stock boot.img remove the problematic module flash patched boot.img and done. This is not possible because the module section in magisk manager is hidden when there is no patched boot.img installed.
Second thing i noticed, magisk manager doesnt reset the active modules when you wipe the app data. This should be a MUST. Would also solve the problem of not booting modules without wiping the whole system on a/b devices without twrp.
Click to expand...
Click to collapse
Hi!. I have this user of XDA Dev. hanging out for a time... well the fact is I'm new. My problem (not the only one) maybe merge a kind of solution to this. And this could be putting the ".disable_magisk" blank file inside the cache partition as an ADB Sideload update.
Next to this. I've found that to do that it's not as simply as it seems to be cause I'm on a Samsung Galaxy S7 Nougat 7.0 Version. And all the examples with update-binary file I have, are from downgrade versions...
I'm stuck in a bootloop due to the Magisk Xposed SDK 24 module. I think this module & encription is not good (as I've read on the Xpose module thread).
So, here I'm asking how to make an script to run directly on the Stock recovery using ADB Sideload, which will put the blank ".disable_magisk" file inside the /cache partition. I need just this, and I think this could help some people who are stuck on this issue.
Now, I have this Thread. But really I need the advice of an expert telling me what to do in order to achieve this. As I think this is an easy labor, but you have to know how to do it... If someone is able to clarify please, I will appreciate so much.
Thanks!
---------- Post added at 05:51 PM ---------- Previous post was at 05:41 PM ----------
neromanello said:
Hi!. I have this user of XDA Dev. hanging out for a time... well the fact is I'm new. My problem (not the only one) maybe merge a kind of solution to this. And this could be putting the ".disable_magisk" blank file inside the cache partition as an ADB Sideload update.
Next to this. I've found that to do that it's not as simply as it seems to be cause I'm on a Samsung Galaxy S7 Nougat 7.0 Version. And all the examples with update-binary file I have, are from downgrade versions...
I'm stuck in a bootloop due to the Magisk Xposed SDK 24 module. I think this module & encription is not good (as I've read on the Xpose module thread).
So, here I'm asking how to make an script to run directly on the Stock recovery using ADB Sideload, which will put the blank ".disable_magisk" file inside the /cache partition. I need just this, and I think this could help some people who are stuck on this issue.
Now, I have this Thread. But really I need the advice of an expert telling me what to do in order to achieve this. As I think this is an easy labor, but you have to know how to do it... If someone is able to clarify please, I will appreciate so much.
Thanks!
Click to expand...
Click to collapse
I need to know how to locate the mount point of my /cache partition at the stock recovery ADB Sideload. Then, to mount it, transfer the blank file to it, and then unmount /cache. I think it's an easy labor. So here my incomplete updater-script:
ui_print("Trying to make an script with ADB Sideload..."); CRLF
ui_print("Creating file to disable Magisk Modules..."); CRLF
I NEED THE MOUNT POINT HERE CRLF
ifelse package_extract_file(".disable_magisk", "/cache/.disable_magisk") == "t", ui_print("OK!"), ui_print("Failed!"); CRLF
UNMOUNT COMMAND HERE. CRLF
--last blank line--
So, I need to complete that, BUT things gets difficult when I need the update-binary for my Nougat 7.0 version, and to sign the whole .zip file in order my stock recovery recognizes it. I think this last thing could be made by this Thread. But really I don't know. Please help.
Thanks!.

Categories

Resources