• XDA Forums have been migrated to XenForo. To discuss, report bugs and other issues, use this thread.

[Guide] Install Magisk for root & xposed framework and have working OTA updates

ilpanos

New member
May 27, 2007
27
29
0
Most Nexus phones users use magisk in order to be able to have root and xposed and also be able to easily pass safetynet check tests in order to be able to get OTA updates.

Well now magisk 14.4 works on our device and OTA updates should work just fine according to this https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md#ota-installation-tips

Of course when Android Oreo rom comes out we should wait before applying it just to be sure that magisk and twrp will work on that rom so that we wont be left without root after updating (or brick the device.

I wrote a guide for installing magisk 14.4 on our device having 2nd october OTA installed, i copy it here so that more people can see it.

DISCLAIMER - USE AT YOUR OWN RISK! Bellow steps worked for my device but they might brick yours, you might lose warranty etc.!!!!!!

I am not a developer, I am just a user that wants to have the new phone setup like the older phones in my possession before using it as the main everyday phone.
All below packages are here due to the hard work of the people who made them. If you use them, give them the appropriate credits. This is also the reason that I don't attach any files in this post, I only give links to download the packages on the the forum threads/ sites I also found them.
Here I just show a combination of packages/ programs that worked.

PREREQUISITES:

1) Read the whole guide before starting. Make sure you are familiar with all the terms used and you understand what you are doing in each step.

2) I advise you to firstly download all the needed packages and have them in a folder in your computer and also make a copy of them in your phone and then start with the steps of this guide.

3) In this guide I use a windows pc. Fastboot commands are written in cmd. If you use a pc with another operating system, just make sure you can use adb/ fastboot commands and that you can also use miflash or another tool to flash the rom to your phone.

4) Make sure you have correct adb drivers installed in your pc. For this guide I have used adb-setup-1.4.3.exe from this thread.



So this is the step by step procedure with links:

Flash official rom with miflash
rom image: Here is the latest rom. (tissot_images_7.10.14_20171014.0000.00_7.1_d791bf99f4.tgz is the image I used while writing this guide)
miflash: MiFlash2017-7-20-0.zip

Boot to freshly flashed rom,
Install second october OTA update (75mb),
Do reboot and wait a few minutes until the update is installed.

If you have not done any changes to your device (other root like supersu, old magisk verision etc) you can ignore above step.

From settings-->developer options:
Usb debuging on
OEM unlocking on
Just to be on the safe side for magisk manager app also go to Settings --> Security and enable Unknown sources.

Then shutdown phone, boot phone to fastboot with Vol- & power button,
send the command "fastboot oem unlock" in order to unlock bootloader.
Phone reboots by it self if I remember correctly.
Boot to rom, now being unlocked, and see the splash screen to see if it says "Unlocked" to be sure that it is unlocked.
Then shut down the phone.

Again boot phone to fastboot with Vol- & power button,
boot twrp (just boot, not flash) with command "fastboot boot recovery.img"
recovery-3.1.1-1

From twrp, install Magisk-v14.4-20171103-073038
It installs magisk 14.4 but magisk manager apk version installed with this is 14.0.

So, in order to have magisk 14.4, reboot to rom, uninstall magisk manager and then install Magisk Manager 5.4.0 (as suggested by matcho13579) MagiskManager-v5.0-20170513.apk

The problem now with this version of magisk manager is that it installs modules correctly and they work just fine, but the installed modules are not listed in magisk manager modules page (they work but they cannot be seen). That means that you cannot disable a single module, you have to enable magisk core mode to disable all of them or normal mode to have all modules enabled - I hope this will be fixed in a newer version. Magisk-v14.4-20171103-073038 zip file as I said installs magisk manager 14.0 which also appears to be working, but I did all tests on my device with MagiskManager-v5.0-20170513.apk installed.


Next, inside magisk manager downloads, search and install xposed framework sdk 25 systemless by topjohnwu.
After installation is completed reboot phone (phone boot takes some time at this step).

Then install this Xposed installer apk -material design XposedInstaller_by_dvdandroid_31_10_17.apk.

