Right so, following an XDA Forum thread to rooting my Nokia 5, i installed TWRP, and using TWRP, installed magisk (which TWRP had, which is version 16.1)
Anyways any attempts of me trying to update Magisk and Magisk Manager just nets me a bootloop.
Long before, i tried a 17 update, a 18 update, but nada. Magisk Manager is stuck at 6.1.0 (although it starts at a lower version if its freshly installed by TWRP)
To get away from the bootloop, i just go back into TWRP/Recovery Mode, and reinstall Magisk from TWRP's menu.
For the XDA Forum Thread guide on rooting my phone i went with this https://forum.xda-developers.com/nokia-5/how-to/root-nokia-5-android-8-1-t3831303
It wasn't anything serious before, but with the upcoming SafetyNet checks returning false, its becoming harder to play games that have SafetyNet checks.... :(
@reihunter360,
Years ago I had a Nokia 6 and I had the same problem. I think the problem is the way we unlock our bootloader. The problem is that the Secure Boot does not allow the Magisk to be installed. The version of Magisk you're using worked for me too, but no other version. The reason is that we use a modified version of Magisk which allows Magisk to work on our devices. I'll upload screenshots with the difference between official Magisk 16.1 and modified Magisk 16.1 that we use. Maybe it's an option for you to try modifying Magisk 20.4 the way you see it in the photos.
Screenshots with the difference between official and modified version that worked for our devices:


