Downgrade with patched image - Magisk

I installed Magisk with a patched image on a Pixel 4. This process appears to always patch boot.img with the latest version of Magisk. Is there any way to patch an image with an old version of Magisk? Specifically I'd like to install 21.2 (coming from 21.4).
If not, I assume I need to install a custom recovery to downgrade to an older version?

I'm assuming you mean that you want to downgrade from 21.4 to 21.2. You have a couple of possibilities actually.
You could setup your own custom update channel with the Magisk zip of your choice. I've described that here:
https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-84290797
But since you want to use the stable releases you can find the old update channel in Github's commit history. It takes a little bit of insight into how Github works though... I've had plans to write down the steps required in my Magisk guide for ages, but somehow I never get around to it.
Using this as your custom update channel would give you Magisk v21.2:
https://raw.githubusercontent.com/topjohnwu/magisk_files/d10a630a4d4a3c54cf57abc7411f698f0ff79161/stable.json
If you want to use TWRP you do not need to install it though. It's perfectly possible to boot TWRP without having to install it:
fastboot boot twrp.img
Keep in mind that no official support is given for old releases...

Excellent. That worked!
I ask as the instructions seem to imply that installing from recovery is a thing of the past. Is that just for certain devices?
Any difference with using the custom channel to do a direct install vs patch for downgrades?

amw2320 said:
Excellent. That worked!
I ask as the instructions seem to imply that installing from recovery is a thing of the past. Is that just for certain devices?
Any difference with using the custom channel to do a direct install vs patch for downgrades?
Click to expand...
Click to collapse
If there is a custom recovery available for your device it's very often a viable option for installation. But, as it says in the instructions, it may fail and patching the image may be your only option. Boot image patching or the direct install option are the recommended methods (since there it's possible for @topjohnwu to control exactly what's going on).
Once you have Magisk installed already it's generally recommended to use the direct install option, but since Android is Android and there are way too many different setups out there to even count there is going to be instances where the direct install fails and patching a boot image is needed, or even that installing through recovery is the only option.
There's no practical difference between direct install and patching the image manually. The only difference is in who's doing the flashing of the image (you or the Manager).
You've got a Pixel device, so you should be good on all accounts. @topjohnwu uses his Pixel devices to test a lot of stuff with Magisk and they'll pretty much always be fully supported.

Thanks, super useful

Related

Rooting options for the S10 family

I need to get something straight, as I didn't quite get it. So the options for someone who'd like to root his S10 are 3:
1) Rooting with Topjohnwu method: This will get you root on the stock rom, but will keep the default recovery which is pretty much useless if one wanted to flash a custom rom.
2) Rooting with a prepatched version of TWRP and then, if desired, flash any custom rom (compatible with the TWRP version installed). This method is said to be less stable that the previous one.
3) Install TWRP after rooting with john wu method and then using it to flash custom rom.
First of all, is all this correct?
If so, then one has to choose between rooting safely, but keeping his phone stock, or rooting and then installing twrp and then flash whatever he desires.
Hopefully, somebody will be so kind to clarify this that is an unusually complicated situation about rooting this phone! I already regret passing my perfectly rooted S9 to my son
Thanks for whatever help you'll be willing to provide.
Cheers
I would say you summoned it up nicely.
The advantage of stock Magisk root is you can e.g. use Substratum, Magisk modules and update monthly security releases by yourself but, of course, no Custom ROMs.
The advantage of TWRP Magisk root is clearly the Custom ROM possibility but here you cannot update the monthly security releases by yourself and are dependent on the ROM creator to release the security updates.
I had been using Topjohnwu Magisk root on stock rom since released mainly to use Substratum/ some Magisk Modules and did the AP-patching everytime the monthly security was released.
However, doing the November security AP-patching something went wrong and I ended in boot-loop. So thought, as I had to reflash anyway I would try TWRP/ Custom ROM - I went with yash92Duster's lightrom / geiti94's magisk TWRP both which I find very stable.
Norup58 said:
I would say you summoned it up nicely.
The advantage of stock Magisk root is you can e.g. use Substratum, Magisk modules and update monthly security releases by yourself but, of course, no Custom ROMs.
The advantage of TWRP Magisk root is clearly the Custom ROM possibility but here you cannot update the monthly security releases by yourself and are dependent on the ROM creator to release the security updates.
I had been using Topjohnwu Magisk root on stock rom since released mainly to use Substratum/ some Magisk Modules and did the AP-patching everytime the monthly security was released.
However, doing the November security AP-patching something went wrong and I ended in boot-loop. So thought, as I had to reflash anyway I would try TWRP/ Custom ROM - I went with yash92Duster's lightrom / geiti94's magisk TWRP both which I find very stable.
Click to expand...
Click to collapse
One more doubt, if I may ask : once rooted the safe way, if I wanted to install twrp I would need to find the build that is compatible with the already patched firmware on my phone? And then only the roms that are exactly for the same build?
This is the most complicated rooting process that I have ever faced. And I've been rooting my phones and tablets since a very long time
Thanks