Now you have October 2nd update rom in your device, magisk 14.4 & xposed framework.

If you select magisk core only mode (which disables magisk modules), have enabled magisk hide and hide it form all apps except the ones you want to have root access, the device passes safetynet and theoretically you can install OTA updates (xposed framework -systemless or not- does not pass safetynet, but being installed systemlessly through magisk, it can be disabled), according to this link

Inside magisk manager you can also install this MiA1Plus_V1.01 module in order to enable camera2api & EIS, to be able to use google camera application.

Finally, i installed gravitybox using gravitybox non-fbe 7.0.4 - 29/10/2017 and it also appears to be working, I have not tested it thoroughly though:
https://forum.xda-developers.com/showpost.php?p=73340439&postcount=2
https://forum.xda-developers.com/attachment.php?attachmentid=4317286&d=1509267532
 
Last edited:

ilpanos

New member
May 27, 2007
27
29
0
After installing xposed... Safety net goes fail

Sent from my Mi A1 using Tapatalk
As I have written in the first post "xposed framework -systemless or not- does not pass safetynet, but being installed systemlessly through magisk, it can be disabled"

This means that if you enable magisk core mode which disables all modules or if you disable xposed framework module, it passes safetynet.
 

ilpanos

New member
May 27, 2007
27
29
0
Only one question about this: why did you choose NON-FBE version instead of the normal one?
Just because unfortunately it seems that FBE is not currently supported on our device and it is using FDE.

Perhaps the normal version also works, but I didn't want to be in a situation where I find out in the future that something doesn't work correctly and I have to uninstall it.
 

ilpanos

New member
May 27, 2007
27
29
0
Thank you :good::good::good:
this is worked for me

but i have a qu. how we will update next OTA?
First we have to make sure that magisk works correctly in the new OTA. Then and only then, enable magisk core mode to disable modules and pass safetynet and update according to the instructions in the link I have on the first post.
 

matcho13579

New member
Mar 23, 2011
683
228
0
Just because unfortunately it seems that FBE is not currently supported on our device and it is using FDE.

Perhaps the normal version also works, but I didn't want to be in a situation where I find out in the future that something doesn't work correctly and I have to uninstall it.
I'm currently using the normal version and everything is working as intended.

That's why I ask, because it might not work the same way with Magisk (I used CF-Root + SuperSU + standard Xposed method)
 

suryaabadsar

New member
Oct 23, 2017
89
11
0
Gangiasar
First we have to make sure that magisk works correctly in the new OTA. Then and only then, enable magisk core mode to disable modules and pass safetynet and update according to the instructions in the link I have on the first post.

I HAVE UNROOT PHONE WITH THE SAME METHOD AND RE-LOCK BOOTLOADER WITH FASTBOOT COMMAND fastboot oem lock

NOW OTA WILL WORK PROPERLY ON MY PHONE.?
 

matcho13579

New member
Mar 23, 2011
683
228
0
Thanks for the perfect guide.

One side note: official ROM on the provided link is already version .30, so no need to boot into the ROM and install the updates, the update is already merged in
 
  • Like
Reactions: ilpanos

ydd0ras

New member
Dec 28, 2014
1,797
883
0
@ilpanos hello mate! I just ordered my A1 from Trading Shenzhen. I have an clear conception what to do with my A1 when it has arrived. So therefore I am collecting some knowledge about flashing and modding (I am not a beginner, but not familiar with A/B partitions). Your thread is very useful here, many thanks.
I have still one question and maybe you can answer it: i would like to remove the google apps from the system, but I don't know if this works just like usual (to remove it from /system/app or priv-app). The reason is that I am using microG instead gapps.
Or will removing files and folders screw up something?
Thanks in advance!
Cheers!
 

ilpanos

New member
May 27, 2007
27
29
0
Well, the thing is that by even mounting system partition as read-write ,and of course doing any change - even adding a line in build.prop - disables the ability to do OTA updates. You will have to reflash the new rom for each update. This is the purpose of this thread, to show that there is a way to mod root etc systemlessly without loosing the ability to update (of course under certain conditions).
 
  • Like
Reactions: ydd0ras
Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone