I was wondering whether the cyanogenmod kernel comes with a custom recovery because every tutorial says after flashing boot.img in fastboot mode, reboot into custom recovery and flash the ROM. So, I can only assume the kernel installs a custom recovery. Is this right?
Sorry i'm new to this
Yep , it comes with CWM
I like to switch between two different developer's kernels and they seem to work better when flashed over the stock kernel and not custom kernel 2 being flashed over custom kernel 1.
My resolution to this is to restore to my stock rooted with magisk kernel then flash the other custom kernel. This results in a Magisk brick where you can't uninstall Magisk and you can't install magisk again due to the stock boot image being modified. The only answer to fix the Magisk brick is a system wipe and rom re-install.
If I uninstall between kernels, all of my Magisk settings and modules are uninstalled too if it doesn't just give the modified boot img thing again.
How can I swap between kernels while restoring stock without getting Magisk bricked?
Example: Custom Kernel 1 > Stock Kernel > Custom Kernel 2. This always leads to the Magisk brick.
Nexus 6, 7.1.2 NitrogenOS, Stock kernel, ElementalX kernel, FK Kernel.
Whenever I have to move between kernels, I do the following:
Dirty flash ROM zip (to restore the stock boot.img that ships with the ROM) or manually extract the boot.img from your ROM's flashable zip and fastboot flash it
Flash Magisk zip
Flash new kernel zip
Reboot and profit!
I haven't faced any issues ever with this process, following the order listed above. Give it a shot. Good luck! :good:
shadowstep said:
Whenever I have to move between kernels, I do the following:
Dirty flash ROM zip (to restore the stock boot.img that ships with the ROM) or manually extract the boot.img from your ROM's flashable zip and fastboot flash it
Flash Magisk zip
Flash new kernel zip
Reboot and profit!
I haven't faced any issues ever with this process, following the order listed above. Give it a shot. Good luck! :good:
Click to expand...
Click to collapse
Y no back up stock boot from the starting?
redsun_ravi said:
Y no back up stock boot from the starting?
Click to expand...
Click to collapse
Why do you need to backup the stock boot image from the beginning? It's already a part of the ROM zip that you flash. You can always dirty flash to go back to the boot image that ships with the ROM that you are using or extract it from your ROM's flashable zip.
shadowstep said:
Why do you need to backup the stock boot image from the beginning? It's already a part of the ROM zip that you flash. You can always dirty flash to go back to the boot image that ships with the ROM that you are using or extract it from your ROM's flashable zip.
Click to expand...
Click to collapse
Y unpack rom and repack boot
Y flash whole rom and loss magisk setting, fonts, adblock host and other stuff
While u can just give 10 sec to back up boot
xNotta said:
I like to switch between two different developer's kernels and they seem to work better when flashed over the stock kernel and not custom kernel 2 being flashed over custom kernel 1.
My resolution to this is to restore to my stock rooted with magisk kernel then flash the other custom kernel. This results in a Magisk brick where you can't uninstall Magisk and you can't install magisk again due to the stock boot image being modified. The only answer to fix the Magisk brick is a system wipe and rom re-install.
If I uninstall between kernels, all of my Magisk settings and modules are uninstalled too if it doesn't just give the modified boot img thing again.
How can I swap between kernels while restoring stock without getting Magisk bricked?
Example: Custom Kernel 1 > Stock Kernel > Custom Kernel 2. This always leads to the Magisk brick.
Nexus 6, 7.1.2 NitrogenOS, Stock kernel, ElementalX kernel, FK Kernel.
Click to expand...
Click to collapse
shadowstep said:
Whenever I have to move between kernels, I do the following:
Dirty flash ROM zip (to restore the stock boot.img that ships with the ROM) or manually extract the boot.img from your ROM's flashable zip and fastboot flash it
Flash Magisk zip
Flash new kernel zip
Reboot and profit!
I haven't faced any issues ever with this process, following the order listed above. Give it a shot. Good luck! :good:
Click to expand...
Click to collapse
No real need to fastboot flash it, just flash the boot.img in TWRP, only takes a second before you flash Magisk
Sent from my H1611 using Tapatalk
redsun_ravi said:
Y unpack rom and repack boot
Y flash whole rom and loss magisk setting, fonts, adblock host and other stuff
While u can just give 10 sec to back up boot
Click to expand...
Click to collapse
Repack boot? I never said that anywhere. Also, I hope you mean unzip the ROM zip file.
Anyway, backing up the boot image would serve no purpose as the OP wants to switch to a different kernel, which means a different boot image that the one he/she is using right now. It'll be pointless.
BurnedDrake said:
No real need to fastboot flash it, just flash the boot.img in TWRP, only takes a second before you flash Magisk
Click to expand...
Click to collapse
Of course the boot image can be flashed via TWRP too. I just gave that as an alternative option. Never said it has to be done a certain way.
shadowstep said:
Repack boot? I never said that anywhere. Also, I hope you mean unzip the ROM zip file.
Anyway, backing up the boot image would serve no purpose as the OP wants to switch to a different kernel, which means a different boot image that the one he/she is using right now. It'll be pointless.
Of course the boot image can be flashed via TWRP too. I just gave that as an alternative option. Never said it has to be done a certain way.
Click to expand...
Click to collapse
Oh I know, it wasn't a criticism, just one less reboot is all
Sent from my H1611 using Tapatalk
redsun_ravi said:
Y unpack rom and repack boot
Y flash whole rom and loss magisk setting, fonts, adblock host and other stuff
While u can just give 10 sec to back up boot
Click to expand...
Click to collapse
U don't lose all the magisk stuff on dirty flash. The only way u lose all that is running the magisk uninstaller. I wipe system, boot, and cache, dirty flash ROM, then magisk, then new kernel. All magisk modules, host files, settings are still present no matter what device or what ROM. Boot is included in ROM so dirty flash flashes that stock boot.img and starts fresh.
You can flash kernel with fastboot.
Extract boot.img from zip, then run
fastboot flash boot boot.img
After that you can backup boot in twrp and flash magisk.
Repeat with other kernel.
Can anyone please tell the the following things, or redirect me to appropriate tutorials:
1. How to install custom recovery:
- I have question about slots, because some ask to install TWRP on inactive slots while some ask to install it on both slots.
- How to backup the stock recovery, everyone asks to reflash stock recovery in case of any problem but no one told how to backup the recovery while you are on the latest firmware while the firmwares available for download is too old.
- Do we have to install custom ROM on active slot or inactive slot?
2. Install Stock ROM after the phone is running a custom ROM
- Is it safe to flash the stock ROM using MiFlash tool if I want to go back to stock? because the only available firmware is from 2018 and is codename jasmine while the phone's codename is jasmine_sprout it will not cause any problem right?
3. Is it safe to use the All in One tool or shall I do everything manually?
https://forum.xda-developers.com/mi-a2/development/tool-tool-one-driversunlocktwrpfactory-t3866190
Device Name: Xiaomi Mi A2
Codename: jasmine_sprout
BuildKQ1.180904.001.V10.0.7.0.PDIMIXM
https://forum.xda-developers.com/mi-a2/how-to/guide-flashing-roms-twrp-black-screen-t3913052
For instaling twrp and custom rom.
You have everything you need here on xda, you just need to find it.
This is the best thread for newbies:
https://forum.xda-developers.com/mi-a2/how-to/guide-how-to-flash-custom-roms-stuff-t3876375
Just as an overview:
rom and twrp are flashed to inactive slot. For eg if your current slot is A, the rom and twrp will be flashed to B and this is why you need to change slot to B after flashing them. Then optionally you can flash gapps,kernel and magisk and they will be directly flashed to B.
Note:
order of flashing is rom>twrp(change slot)>gapps>kernel>magisk
mma_1494 said:
This is the best thread for newbies:
https://forum.xda-developers.com/mi-a2/how-to/guide-how-to-flash-custom-roms-stuff-t3876375
Just as an overview:
rom and twrp are flashed to inactive slot. For eg if your current slot is A, the rom and twrp will be flashed to B and this is why you need to change slot to B after flashing them. Then optionally you can flash gapps,kernel and magisk and they will be directly flashed to B.
Note:
order of flashing is rom>twrp(change slot)>gapps>kernel>magisk
Click to expand...
Click to collapse
I will have to flash twrp everytime when I flash a new ROM?
@engloa @MikeChannon pls remove the thread...
It's already been answered.
shailendra1993 said:
I will have to flash twrp everytime when I flash a new ROM?
Click to expand...
Click to collapse
Yes
Is there stock ROM zip file available to flash with TWRP?
I've installed TWRP and root. It's not safe to take OTA update any more.
Thanks
When getting a custom ROM and wanting to root it with Magisk, should I patch and flash the boot.img of the specific ROM or the boot.img of the factory FW
hazoky01 said:
When getting a custom ROM and wanting to root it with Magisk, should I patch and flash the boot.img of the specific ROM or the boot.img of the factory FW
Click to expand...
Click to collapse
Flash TWRP or orange fox and then Magisk zip in the recovery
That's it
But of course the bootloader has to be unlocked
The boot img of the current ROM you're using like example boot img of Pixel Experience if you're using that. Usually the boot img is inside the ROM zip when you installed it. But this method is for devices without custom recovery. Of course it will work but I suggest to follow what Laptapper suggested to flash a custom recovery (orange fox r12.1_2 or twrp 3.7.0) and just flash magisk.zip.