Multiple problems with custom roms - URGENT

Hello everyone, try to install several custom roms, there is no tutorial that explains how the rom and twrp are installed. There are many tutorials and they all contradict, some say do this, others say do the other, but all fail.
Twrp boot, flash rom, install custom rom on SLOT A, install TWRP on slot B.
PROVEN ROMS:
PixelExperience:
Very low call volume, impossible to fix.
LineageOS:
Does not start play store, does not allow login to accounts, does not allow to install gapps.
- CURRENT ROM--
Evolution X:
Does not start play store, does not allow login to accounts.
I have been installing customs roms for years and this device is costing me my life. HELP
The most users get in trouble with A/B devices because they don't know exactly the differences between A-only and A/B partitions.
You don't know how to install TWRP? Why? On twrp.me you can find a detailed instruction for every single model.
A custom ROM is always a .zip file and you can flash a .zip file via TWRP. If you flash a ROM while slot _a is set as active you will install the ROM on slot _b. That's all. That is the meaning of semless updates.
Every new ROM must contain a own boot.img. A new boot.img will delete TWRP and Magisk. TWRP is a recovery and A/B devices don't have own partition for recovery. The recovery is merged in the boot partition.
Also Magisk uses the boot.img to patch the ramdisk. Flashing a new boot.img means you override the patched ramdisk with a new own. As a result you need a new Magisk installation.
my recommendation is starting from scratch with a clean stock 10 install then trying again...
lineage wiki probably has the best install instructions https://wiki.lineageos.org/devices/lake/install but also check its forum thread https://forum.xda-developers.com/g7-plus/development/rom-lineageos-17-1-t4076569 for other recommendations . if you want evolution X read the instructions in its thread https://forum.xda-developers.com/g7-plus/development/rom-evolution-x-4-1-69-moto-g7-plus-t4081731 as well but there pretty much the same.... you've probably went threw those threads already based upon you saying you have tried 3 diff roms already, but try again from a clean install of stock 10 (IF you want to run a 10 rom). i know it's not really a "clean/easy/simple" solution/tutorial, but with this device there is some trial and error for getting a half assed working install. however MAKE SURE you are on a stock 10 rom when installing a 10 rom, pixel experience is a 9 rom and that could be part of your problem. moving from android 10 stock, to a 9 rom, then back to a 10 rom will lead to issues. or a 9 rom, to a 10 rom, without moving to stock 10 in between will lead to problems.
as this isnt nearly a widely adopted device, custom rom development and support isnt even close to other devices, so expect bugs. i've always ran cfw's on all my devices ever since the htc g1/dream days, this is my first device i've stuck with stock due to the lack of rom development, lack of widespread use and people actually wanting to use cfw and users to bug report, and stock being more stable... but your mileage may vary. also no disrespect meant towards the hard working dev's who do work on this device, keep it up.
Thank you very much, I feel lucky that you have responded so quickly, sometimes my messages I post in this forum are never answered. Right now I am with revolution X:
--- It has TWRP perfectly installed, it has the boot.img patched with Magisk without any error and rooted perfectly, but google play for more than clean and reinstall it never opens, it does not allow me to login to the accounts, the APPs they close alone, etc.
I will try to put the stock and again but I have very little hope. thanks, again¡¡
prodigy90 said:
Thank you very much, I feel lucky that you have responded so quickly, sometimes my messages I post in this forum are never answered. Right now I am with revolution X:
--- It has TWRP perfectly installed, it has the boot.img patched with Magisk without any error and rooted perfectly, but google play for more than clean and reinstall it never opens, it does not allow me to login to the accounts, the APPs they close alone, etc.
I will try to put the stock and again but I have very little hope. thanks, again¡¡
Click to expand...
Click to collapse
yeah it seems to be pretty finicky getting a good install and gapps seem to have issues. reading all the posts in the lineage17 thread just make me cringe. as much as i'd love to use lineage as my daily driver (or evo X) my days of willing to put up with a buggy rom and daily dirty flashing have come and gone. this was my first, and will be my last, moto device for the the simple fact it just doesnt have the user base and its development is stunted, compared to more widely used devices.
i hope you get something working, the lineage17 thread definetly has some good advice on what people have done to get a working install, should be able to apply flash order etc to a evoX install (minus having to install gapps for evoX)
solved
I managed to perfectly install the Stock Rom with the following tool:
Lenovo MOTO Smart Assistant, a real wonder, simply select the model and in fastboot, immediately install the factory rom.
download.lenovo.com/consumer/mobiles/lmsa_v4.5.0.14_setup.exe
prodigy90 said:
I managed to perfectly install the Stock Rom with the following tool:
Lenovo MOTO Smart Assistant, a real wonder, simply select the model and in fastboot, immediately install the factory rom.
download.lenovo.com/consumer/mobiles/lmsa_v4.5.0.14_setup.exe
Click to expand...
Click to collapse
yup, the LMSA is a great tool for sure. glad you got back to a clean stock install.

