Magisk v16.0 Root - Lenovo P2, safety net pass (S233 and S244)

sghegde87

Member
Aug 7, 2012
26
2
0
Bangalore
www.infomandala.com
Trillion Thanks!

*UPDATED TO WORK WITH S244

*I can confirm this is working with the latest version of Magisk (v16.0)
you may not need to execute the script so install the SafetyNetFix first and test.


Hope all goes well, instructions below:

Install TWRP
Follow instructions on this Forum, easy to find.

Convert System from f2fs to ext4
System-less SU does not work on f2fs so you will need to reformat System to ext4,

In TWRP go to:
Wipe > Advanced Wipe.
Check System and Click 'Repair or Change File System' > Change File System > Select EXT4

You'll need to reinstall your firmware after you have formatted. (P2a42_S233/S244 Supports System in ext4 by default)
I would go for a clean install but you could try without wiping.

Run UnSU
Download UnSu here
Run UnSU in Recovery, this may mean you can miss the next step, try with or without (flashing boot image)

Flash original boot.img
This is only if you have tried rooting before (and System is already set to ext4) but failed safety checks, skip if not
Can be found on this forum in the Deodexed_P2a42_S233_170404_ROW.zip or Deodexed_P2a42_S244_170725_ROW.zip
(as long as you are on this firmware of course.)

Download Magisk v16.0
Click here to download latest Magisk
Install using TWRP, this will also install MagiskSU

Reboot, download and install MagiskManager.apk
Turn on Magisk Hide, Systemless Hosts

Hide Google Services Framework and Google Play Store
(I don't think this is necessary but no harm in doing so)

Download Kernel Adiutor from PlayStore
Could also run this in Terminal Emulator but with Kernel Adiutor the script is saved to run again if necessary
Click top left Menu, scroll down to: init.d (don't swipe to activate) Click + for new script and paste:
Code:
#!/system/bin/sh
echo "deleting magisk properties"
resetprop --delete init.svc.magisk_pfs
resetprop --delete init.svc.magisk_pfsd
resetprop --delete init.svc.magisk_service
resetprop --delete persist.magisk.hide
resetprop --delete ro.magisk.disable
resetprop --delete magisk.version
resetprop --delete persist.magisk.busybox
resetprop --delete persist.magisk.hide

Save then click and execute the script.

Install Safety net fix
(This may not be necessary, so reboot and check if you pass before installing this, if you do then no worries, you're good to go!)
Download and install the stable version from here
Install using Magisk Manager

Reboot phone and Open MagiskManager
Check that Safety Net Passes

Some apps may have detected your rooted phone prior to this and blacklisted your device ID
I recommend trying the app Device ID Changer
find here


Thanks to:
Magisk, TWRP, This thread for script and every contributor and developer for the Lenovo P2



Thank you so much. I can confirm this works just fine on S251 too. I had my P2 rooted with phh's Su. However, I wanted switch to Magisk since I use some banking apps not supported by rooted devices. I can't thank you enough. This worked perfectly. Here is what I did.
In TWRP,
1) Flash UnSu.
2) Flash original boot.img
3) Flash Magisk.zip. (v16.0)
4) Reboot. :fingers-crossed:

Viola! Safetly net passed, my device is now certified and banking apps are working fine! :victory: Didn't have to use Safety net fix or run commands. :good:

Once again, can't thank you enough for this post. There aren't many posts explaining how to switch from phh Su to magisk.! Thanks again:D
 

Kinngk

Senior Member
Apr 10, 2018
59
7
0
Hey,
Brother i am new to these things so can someone tell me why is this safety net fix needed?. I mean if i directly flash magisk 16.0 to my lenovo p2a42_S251_171107_ROW, will i have any problem in doing so? Or just the banking apps won't work?
Will it also cause difficulty in online payments in browser too?
I was just going to root this device and had this doubt, but couldn't find anywhere the clear answer so help will be appreciated.
Thank you in advance.
 
Our Apps
Get our official app!
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