Easiest Way to Return to Stock Kernel? (Retain Magisk) - Google Pixel 4 XL Questions & Answers

What's the easiest way to return to the stock kernel? I keep reading to flash dtbo.img and the stock boot.img, but wouldn't doing that kill magisk?
Edit: I'm dumb. Easiest way for future magisk users: just re-patch the stock boot image and flash it in fastboot

Shayded said:
What's the easiest way to return to the stock kernel? I keep reading to flash dtbo.img and the stock boot.img, but wouldn't doing that kill magisk?
Click to expand...
Click to collapse
Yes, flashing those stock images will kill Magisk. So what you would want to do is flash the factory dtbo.img, and then you can just flash a pre-patched Magisk boot.img to revert to stock kernel with Magisk.
If you're already on the Apr 2020 firmware (specifically QQ2A.200405.005), here are the files you need to flash. I uploaded the QQ2A.200405.005 factory dtbo.img for you for your convenience. If you're on a different region / firmware, don't flash these lol.
coral-qq2a.200405.005-factory-dtbo.img: https://www.androidfilehost.com/?fid=4349826312261767171
coral-qq2a.200405.005-magisk_patched-20.4.img: https://www.androidfilehost.com/?fid=4349826312261763705
boot into bootloader,
fastboot flash dtbo coral-qq2a.200405.005-factory-dtbo.img
fastboot flash boot coral-qq2a.200405.005-magisk_patched-20.4.img
reboot phone
edit: i see you already edited your post. just in case the kernel you were using modified the dtbo partition, i would also recommend flashing the stock dtbo image as well.

Shayded said:
just re-patch the stock boot image and flash it in fastboot
Click to expand...
Click to collapse
Flash boot and dtbo too just to avoid potential issues

Related

need to downgrade from CM6 to Stock 2.2

I have sold my phone and I am currently using CM6 RC3
The buyer want me to install the stock 2.2
can someone please provide me with the Download to stock 2.2, and the instructions, Just flash over cm6?
Thanks
You could download the FRF91 system image (link in my signature) and flash it using fastboot...
1. reboot into bootloader
2. extract the downloaded zip
3. fastboot flash userdata userdata.img
4. fastboot flash system system.img
5. fastboot flash boot boot.img
6. fastboot flash recovery recovery.img
Your radio and hboot can remain unchanged (they are stock anyways)
thanks alot of your help:
I am not fimilar with using fastboot
is there a way to use recovery and flash from zip file, that is how I have been trying out different roms
I think ROM Manager has the stock rom available. That would be the easiest way.

Flash LMY47E and Preserve Data