May 2020 QQ2A.200501.001.B2 "FLAME" Magisk-Patched Boot Img [+UPDATE/KEEP ROOT GUIDE]

May 2020 QQ2A.200501.001.B2 "FLAME" Magisk-Patched Boot Img [+UPDATE/KEEP ROOT GUIDE]
Another month, another update. I'll keep churning out these patched / stock file uploads and easy noob-friendly update guides while guinea pigging the updates, so long as my area is still on lockdown and I'm not back to work yet, lol.
I've also installed and tested / verified that Kirisakura 4.2.0 is working great with this month's patch so far.
Also have EdXposed Canary 0.5.0.0 (4548) YAHFA installed. SafetyNet still passing as of now.
Magisk v20.4 Patched Boot Image: https://www.androidfilehost.com/?fid=4349826312261796525
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=4349826312261796524
THESE FILES ARE FOR 10.0.0 (QQ2A.200501.001.B2, May 2020, All carriers except TW) ONLY! PLEASE ONLY FLASH IF YOU KNOW WHAT YOU'RE DOING!
If these files and/or guides are helpful, please drop a thanks and let me know. =)
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide exactly if coming from build QQ2A.200405.005, Apr 2020. But the general idea is the same for other builds, you just need the correct files for your device.
flame-qq2a.200405.005-factory-dtbo.img: https://www.androidfilehost.com/?fid=4349826312261796522
flame-qq2a.200405.005-factory-boot.img: https://www.androidfilehost.com/?fid=4349826312261763724
May 2020 sideload OTA zip: https://dl.google.com/dl/android/aosp/flame-ota-qq2a.200501.001.b2-46940f66.zip
I DID NOT BOOT BACK INTO O/S UNTIL ALL STEPS WERE COMPLETED - I DID THIS TO ENSURE EVERYTHING WOULD BOOT BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot flame-qq2a.200405.005-factory-boot.img
3. fastboot flash dtbo flame-qq2a.200405.005-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload flame-ota-qq2a.200501.001.b2-46940f66.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot flame-qq2a.200501.001.b2-magisk_patched-20.4.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it. I've only personally tested with Kirisakura though.)
This was a 100% seamless update that required no additional / re-setup of any of my Magisk or EdXposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
Thank you for making this so convenient!
ahalol said:
Thank you for making this so convenient!
Click to expand...
Click to collapse
:highfive:
You can thank my wife for going with the P4 instead of P4XL . Now gives me 2 phones to keep up with, although they're basically identical in process. Might as well share with yall over on this board, which seems to get a little less love and attention. But we're definitely lovin the switch to Pixels. Awesome camera too, which is great because we just had our first child 4 months ago and these phones take amazing photos. And this is coming from 2 phones that already had great cameras (HTC U11 and U12+)! I love taking photos when he's sleeping using Night Sight mode. He's so adorable, it comes out so clean, and there's just something about that sleepy ambience .
i just saw on my google news feed that the May patch just started dropping to our devices. i go check XDA and this post is already here. wow that was fast haha! went perfectly smoothly just like last month, thanks so much!!
Why not update the OTA via Magisk, or is this only for those which devices is not able to download OTA:s?
Currently, I have rooted with Magisk, still waiting for OTA update notification in my device...
Should i restore images in Magisk and/or disable any modules or just let 'er rip?!
Vantskruv said:
Why not update the OTA via Magisk, or is this only for those which devices is not able to download OTA:s?
Currently, I have rooted with Magisk, still waiting for OTA update notification in my device...
Click to expand...
Click to collapse
redeyss said:
Should i restore images in Magisk and/or disable any modules or just let 'er rip?!
Click to expand...
Click to collapse
@Vantskruv: FYI, you won't get the OTA update notification because you're modified right now. You can restore the boot image in Magisk first and wait for the OTA notification (what you're thinking of is something like this: https://forum.xda-developers.com/pixel-4-xl/how-to/guide-update-retain-root-t4003839). But from what I understand, it's pretty hit or miss. Apparently it's hit or miss even on complete bone stock anyway lol. The method I outlined just works nice and reliably even when rooted and modded.
@redeyss: Restoring the stock boot image in Magisk Manager is similar to the method linked above, and then taking the OTA the normal way. But if you flashed a custom kernel, keep it mind it won't restore the dtbo partition (not sure if it's necessary with that method tbh). You shouldn't need to restore images in Magisk, nor diable any modules. When you flash the factory April boot and dtbo images, it's doing the same thing as restoring the images through Magisk (plus dtbo). Just let er rip, and if you have any issues, you can always flash the new unmodified factory boot image, which will essentially disable Magisk, and then work from there. It's a very safe method. =)
edit: also in the event of bootloop, this is a great thread to read and understand: https://forum.xda-developers.com/pixel-4/how-to/magisk-modules-disabler-booting-magisk-t3991739
Thank you @i5lee8bit for your answer. Luckily I have restrained myself yesterday to update, thought I where in the Pixel 4XL thread, while this is for the Pixel 4. :laugh:
I am just curious, do any of you expert guys/girls know why this is happening, that OTA updates is not pushed on rooted phones?
Do Google have algorithms that temporarily bans systems which is rooted?
Or is it so simple that some type of fingerprint is changed when rooted, so Google update services does not recognise the device, and not pushing OTA:s?
Sorry for the questions, no need to answer them. It was a long time ago I rooted Android:s, and I have forgot many things.
I think I will try to manually update everything, even though there are more steps included, just to learn how to do it.
https://www.youtube.com/watch?v=kZY8qiz2SZ0
Vantskruv said:
Thank you @i5lee8bit for your answer. Luckily I have restrained myself yesterday to update, thought I where in the Pixel 4XL thread, while this is for the Pixel 4. :laugh:
I am just curious, do any of you expert guys/girls know why this is happening, that OTA updates is not pushed on rooted phones?
Do Google have algorithms that temporarily bans systems which is rooted?
Or is it so simple that some type of fingerprint is changed when rooted, so Google update services does not recognise the device, and not pushing OTA:s?
Sorry for the questions, no need to answer them. It was a long time ago I rooted Android:s, and I have forgot many things.
I think I will try to manually update everything, even though there are more steps included, just to learn how to do it.
https://www.youtube.com/watch?v=kZY8qiz2SZ0
Click to expand...
Click to collapse
No worries, the process for the 4XL is the exact same, but good catch; you definitely need to use the correct files for the device. I actually posted a similar thread with the relevant 4XL files over on that forum.
Not sure exactly the mechanism used to prevent the normal OTA, but probably just checks for a modified boot partition. In any case, the normal factory OTA if I understand correctly relies in part on factory recovery commands at some point, and a modified boot partition won't be able to use them. In fact, try booting to recovery with the modified boot partition flashed and you'll notice it can't load recovery. I may be wrong about the exact reason though. But think about it: even if we had TWRP, the factory OTA mechanism can't make use of it. Even if the OTA popped up while rooted, it probably wouldn't be able to do it, or worse, cause a failure and corruption. I would dare say we're fortunate they prevent factory OTA when running modified.
Anyway, there are a lot of complicated guides out there, and that's why I wanted to share my method. I didn't need to do any further research and it's very intuitively sound. Steps 2+3 essentially restore stock boot and therefore recovery (and dtbo), the rest pretty much follows a standard OTA sideload, and then it's structured in such a way that you're flashing the new Magisk patched boot image before even starting the phone back up. Making it a seamless, keep-root easy upgrade.
Wow ..... what an easy, elegant way to get my Coral device updated while keeping root. Followed the OP process, but used these commands instead to get the June 2020 security update:
- fastboot flash boot coral-qq3a.200605.001-factory-boot.img
- fastboot flash dtbo coral-qq3a.200605.001-factory-dtbo.img
- adb sideload coral-ota-qq3a.200605.001-3b5bb1bd.zip
- fastboot flash boot coral-qq3a.200605.001-magisk_patched-20.4.img
Thanks, @i5lee8bit . Well done. :good:
does anyone have a thread to point me to that is a step by step guide for setting up ADB and how to flash? I did everything a year ago but now I just factory reset and am stuck in boot loop, can't remember all the commands and everything.
in_dmand said:
does anyone have a thread to point me to that is a step by step guide for setting up ADB and how to flash? I did everything a year ago but now I just factory reset and am stuck in boot loop, can't remember all the commands and everything.
Click to expand...
Click to collapse
Did you fix the issue?

