Hello, I either completely forgot or just never ran into this before. I am used to flashing kernels in FKM. I and on Proton ROM and want to use Zest kernel and be rooted in Magisk. How can I do this?
Currently, I run thebZest kernel .IMG through Magisk and then flashboot boot *zest rooted kernel image*. It does not work. It installs the kernel (I think), but I lost my root from the original proton kernel.
Please help.
Zest kernel img only contains the executables to patch the kernel which is why you have to "fastboot boot", not "fastboot flash".
Containing only executables means it doesn't have the actual "bootable" code on it to boot the phone.
This means, you have to:
First, flash a stock magisk_patched.img by doing "fastboot flash boot magisk_patched_stock.img"
And then "fastboot boot zestkernel.img".
This will install the zest kernel while keeping root.
Related
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.
Hi,
I am getting into kernel development with a Google Pixel phone. I noticed that I need root permission in order to access syslog. My phone is on stock ROM with Magisk installed.
However, since Magisk only patched the original boot image, and since I am testing my kernel by temporarily booting it using "fastboot boot", I don't have access to root when using my own kernel. (I know this is sarcastic...)
I wonder how other kernel devs handle this situation. Do I need to compile the entire AOSP into a ROM with root builtin? Or is there another way around this using Magisk?
Thank you!
You don't fastboot boot a kernel, do you?
Anyway, if you use Anykernel you can flash your kernel over the Magisk patched boot image and Magisk should stay intact.
DISCLAIMER: I know absolutely nothing, zip, and null about kernel development.
Eventually I found out that, there was no way for my kernel to coexist with Magisk, because Magisk also modifies the kernel and I wouldn't want to merge its changes.
I think I'll just have to compile an engineering variant of AOSP from scratch... Are there any precompiled "official" images?
Didgeridoohan said:
You don't fastboot boot a kernel, do you?
Anyway, if you use Anykernel you can flash your kernel over the Magisk patched boot image and Magisk should stay intact.
DISCLAIMER: I know absolutely nothing, zip, and null about kernel development.
Click to expand...
Click to collapse
Thanks for the suggestion. But I couldn't get it to work. I think I'll just build an entirely new system.img from AOSP.
I'd also recommend building the entire AOSP for any other people facing this question. It takes more time but is officially supported by Google.
Hi there,
I've been rooting phones since Android 2, but lately it has been quite a challenge.
What I did so far:
Unpack new Xiaomi MI A2 (jasmine) device
Enabled Developer, USB debugging, OEM unlock in Android settings
Code:
fastboot oem unlock
Code:
fastboot flash boot_b TWRP-3.2.3-jasmine-20180804.img
TWRP ran fine. However, started with boot_a again.
OTA updated (about 6 times) to the newest version (Android 10, QKQ1.190910.002 V11.0.12.0.QDIMIXM)
Code:
fastboot flash boot_b twrp-3.4.0-0-jasmine_sprout.img
TWRP started only to the splash screen (showing "teamwin" and "Recovery Project 3.4.0-0"). Why is TWRP not starting properly?
Downloaded the stock fastboot image V11.0.12.0.QDIMIXM from https ://xiaomifirmwareupdater.com/archive/miui/jasmine/ and flash the stock boot.img via
Code:
fastboot flash boot_b jasmine_global_images_V11.0.12.0.QDIMIXM_10.0/images/boot.img
(my goal is to later patch it with Magisk and then install the patched version). However, the stock boot.img just hangs forever on the androidone screen. Why is the stock boot.img not starting properly?
I haven't used the Mi Unlock app and I didn't do an "fastboot flashing unlock_critical" yet. Is this necessary? What do I have to do to make the boot images work?
floydsen said:
Hi there,
I've been rooting phones since Android 2, but lately it has been quite a challenge.
What I did so far:
Unpack new Xiaomi MI A2 (jasmine) device
Enabled Developer, USB debugging, OEM unlock in Android settings
TWRP ran fine. However, started with boot_a again.
OTA updated (about 6 times) to the newest version (Android 10, QKQ1.190910.002 V11.0.12.0.QDIMIXM)
TWRP started only to the splash screen (showing "teamwin" and "Recovery Project 3.4.0-0"). Why is TWRP not starting properly?
Downloaded the stock fastboot image V11.0.12.0.QDIMIXM from https ://xiaomifirmwareupdater.com/archive/miui/jasmine/ and flash the stock boot.img via (my goal is to later patch it with Magisk and then install the patched version). However, the stock boot.img just hangs forever on the androidone screen. Why is the stock boot.img not starting properly?
I haven't used the Mi Unlock app and I didn't do an "fastboot flashing unlock_critical" yet. Is this necessary? What do I have to do to make the boot images work?
Click to expand...
Click to collapse
why do you feel you must use boot images ...the tried and working method for "jasmine" is to boot custom recovery and then flash magisk zip ( root only ) ..or...flash custom recovery installer zip which will flash recovery to both a/b slots.. then flash magisk
to properly boot you need to overcome stuff like secure boot and force encryption
if you aren't planning on custom roms just boot twrp to flash magisk
or
flash installer zip for recovery and wipe everything including formatting data to remove encryption and boot directly to recovery to install custom rom
twrp custom recovery had problems with decryption on stock rom ...secure boot won't allow booting modified images ..
lastly remember on jasmine there is no recovery partition..so everything is in the boot image ..magisk and recovery ..so everytime you flash stock , stock boot overwrites these changes and should flash everything again
tbh that's why i converted to wayne to get old partition layout as the A/B story pissed me off
KevMetal said:
why do you feel you must use boot images ...the tried and working method for "jasmine" is to boot custom recovery and then flash magisk zip ( root only ) ..or...flash custom recovery installer zip which will flash recovery to both a/b slots.. then flash magisk
to properly boot you need to overcome stuff like secure boot and force encryption
if you aren't planning on custom roms just boot twrp to flash magisk
or
flash installer zip for recovery and wipe everything including formatting data to remove encryption and boot directly to recovery to install custom rom
twrp custom recovery had problems with decryption on stock rom ...secure boot won't allow booting modified images ..
lastly remember on jasmine there is no recovery partition..so everything is in the boot image ..magisk and recovery ..so everytime you flash stock , stock boot overwrites these changes and should flash everything again
tbh that's why i converted to wayne to get old partition layout as the A/B story pissed me off
Click to expand...
Click to collapse
Ok. So I'm back to Stock image jasmine_global_images_V11.0.12.0.QDIMIXM_10.0 by executing "flash_all.sh". You are saying I should "simply boot". You mean:
Code:
fastboot boot TWRP-3.4.0-0-jasmine_sprout-for_V11.0.12.0.img
right? That doesn't work, it won't boot. How do I overcome secure boot and force encryption?
floydsen said:
Ok. So I'm back to Stock image jasmine_global_images_V11.0.12.0.QDIMIXM_10.0 by executing "flash_all.sh". You are saying I should "simply boot". You mean:
right? That doesn't work, it won't boot. How do I overcome secure boot and force encryption?
Click to expand...
Click to collapse
yes im saying that but post a pic of the error ...why or how doesn't it boot ..
if it is the official twrp just dump it and look for the unofficial Russian one or one modified by Nebrassy or use Orange fox and or Pitch black ..official is broken last time i checked
also the name of that looks like one hell of a job ..shorten it to
recovery.img or twrp.img
fastboot boot recovery.img
but first run
fastboot getvar all
& also run fastboot flashing unlock_critical
but most importantly get another recovery
& i don't want to insult your intelligence but after flashing stock did you check to make sure bootloader was still unlocked and that dev settings was activated and that adb was toggled to on and that you authorised adb again
basicall after stock boot device and do the above ..plug in usb ..toggle adb ..authorise ..run adb devices ..if you see your device ..adb reboot bootloader ..fastboot devices ..see your device ..fastboot getvar all ..see bootloader is unlocked ..fastboot flashing unlock_critical if not done yet ...make sure to do ALL the above again after data gets wiped.....put twrp in adb folder ( MUST BE UNOFFICIAL RUSSIAN OR MODUFIED BY NEBRASSY ..rename to revovery.img ...fastboot boot recovery.img .. use file manager to put magisk.zip on internal then flash ..then reboot to rooted phone with stock recovery ...
Sent from my wayne using XDA Labs
KevMetal said:
why do you feel you must use boot images ...the tried and working method for "jasmine" is to boot custom recovery and then flash magisk zip ( root only ) ..or...flash custom recovery installer zip which will flash recovery to both a/b slots.. then flash magisk
to properly boot you need to overcome stuff like secure boot and force encryption
if you aren't planning on custom roms just boot twrp to flash magisk
or
flash installer zip for recovery and wipe everything including formatting data to remove encryption and boot directly to recovery to install custom rom
twrp custom recovery had problems with decryption on stock rom ...secure boot won't allow booting modified images ..
lastly remember on jasmine there is no recovery partition..so everything is in the boot image ..magisk and recovery ..so everytime you flash stock , stock boot overwrites these changes and should flash everything again
tbh that's why i converted to wayne to get old partition layout as the A/B story pissed me off
Click to expand...
Click to collapse
KevMetal said:
yes im saying that but post a pic of the error ...why or how doesn't it boot ..
if it is the official twrp just dump it and look for the unofficial Russian one or one modified by Nebrassy or use Orange fox and or Pitch black ..official is broken last time i checked
Sent from my wayne using XDA Labs
Click to expand...
Click to collapse
Of course it is the official one. OMFG twrp-3.4.0-0-jasmine_sprout.img is broken (freezes on the TWRP splash screen), but version 3.3.1 seems to work. That's a relief, so I will try to flash magisk now. Although, I think I will need to do the decryption thing for jasmine first, but I guess I'll follow https://www.the***********.com/install-twrp-recovery-root-xiaomi-mi-a2-a2-lite/ mostly
floydsen said:
Of course it is the official one. OMFG twrp-3.4.0-0-jasmine_sprout.img is broken (freezes on the TWRP splash screen), but version 3.3.1 seems to work. That's a relief, so I will try to flash magisk now. Although, I think I will need to do the decryption thing for jasmine first, but I guess I'll follow https://www.the***********.com/install-twrp-recovery-root-xiaomi-mi-a2-a2-lite/ mostly
Click to expand...
Click to collapse
jajaja well now you know ...be careful ...some "official" roms are also more buggy than unofficial ones for Jasmine/Wayne..
LOS is an example ..so be forewarned .. if you like android 1 i guess stock rooted is a smart option to keep updates and keep device certified for google stuffs . .
alternativeky go FULL custom rom because stock and custom recovery is just a pain and not worth the hassle on an A/B treble device flashable by fastboot ..just boot the recovery when if ever needed
fyi ..you can flash magisk and it will boot ...if you don't try changing the recovery ..so you can have stock rooted with magisk without rcustom recovery...* recommended by me if you only wamt stock with root
Sent from my wayne using XDA Labs
All good now, thanks for your help! I just flashed Magisk (and also TWRP) and everything works nicely! I will need to get some experience, but I'll keep in mind that I maybe want to get rid of the TWRP recovery. Finally security testing is fun again. Thx!
hello guys,
i want to root my redmi 9 with magisk. i tried to use the "patched boot.img method", but everytime i land in a bootloop.
im on miui global 12.5.3 stable, android 11. bootloader unlocked!
i took that magisk version: https://github.com/topjohnwu/Magisk/releases/tag/v23.0 (v23.0 - as apk)
than i was on that page: https://c.mi.com/oc/miuidownload/detail?device=1900381
on that page i took on the left "redmi 9 global" - which calls:
Code:
Stable ROM
Author: MIUI Official Team
Version: V12.5.3.0.RJCMIXM (MIUI11)
Size: 2.2G
i extracted the archive and copied magisk.apk and boot.img to my download-folder on my smartphone. patched the boot.img with magisk. than copied the patched boot.img to my pc.
after that i bootet the phone into fastboot mode. than i flashed the patched boot.img with fastboot flash boot patchedboot.img - used than fastboot reboot and than im in the bootloop.
can someone tell me, what i am doing wrong?
(ps: when i flash the unpatched boot.img i get no bootloop and my phone is starting again - but of course with no root )
thanks
taker-`
If I understood correctly, as well as you don't mention about that, you didn't deactivate the AVB mechanism by flashing the stock vbmeta image with the command fastboot --disable-verity --disable-verification flash vbmeta [your vbmeta.img file], which is documented that if Magisk is installed without that procedure, the device is bootlooping (see this guide).
oh, i see. yes, i didnt use that command. but now i got it working. i read that twrp isnt really compatible with the redmi9 and i need another recovery.
i used that now: https://sourceforge.net/projects/shrp/
vbmeta from post #4: https://forum.xda-developers.com/t/dont-use-twrp-on-redmi-9-use-shrp.4334123/
than i did that:
fastboot flash recovery *.img
fastboot --disable-verity --disable-verification flash vbmeta *.img
fastboot reboot recovery
from there i installed integrated magisk v23.0
phone reboot...got root.
I have read that there are issues with TWRP and Magisk (as far as I know, even its developer mentions that). Although I never got SHRP to work properly on my device and I always get bootloop issues with that. Do you know if it's because of the version I run? I currently run MIUI 11.0.2.0, which I think it's the device's original version.
uh im sorry. im also new to the shrp recovery. i had only used twrp so far.
did you try to flash this version i linked? if its not working you can fast flashback ur twrp. maybe just give it a try?
taker-` said:
uh im sorry. im also new to the shrp recovery. i had only used twrp so far.
did you try to flash this version i linked? if its not working you can fast flashback ur twrp. maybe just give it a try?
Click to expand...
Click to collapse
I don't think I have tried that. I think at the worst case, because I run MIUI I'll just roll back to it's original recovery image. I'm just asking because I don't see mentions of software versions.
what smartphone do you own?
Device ZTE Quest 5, Z3351S
Android version: 9
Magisk version name: 831a398b
Magisk version code: 25206
After flashing the patched `recovery.img`, trying what the guide says (using recovery keys) will not boot Magisk. Even booting the image file itself just results in the phone refusing to boot until it reboots. Anyone know what is happening?
you do it wrong, flash boot.img with fastboot
I've done that and none of my connections will work. Magisk also says that I don't have boot ramdisk. The first time I did do the boot image, it wasn't fully rooted and root apps couldn't do much.