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.
I have a problem with SuperSU and magisk. I flash in twrp the root zip and then magisk, after that when I want to update it says this;
! Boot img patched by other programs
! please restore stock boot img
Click to expand...
Click to collapse
I don't have any custom rom, i'm actually oos 5.0.3. I first try to root but dm-verity was triggered and then followed all the steps to disable it.
Any solutions?
Nube420 said:
I have a problem with SuperSU and magisk. I flash in twrp the root zip and then magisk, after that when I want to update it says this;
Click to expand...
Click to collapse
Magisk is a root zip. It sounds like you are flashing SuperSU and Magisk. You can only use one or the other, not both!
Reflash stock ROM (or at least stock boot.img). Then flash Magisk. That's it.
Getting the error message that boot.img is modified is normal and expected in your case. SuperSU patched the boot image. Now Magisk is looking for the stock image to patch, and finding a patched one.
Hi everyone, when I install the TWRP using the flashable zip installer and then boot into TWRP it gets stuck in the TWRP logo and when I flash from fastboot it works fine, but I need to install it from flashable zip because I TWRP the I have to start with the partition slot A that also has the custom rom, I can't always change slot partitions every time I have to do operations with the TWRP.
I would also like to note that using the twrp-installer-jasmine_sprout-3.2.3.zip results in the recovery mode sitting on the TWRP logo even if it was a successful install.
I'm hoping someone can find a fix to this soon.
XRed_CubeX said:
Hi everyone, when I install the TWRP using the flashable zip installer and then boot into TWRP it gets stuck in the TWRP logo and when I flash from fastboot it works fine, but I need to install it from flashable zip because I TWRP the I have to start with the partition slot A that also has the custom rom, I can't always change slot partitions every time I have to do operations with the TWRP.
Click to expand...
Click to collapse
Do you flash the rom before the twrp zip?
I found a workaround instead of using the zip package.
1. Get the current partition you are using:
Code:
fastboot getvar current-slot
2. Choose which partition you want to install to( in this case I'm using B, but you can use A if you like ) and flash the latest TWRP IMG file:
Code:
fastboot flash boot_b twrp-3.2.3-0-jasmine_sprout.img
3. Set the current partition to the one you just flashed:
Code:
fastboot set_active b
Yes but then to go to TWRP to do something I can't always use a PC and from fastboot change slots. I took so long to install Magisk.
I had to dump the boot partition, modify it with magisk manager and flash it with the TWRP, it doesn't seem like anything to dump but to me it was difficult because I don't have root at the beginning.
If I flash the TWRP in the boot partition in the resurrection remix slot, I lose the chance to start the custon rom
Fixed, after the 3000th time I flashed, then the TWRP starts up, I don't know how not to ask me why but now I try to hypothesize 2 solutions:
1) We have to stay for a while with the custom rom, then later when you will try to flash the zip, the TWRP will start.
2) You need to have both Magisk and TWRP installed in the boot in order to start the TWRP flashed from zip without problems.
These solutions do not know if they are like this or I am confusing myself, so it happened to me.
If in doubt, hoping for an update does not hurt, maybe the TWRP will start immediately with no problems in the future.
So I've used TWRP r16 and it throws an "Image not signed or corrupt" error as suggested by other users I ignored it, but everytime I reboot to system and try to get to recovery "no command" show's up meaning TWRP was replaced by stock recovery all help will be appreciated.
Thanks
Akash731 said:
So I've used TWRP r16 and it throws an "Image not signed or corrupt" error as suggested by other users I ignored it, but everytime I reboot to system and try to get to recovery "no command" show's up meaning TWRP was replaced by stock recovery all help will be appreciated.
Thanks
Click to expand...
Click to collapse
You need to flash Magisk after flashing TWRP
1. Flash Latest TWRP
2. Reboot to TWRP
3. Flash Magisk
If you boot in to system after flashing TWRP, TWRP will be removed
pradeeppk said:
You need to flash Magisk after flashing TWRP
1. Flash Latest TWRP
2. Reboot to TWRP
3. Flash Magisk
If you boot in to system after flashing TWRP, TWRP will be removed
Click to expand...
Click to collapse
Hey thanks that worked.
But everytime I boot to system and boot to twrp the data gets encrypted and I can't access the files do you happen to know any solution for this?
Akash731 said:
Hey thanks that worked.
But everytime I boot to system and boot to twrp the data gets encrypted and I can't access the files do you happen to know any solution for this?
Click to expand...
Click to collapse
If you are on stock Rom, according to my knoweldge it is not possible to remove encryption, if you format your date in twrp for removing encryption then reboot to system you can see that the phone is again encrypted.
But in custom roms this doesnt happen.
pradeeppk said:
You need to flash Magisk after flashing TWRP
1. Flash Latest TWRP
2. Reboot to TWRP
3. Flash Magisk
If you boot in to system after flashing TWRP, TWRP will be removed
Click to expand...
Click to collapse
pradeeppk said:
If you are on stock Rom, according to my knoweldge it is not possible to remove encryption, if you format your date in twrp for removing encryption then reboot to system you can see that the phone is again encrypted.
But in custom roms this doesnt happen.
Click to expand...
Click to collapse
I don't want to try custom rom's as this is my main device guess I'm stuck with the encryption then thanks for your help. :good:
Edit:-
Tried TWRP r20 it decrypts fine thanks
pradeeppk said:
You need to flash Magisk after flashing TWRP
1. Flash Latest TWRP
2. Reboot to TWRP
3. Flash Magisk
If you boot in to system after flashing TWRP, TWRP will be removed
Click to expand...
Click to collapse
You don't have to flash Magisk after flashing TWRP. The two are unrelated.
After flashing TWRP you have to boot into recovery, not system. Once TWRP was started, you can reboot into system. No need for Magisk (unless you want Magisk anyway).
gewe said:
You don't have to flash Magisk after flashing TWRP. The two are unrelated.
After flashing TWRP you have to boot into recovery, not system. Once TWRP was started, you can reboot into system. No need for Magisk (unless you want Magisk anyway).
Click to expand...
Click to collapse
It will not work in stock ROM, if you flash a custom rom there is no need to flash Magisk.
You should flash Magisk or custom kernel after flashing TWRP otherwise it will be erased.
Google about TWRP erasing after reboot you should get too many posts regarding this
This is one of them
https://forum.xda-developers.com/oneplus-3t/help/twrp-deleted-booting-t3769867
pradeeppk said:
It will not work in stock ROM, if you flash a custom rom there is no need to flash Magisk.
You should flash Magisk or custom kernel after flashing TWRP otherwise it will be erased.
Google about TWRP erasing after reboot you should get too many posts regarding this
This is one of them
https://forum.xda-developers.com/oneplus-3t/help/twrp-deleted-booting-t3769867
Click to expand...
Click to collapse
I am using stock ROM, and yes, also Magisk (installed later). IIRC Magisk is not needed for TWRP to work. When I receive the next OTA notification, I will test this.
The thread you are referring to is for a OnePlus 3T. For our device this is the thread: https://forum.xda-developers.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910.
Since there is no official TWRP for the Moto G5S Plus, I took the following text from the TWRP page for the Moto G5S.
Note many devices will replace your custom recovery automatically during first boot. To prevent this, use Google to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.
Click to expand...
Click to collapse
Instead of that you can also use fastboot reboot-bootloader, and then from the bootloader start recovery.
pradeeppk said:
It will not work in stock ROM, if you flash a custom rom there is no need to flash Magisk.
You should flash Magisk or custom kernel after flashing TWRP otherwise it will be erased.
Google about TWRP erasing after reboot you should get too many posts regarding this
This is one of them
https://forum.xda-developers.com/oneplus-3t/help/twrp-deleted-booting-t3769867
Click to expand...
Click to collapse
Two days ago I received a notification for an OTA update, containing the August 2019 security patches.
After going back to stock ROM, installing all the updates up to the latest, I installed TWRP. After booting into recovery, and then into system, and recovery again, TWRP was gone. Strange, I don't remember this happening before. Maybe I always installed Magisk before booting into system.
Bottom line: you were right, I was wrong. Thanks for pointing it out.
gewe said:
Two days ago I received a notification for an OTA update, containing the August 2019 security patches.
After going back to stock ROM, installing all the updates up to the latest, I installed TWRP. After booting into recovery, and then into system, and recovery again, TWRP was gone. Strange, I don't remember this happening before. Maybe I always installed Magisk before booting into system.
Bottom line: you were right, I was wrong. Thanks for pointing it out.
Click to expand...
Click to collapse
As like you said this is the first time in my life i need to flash magisk to stick twrp.
I usualy doesn't use root or custom roms, install twrp, remove unnecessary apps from stock system, replace host files with adaway hosts, replace or edit gps config files. and continue using stock.
This is the main routine from Android 1.5
(Samsung spica (i think it was the first Android phone from Samsung)).
It may be due to security reason stock kernel or system delete twrp.
When installing magisk it patch stock boot image, that may be the reason of twrp remains after flashing magisk.
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!