Cannot install Magisk

Hello,
I have a One Plus 5 with a Custom AOSP Rom 11.0 and TWRP 3.4.0.1 and I'm trying to install Magisk like it's explained here.
But whatever I try - it does not work.
When I flash it via TWRP it says everything went well, but in the end my Magisk Manager does not have the "green ticks" and my apps say I have no root access.
I also tried this with my current ROM but there is an error. I'll attach all logs and files in case it's helpful.
Thank you very much.
Edit:
I was now able to create a flashed boot.img file, but when I flash that it always boots into the bootloader and cannot boot my phone anymore normally anymore.
Quite simple... Magisk v20.4 isn't compatible with Android 11. Currently you need to switch to the beta update channel if you want root on A11.
Didgeridoohan said:
Quite simple... Magisk v20.4 isn't compatible with Android 11. Currently you need to switch to the beta update channel if you want root on A11.
Click to expand...
Click to collapse
Awesome thank you... A little bit embarissing since I spend so much time before but thank you very much

Question Install magisk

Hello, noob when it comes to rooted phones here. I'm interested in getting magisk on my phone and would like to ask about the how to.
I see that from v22 the installation process is updated, but is there any downside to doing it the old custom recovery way? That way just seems much easier/faster compared to patching images with adb and fastboot.
* Full disclosure not really sure what "Starting from v22.0, the Magisk app (renamed from Magisk Manager) includes everything it needs within the APK itself, making installation a 100% offline process." is compared to without custom recovery before.
I have twrp and am currently on eu stable v12.5.10, downloading v12.5.11 as I write this.
Phone is Mi 11 Pro
Thanks!
Snusious said:
Hello, noob when it comes to rooted phones here. I'm interested in getting magisk on my phone and would like to ask about the how to.
I see that from v22 the installation process is updated, but is there any downside to doing it the old custom recovery way? That way just seems much easier/faster compared to patching images with adb and fastboot.
* Full disclosure not really sure what "Starting from v22.0, the Magisk app (renamed from Magisk Manager) includes everything it needs within the APK itself, making installation a 100% offline process." is compared to without custom recovery before.
I have twrp and am currently on eu stable v12.5.10, downloading v12.5.11 as I write this.
Phone is Mi 11 Pro
Thanks!
Click to expand...
Click to collapse
just add .zip to the magisk apk and flash in twrp like you would old magisk
jons99 said:
just add .zip to the magisk apk and flash in twrp like you would old magisk
Click to expand...
Click to collapse
Thanks yeah that's what I wanted. Just asking for possible downsides since the installation guide on github suggests the patch image method.
Snusious said:
Thanks yeah that's what I wanted. Just asking for possible downsides since the installation guide on github suggests the patch image method.
Click to expand...
Click to collapse
it's all the same flash in twrp there's no downside
Very little reason to root.
For me no root no party, root a phone is mandatory
xNAPx said:
For me no root no party, root a phone is mandatory
Click to expand...
Click to collapse
Most of the things that used to be rooted for are now inluded in roms today.
Well I doubt using props or debloater without adb
While somewhat true, most of things, like recording phone calls, theming, dark mode, wifi boosting by doubling band width and even ram/swap files, as well as, many other features that we would root our phones for, are nowadays in stock roms.
Yes many are available, even debloating using adb, still rooting allows you to modify your system without using any PC and take control over it
I'm aware of the things it can still do, but there are many real performance tweaks anymore. Most stock roms are fast and smooth, due to all the ram and faster SoCs and GPUs, so there really isn't a need for overclocking or memory extenders (swap files) and theming with dark mode is available in almost every rom and you can disable any app via ADB, if need be. Not a huge need anymore.
On this I agree, at the beginning I wasn't sure to root it too, but still to debloat systemlessly and run commands with terminal I need it
You can debloat/disable via ADB command's without root. Also the way many phones are configured these days, you can't remove or delete many items within the system partition, thereby limiting your debloat capabilities.

Categories

Resources