I just recently started fresh by unlocking and flashing LMY47D image. I'd like to upgrade to LMY47E and preserve data. I know I can backup/restore via TIBU, but I'd rather avoid that if possible. Am I overlooking anything by performing only the following commands? Also worth noting is that I'd like to retain TWRP and franco.Kernel.
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
At this point I'd use the hardware buttons to reboot into TWRP, flash su.zip, and then boot system.
I'm definitely going to perform a nandroid prior to doing this. However, just curious if this is the best way to do this or is there a better method. Or if there are any risks involved that I'm overlooking.
EDIT: Success... everything went just as planned. Thanks for everyone's help.
Its exactly correct. alternative is flashing a rooted stock ROM. Zip from recovery
From what I've read you may need to flash twrp again even though you didn't flash the stock recovery. Just a heads up
y2whisper said:
From what I've read you may need to flash twrp again even though you didn't flash the stock recovery. Just a heads up
Click to expand...
Click to collapse
Only if you boot android before rooting. Install-recovery.sh is suppled with the ROM that upon boot will install stock recovery. However flashing SuperSU hijacks this script for its own purposes, removing its ability to flash recovery. So trick is flash the ROM, boot straight to recovery and flash SuperSU
Ah. Good to know
rootSU said:
Its exactly correct. alternative is flashing a rooted stock ROM. Zip from recovery
Click to expand...
Click to collapse
Yeah, thought about going the rooted stock ROM route. Just feel more comfortable with the factory image. Any truth to @y2whisper comments? Doesn't make sense to me how TWRP would get overwritten by stock recovery if it's not flashed.
EDIT: See your post above (I took too long typing). Thanks for clarifying.
ManHands said:
Yeah, thought about going the rooted stock ROM route. Just feel more comfortable with the factory image. Any truth to @y2whisper comments? Doesn't make sense to me how TWRP would get overwritten by stock recovery if it's not flashed.
Click to expand...
Click to collapse
Have a look above.
I use this without losing data, but perhaps this is overkill? I assume you can skip the recovery to avoid losing TWRP, but I don't know about the kernel.
{replace with actual file name}
Enable USB Debugging and OEM Unlock
Reboot into bootloader (vol-down + power) or adb reboot bootloader
fastboot flash bootloader {bootloader-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash radio {radio-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot reboot
Sorry my fault...I didn't notice it didn't say boot.img in OP. Yes kernel should be flashed
moporoco said:
I use this without losing data, but perhaps this is overkill? I assume you can skip the recovery to avoid losing TWRP, but I don't know about the kernel.
{replace with actual file name}
Enable USB Debugging and OEM Unlock
Reboot into bootloader (vol-down + power) or adb reboot bootloader
fastboot flash bootloader {bootloader-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash radio {radio-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot reboot
Click to expand...
Click to collapse
rootSU said:
Sorry my fault...I didn't notice it didn't say boot.img in OP. Yes kernel should be flashed
Click to expand...
Click to collapse
Interesting... do I need to flash boot.img from LMY47E factory image if I'm using latest franco.Kernel? Seems silly to flash factory boot.img if I'm going to use franco boot.img instead. Thanks for the help fellas.
ManHands said:
Interesting... do I need to flash boot.img from LMY47E factory image if I'm using latest franco.Kernel? Seems silly to flash factory boot.img if I'm going to use franco boot.img instead. Thanks for the help fellas.
Click to expand...
Click to collapse
You're best off using a kernel that fully supports 5.1. I have no idea about Franco.
Look at the op on Franco's thread and you'll have your answer
holeindalip said:
Look at the op on Franco's thread and you'll have your answer
Click to expand...
Click to collapse
If he looks in the Franco thread, it will answer his question about having to flash a stock boot.img?
moporoco said:
I use this without losing data, but perhaps this is overkill? I assume you can skip the recovery to avoid losing TWRP, but I don't know about the kernel.
{replace with actual file name}
Enable USB Debugging and OEM Unlock
Reboot into bootloader (vol-down + power) or adb reboot bootloader
fastboot flash bootloader {bootloader-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash radio {radio-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot reboot
Click to expand...
Click to collapse
Why do you prefer to erase the cache then flash the new one? Does this really matter as long as userdata.img does not get flashed?
rootSU said:
You're best off using a kernel that fully supports 5.1. I have no idea about Franco.
Click to expand...
Click to collapse
Brain fart, for future reference Franco r1-r19 is 5.0,5.0.1,5.0.2 and r20+ is for 5.1
Thanks for the input everyone. To follow-up, I took the steps just as I planned in OP. No need to flash boot.img as frano-r20 is what I'm running and is compatible with 5.1 (despite the build # difference). I also didn't want to encrypt as the factory boot.img will force encrypt.
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
And just as @rootSU pointed out, prior to booting system, go into TWRP from bootloader to install su.zip first (otherwise factory recovery will overwrite TWRP). Then boot system, and you're back in business. Just had to re-do a couple build.prop edits, but everything else was as it was before.
If I'm stock 5.1 rooted LMY47D with the modified boot.img without forced encryption (from here), can I just..
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
then reboot into TWRP, flash SuperSU, reboot and go about my day?
lamenting said:
If I'm stock 5.1 rooted LMY47D with the modified boot.img without forced encryption (from here), can I just..
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
then reboot into TWRP, flash SuperSU, reboot and go about my day?
Click to expand...
Click to collapse
That, or you can wait for 47E factory boot.img that's non-enforcable. But, from the sounds of it people are still able to use the 47D boot.img linked in the post you provided. I'd imagine there's not much difference between the two.
Forerunner326 said:
Why do you prefer to erase the cache then flash the new one? Does this really matter as long as userdata.img does not get flashed?
Click to expand...
Click to collapse
I have no idea honestly, I saw someone else post it that way. It is probably not necessary.
ManHands said:
I just recently started fresh by unlocking and flashing LMY47D image. I'd like to upgrade to LMY47E and preserve data. I know I can backup/restore via TIBU, but I'd rather avoid that if possible. Am I overlooking anything by performing only the following commands? Also worth noting is that I'd like to retain TWRP and franco.Kernel.
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
At this point I'd use the hardware buttons to reboot into TWRP, flash su.zip, and then boot system.
I'm definitely going to perform a nandroid prior to doing this. However, just curious if this is the best way to do this or is there a better method. Or if there are any risks involved that I'm overlooking.
EDIT: Success... everything went just as planned. Thanks for everyone's help.
Click to expand...
Click to collapse
After flashing the files in fastboot you said to use the hardware buttons to boot into TWRP. How exactly did you go from fastboot to TWRP? Did you just power off while in fastboot or something else?

Reverting back to stock A/B Partition.

Hi Guys..
So I've followed a guide, wherein it will walk you through on how to flash TWRP on your phone on your non-active partition.
I would want to revert my non-active partition to stock, any thoughts?
Any help is much appreciated!
Extract the stock boot.img from stock and boot into fastboot
fastboot flash boot_(a or b) boot.img
kishd said:
Extract the stock boot.img from stock and boot into fastboot
fastboot flash boot_(a or b) boot.img
Click to expand...
Click to collapse
Is this rooting? I would want to revert everything back to stock, man

TWRP Flashable Fastboot for Sofia RETUS

*removed*
Is there a way to to this with the boot, system, product and vbmeta images from custom roms?
Ljrouse5 said:
Is there a way to to this with the boot, system, product and vbmeta images from custom roms?
Click to expand...
Click to collapse
Yes, see this post for how to make a custom super image:
https://forum.xda-developers.com/showpost.php?p=83706419&postcount=152
You can use the attachment in this op as an example/template to make your own flashable package.
Check out the updater-script; very simple syntax for writing images.
Updated the OP with link to SAFE fastboot flashable that does NOT write gpt and bootloader, so it is safe to flash on any Sofia variant. Flashing the bootloader zip is DANGEROUS, and should be flashed only over the SAME or OLDER gpt and bootloader.
Now if you have TWRP installed, you can flash back and forth among stock and custom roms, without the need for a pc and fastboot.
Where's the file?

Magisk

I have a mi 9 prime lancelot, ramdisk present, support system as root, helio g80...
patched boot.img from the stock ROM with magisk, copied to platform tools in laptop, then tun:
fastboot flash boot magisk.img
entered bootloop
and i seen some guys running:
fastboot --disable-verify --disable-some-sh*t flash vbmeta vbmeta.img
but it is the vbmeta from the stock ROM or patched one or what.
*CONFUSED*
Officer X said:
I have a mi 9 prime lancelot, ramdisk present, support system as root, helio g80...
patched boot.img from the stock ROM with magisk, copied to platform tools in laptop, then tun:
fastboot flash boot magisk.img
entered bootloop
and i seen some guys running:
fastboot --disable-verify --disable-some-sh*t flash vbmeta vbmeta.img
but it is the vbmeta from the stock ROM or patched one or what.
*CONFUSED*
Click to expand...
Click to collapse
From your stock rom
Shas45558 said:
From your stock rom
Click to expand...
Click to collapse
tysm

Categories

Resources