20.4's boot patching section is radically different than 16.1's.
In 20.4 its basically just "install_magisk"
Looks like you just need to cat that patch file onto the end of the boot.img. So patch your stock boot.img in the latest Manager, then add patch from that modded zip onto magisk_patched.img.
Since this is some very device-specific stuff Magisk probably can't directly support, I'll close this.
Upload the modded twrp .img from that thread and I'll see if I can extract the patch file.
@osm0sis damn.
The thread's Links to the custom TWRP i used is dead.
Truthfully, i'm not all that looking for an update to my Magisk version, but i kinda needed it for the SafetyPatcher v3(5) module i'm trying to use. It requires v19+ of Magisk, and i'm still stuck at 16.1 no matter what i try.
I dont have the files for how i unlocked the bootloader, install the custom TWRP and whatnot. It can flash stuff except for Magisk v17+; but yeah. Anything else i can do with my phone on how to get a more detailed view on how it operates so i can be running on Magisk v20.4 or something.
Then upload a dump of the working boot.img from your device, it should have the patch file inside it still. You could also just dump the TWRP that's on your device and give the recovery.img to me too. :wink:
@osm0sis so i'm on TWRP (3.2.1.0).... i backed up recovery in some shape or form...
Not quite sure if that's what you're looking for. I'm also going to backup boot area as well.
That'll work?
( I mean i'm on TWRP/Recovery Mode atm so whynot)
basically, recovery.emmc.win and recovery.emmc.win.sha2, recovery.log
Same goes for boot as well.
Yep. Those exactly. :+1:
@osm0sis
Can't attach to here but mediafire .-.
Anyways hopefully this'll help. I really just want to play a game with safetynet checks. @_@
https://www.mediafire.com/file/a7zp4ub7gd638ij/boot.zip/file
https://www.mediafire.com/file/3pf0vb0xx5q6uts/recovery.zip/file
Well I don't see anything like a custom magisk.zip embedded in the recovery ramdisk, so no way to extract anything special from that, but I do see the AVBv1 signature on your boot.img is Nokia's private one, not the verity one. I did notice that it has a similar signature to the boot.img.
I guess that means your bootloader is kinda sloppy and doesn't actually check that the boot.img data matches the signature, and likely @martobg10 is right and we can just append that to whatever, like that script does (since only Nokia actually have their own key to properly sign).
I'll chop off the Nokia sig tonight once I'm home from work and post it for you with commands you can use going forward to custom patch your boot.img with Manager. :+1:
@reihunter360 Just a small heads-up on Safetypatcher: Google seems to have toughened up SafetyNet's check for modifications and Safetypatcher (and so far a few other modules) now triggers both CTS and basic integrity. Here are some details if you can get things up and running:
https://forum.xda-developers.com/showpost.php?p=82155517&postcount=413
@Didgeridoohan
Yeah i got linked to that thread, and have a modified SafetyPatcher (v3 (5)) to use once my Magisk version is up.
@reihunter360, have you tried a normally verity AVBv1 signed boot.img before? There's a chance your bootloader will accept them too and then you should be able to update Magisk normally.
magisk_patched-veritysig(signed).zip
If that doesn't work, then you're stuck manually appending the Nokia "sig" manually for each update. I've extracted it from the boot.img dump you uploaded.
Magisk installation over a boot (partition or .img) with this "sig" correctly ignores it as invalid, so Magisk Manager produces an unsigned magisk_patched.img, which you can then simply add the "sig" onto with: cat magisk_patched.img nokia-avb1.sig > magisk_patched-nokiasig(invalid).img
magisk_patched-nokiasig(invalid).zip
Please feel free to share this on your device/Nokia forums if any of it works. If it doesn't, then unfortunately I'm out of ideas, so.. 馃:wink:
Edit: Oh, and here's the Nokia "sig" from the recovery dump you uploaded as well, in case it comes in handy for you or others at some point. :+1:
The first zip is considering i can "normally" verity AVBv1 right? No idea on how to do that.
The 2nd and 3rd zips are for the event i cannot right?
Also, the "cat magisk_patched.img nokia-avb.sig > magisk patched-nokiasig(invalid).img" is something i use with my phone's Terminal or ADB w/ USB Debugging Mode on? Yes?
The 2nd zip is used by magisk manager... how? o_o
They aren't flashable. They contain the .img and .sig files I just explained.
The first one uses the normal public verity AVBv1 signing from AOSP. You don't have to do anything except flash the .img to your boot partition and attempt to boot.
If that fails the 3rd file is your boot.img dump patched by the latest Canary Magisk and Manager, and with the Nokia "sig" added, ready to go for you. Hopefully it will work since your old one somehow did.
If that one works then all you have to do in the future is use the nokia-avb.sig file in the 2nd zip and a newer magisk_patched.img with the command I gave you. Yes, in Terminal Emulator.
Ehm, i tried TWRP's Flash an Image option, couldn't get Zip 1 and Zip 3 to work. Unless you wanted me to Flash the stuff with Terminal Emulator.
I also noticed that i couldn't restore backups, so whatever i'mma do, it might brick my phone forever ;-;
Tell me you unzipped them first and attempted to flash the actual .img files inside?
You have recovery working so as long as you don't touch your recovery partition you should be fine, no?
Does fastboot flash boot work? I saw some mention of fastboot commands in your links.
Yeah i unzipped them to my phone's internal storage.
I really tried to use TWRP's Install function (using an Image) but yeah, got nothing. It failed on both. Wasn't sure what the error was since i couldn't see the text to the left xD
I can do the flashing with ADB or Terminal Emulator?
As for fastboot, dont think i ever used it during the unlocking of bootloader + installation of custom recovery. Its been a year after all.
Sorry, i'm really bad with things to do without steps haha... ;-; I'm also still a newblet with terminal emulator commands and whatnot. actually i hardly know anything for it.
That's weird since your TWRP could clearly back up the boot.img..
Okay so you need to know where your boot partition is. When you attempt to flash Magisk in recovery what path does it show? Substitute that path instead of the /dev path below to try flashing the test images manually.
cat /path/to/the.img /dev/zero > /dev/block/bootdevice/by-name/boot
That's weird since your TWRP could clearly back up the boot.img..
Okay so you need to know where your boot partition is. When you attempt to flash Magisk in recovery what path does it show? Substitute that path instead of the /dev path below to try flashing the test images manually.
cat /path/to/the.img /dev/zero > /dev/block/bootdevice/by-name/boot
Yeah. This TWRP is weird. lmao. Anyways, using terminal emulator to patch the boot.img?
I checked the boot file, does it really say 0.00 bytes in file manager?
Hopefully it doesnt result in a boot loop @_@
No, you're using terminal commands to flash an image, ideally in TWRP via adb shell.
"boot" isn't a file, it's a block device node.
I gave you different commands earlier to patch a future magisk_patched.img as needed, if my pre-patched ones for you work, but we're not there yet.
Well, i'm on TWRP.
I checked where this TWRP's magisk was installing, and it was on
/boot/ramdisk image: /dev/block/mmcblk0p24
so my terminal commands will be the ZIP1 contents first (the verity-sig) one?
cat /sdcard/magisk_patched-veritysig(signed).img /dev/zero > /dev/block/bootdevice/by-name/boot <
or
cat /sdcard/magisk_patched-veritysig(signed).img /dev/zero > /dev/block/mmcblk0p24 ?
Yep, try
cat /sdcard/magisk_patched-veritysig(signed).img /dev/zero > /dev/block/mmcblk0p24
And hopefully that'll flash without errors. Then try to boot, and if that fails then do that command again but with the .img I did with the invalid Nokia sig.
I wish I could see where your TWRP's Magisk is hiding, I didn't see anything in the dump you uploaded.. maybe it keeps the zip in /data somewhere..
Damn. No space left on the device. Well poop.
Looks like i shot my Boot.img
Well this is extremely bad xD....
EDIT
Managed to fix the boot.img with reinstalling Magisk from TWRP. Guh.
Guess i need to handle my internal storage or something.
@osm0sis,
I wish I could see where your TWRP's Magisk is hiding, I didn't see anything in the dump you uploaded.. maybe it keeps the zip in /data somewhere..
ramdisk\sbin\verify-xinkid.zip
馃槂
Edit:
(I assumed you saw it from my screenshots where I compared them)
@osm0sis,
I wish I could see where your TWRP's Magisk is hiding, I didn't see anything in the dump you uploaded.. maybe it keeps the zip in /data somewhere..
ramdisk\sbin\verify-xinkid.zip
smiley
o shit. you're right. i did see it actually use that.... i'll see if i can pull it and upload it here (i'm backing up some of my apps and uninstalling them)
This is from my Nokia 6. I don't know if there is a difference with your Magisk, but I hope this file is helpful.
verify-xinkid.zip
Edit:
I checked, verify-xinkid.zip from the OP's recovery matches the file from my recovery. File hashes are same.
@reihunter360, no space is actually an expected error since /dev/zero is filling the rest of the partition until it hits the end.
So please try the verity signed one with that command, attempt to boot, if it fails, try the nokia invalid one, attempt to boot, and then report back.
@martobg10 ahah such haxx. Missed that. I'll check it out too, but I think what I've explained is about the same methodology. :+1:
Will now try patching it with Zip3's contents.
Terminal Emulator for the nokia-sig patch? o.o
EDIT : just tried ZIP3's contents, still giving me "Write Error: No Space left on device"
gonna try to grab the verify-xinkid.zip @_@
Got the verify-xinkid.zip on my end. Hope it helps.
https://www.mediafire.com/file/lncoov4csy7153i/verify-xinkid.zip/file
(Mediafire link again. github is having problems with me it seems.)
EDIT2 :
My system/Android is 64bit just in case @_@
I just told you it'll say that no matter what, it means it flashed correctly. You need to reboot after that to see if the image worked or not.
Alright. ZIP3's contents have been patched. Looks like i got to boot into Android ;o~
Now what?
EDIT: Damn, my Magisk manager is acting strange, and my 2nd Partition / SD Card isn't mounting.... oh boy.
EDIT2 : From what i can see on Magisk Manager, currently installed version is pointed into some sort of hexadecimal numbers. vef9d077c is the Installed Version
EDIT2 : From what i can see on Magisk Manager, currently installed version is pointed into some sort of hexadecimal numbers. vef9d077c is the Installed Version
This is a canary build, not version 20.4 stable.
(Canary is something like an alpha version. The pre-beta version)
EDIT2 : From what i can see on Magisk Manager, currently installed version is pointed into some sort of hexadecimal numbers. vef9d077c is the Installed Version
This is a canary build, not version 20.4 stable.
(Canary is something like an alpha version. The pre-beta version)
I'm having trouble with my apps that normally use superuser, they're all dying along with Magisk Manager. I use Apps2SD to throw big weight app's data files/apks into a 2nd partition that's mounted during boot, which requires superuser, but breaks because of my current magisk version.
Anyways, gotta update Magisk and Magisk Manager now? or do i have to terminal emulator and patch the boot.img with the ZIP2 contents?
EDIT2 : From the looks of things too, SafetyNet is returning all green o.o
EDIT3 : Yep, anytime superuser is prompted, the app still does it, but magisk manager crashes + the app.
You most likely just need to update to the latest Canary Manager
You should still try the .img from "zip1" (verity signed) too, since if that works you have a fully functional root setup and can update directly without any more shenanigans.
ZIP1's error is
"Device has loaded a different operating system.
Modelnumberhere
Device will shutdown in 30 seconds..."
when i reboot after the terminal stuff on TWRP.
ZIP2's the only one so far that lets me boot to my android, with some magisk manager problems.
Not sure if this is the latest canary magisk manager build i'm looking for https://forum.xda-developers.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337
Dated in September 2018
Canary builds: https://github.com/topjohnwu/magisk_files/tree/canary
app-release.apk is latest Canary Magisk Manager.
Edit:
ZIP1's error is
"Device has loaded a different operating system.
Modelnumberhere
Device will shutdown in 30 seconds..."
when i reboot after the terminal stuff on TWRP.
Then you need to manually update Magisk by appending the Nokia "sig" for each update.
Installed Magisk Canary, now what? o-o
From earlier, appending the nokia sig for each update is using terminal emulator
and running
cat magisk_patched.img nokia-avb1.sig > magisk_patched-nokiasig(invalid).img
And then using TWRP's terminal to install it using the earlier commands?
EDIT1 : My Apps2SD is literally not working, it keeps trying to mount the 2nd partition of the SD Card, but can't do it, even with multiple soft reboots. Not sure what to do anymore. Either stick with this and can't play any of my games, or stick with the TWRP's 16.1's
EDIT2 : Hum, BusyBox wasn't installed. Must've went away during the patch. Tried to install busybox again from magisk manager, and got slapped with "Please have Magisk v19+"
@osm0sis @martobg10
I've finally gotten past the Apps2SD not working by going to 20.4 Magisk
Root's back to normal, my apps are as well. Took a bit of loading time though but to be expected.
Magisk manager isn't loading very well. Maybe switch to the Stable version?
Seriously thanks.
@reihunter360,
Here are the stable builds: https://github.com/topjohnwu/Magisk/releases/
Download the latest Stable Magisk Manager.
Patch the stock boot image. Magisk Manager will show you where the patched file is stored. Make sure that nokia-avb1.sig file is in the same folder.
Open the terminal you are using.
Make sure the terminal is working in the folder where the patched file is stored.
Type: cd {magisk_patched.img location}
Example: cd /sdcard/Download/
Type: cat magisk_patched.img nokia-avb1.sig > magisk_patched-nokiasig(invalid).img
Info: "magisk_patched-nokiasig(invalid)" is the name of the new boot image. You can name it as you wish.
P.S. I also have a problem with the new Magisk Manager, they will fix it! 馃挭
Use the stable version for now 馃槈
EDIT2 : Hum, BusyBox wasn't installed. Must've went away during the patch. Tried to install busybox again from magisk manager, and got slapped with "Please have Magisk v19+"
@osm0sis,
As far as I know, busybox is built-in into Magisk?
Also, I'm worried if the residual files from previous versions of Magisk don't interfere?
@martobg10
I got it now. thanks.
Currently i'm still on Magisk manager canary ver, but using Magisk 20.4 ;o
Most helpful comment
@osm0sis @martobg10
I've finally gotten past the Apps2SD not working by going to 20.4 Magisk
Root's back to normal, my apps are as well. Took a bit of loading time though but to be expected.
Magisk manager isn't loading very well. Maybe switch to the Stable version?
Seriously thanks.