Faulty TWRP and Magisk installation led to a bootloop, but very rarely the phone will boot into safe mode. Can I fix this without a reset? - OnePlus 7 Pro Questions & Answers

on the OnePlus 7 Pro with the Android 11 Open Beta 5.
A few hours back I decided to reinstall TWRP on my phone as I hadn't yet permanently done so. I believe I may have installed the wrong version (guacamole), as the moment I reinstalled Magisk and rebooted, my phone bootlooped. I ended up with a Qualcomm error with exit code 0 the times I got it to stop. It took a few tries but I was able to get it into fastboot and flash the original boot image, but to little avail. For some reason, if I reflash the boot image, wipe the device cache, and get REALLY lucky (like 3 out of 30 reboots now), my phone will turn on in safe mode. But as I quickly realized, rebooting throws the phone back into a bootloop. I'm able to access apps through safe mode, though very limited.
I'm currently making a backup of my phone, but is there anything I can do now to avoid the reset process?

You have a few options now, which I would try in following order:
Diable the Modules:
If you manage to boot your phone enable USB-Debugging and use following command in ADB:
Code:
magisk --remove-modules
This will remove all modules, which could be causing the bootloop.
Reflash Magisk:
Boot Nebrassy TWRP from bootloader
Code:
fastboot boot twrp.img
twrp.img should be the name of the recovery downloaded
Mount storage
Download latest Magisk apk
Rename the .apk to .zip
Transfer to phone
Flash latest Magisk. This might fix something.
Uninstall Magisk:
Boot Nebrassy TWRP from bootloader
Download latest Magisk apk
Rename the .apk to uninstall.zip
Transfer to phone
Flash the uninstall.zip This should remove Magisk
Reflash TWRP (this will also remove Magisk)
Boot Nebrassy TWRP from bootloader
Code:
fastboot boot twrp.img
twrp.img should be the name of the recovery downloaded
go to Advanced > Flash Current TWRP
Reflash latest Magisk if you want to keep it (not reccomended in your case)
Hope you get it fixed.

Related

How to install TWRP after Magisk?

How to install TWRP after Magisk?
I have a OnePlus 6 running Oxygen OS 9.0 and I managed to install Magisk by obtaining the stock boot image and using the magisk manager app to patch it to include magisk, then I flashed the patched boot.img using fastboot and ADB.
The reason I did it this way is that every time I tried to boot with twrp.img in order to flash twrp.zip, I would run into a screen saying Qualcomm CrashDump Mode and TWRP wouldn't boot.
Now I want to install TWRP and I was wondering if there is any way of doing it by using Magisk, so I wouldn't have to boot twrp.img.
Any help would be greatly appreciated.
Same problem here. Already tried to boot every version of TWRP without success.
abrahammurciano said:
How to install TWRP after Magisk?
I have a OnePlus 6 running Oxygen OS 9.0 and I managed to install Magisk by obtaining the stock boot image and using the magisk manager app to patch it to include magisk, then I flashed the patched boot.img using fastboot and ADB.
The reason I did it this way is that every time I tried to boot with twrp.img in order to flash twrp.zip, I would run into a screen saying Qualcomm CrashDump Mode and TWRP wouldn't boot.
Now I want to install TWRP and I was wondering if there is any way of doing it by using Magisk, so I wouldn't have to boot twrp.img.
Any help would be greatly appreciated.
Click to expand...
Click to collapse
If you have magisk manager with working root.... Then YES you can.... Just download Official TWRP app from GPlay... Open it give root permissions and follow the onscreen instructions.... Thats it...and yes use the zip not the img file
James Blode said:
If you have magisk manager with working root.... Then YES you can.... Just download Official TWRP app from GPlay... Open it give root permissions and follow the onscreen instructions.... Thats it...and yes use the zip not the img file
Click to expand...
Click to collapse
But there's no button to flash, I open the app, select flash recovery, select device, but theres no button to flash it.
See screenshot
do you have fastboot and adb installed on your computer? I assume so as you have oem unlocked to flash magisk, correct?
Copy the TWRP file that ends with .img to your desktop
if so, open a command prompt (windows key +R and type cmd press enter)
type "cd desktop" without quotes and press enter
type fastboot boot "twrp.img" (whatever the file name actually is)
Congrats, you are now in TWRP. But wait, there's more! if you reboot to system or other wise leave TWRP at this point you will revert back to stock. to flash recovery onto your device permanently, install the TWRP.ZIP (The ZIP is IMPORTANT) as it changes the boot on the OP6 to have the TWRP image (oh, by the way, there is no recovery partition on OP6 like previous devices [Thanks A/B partition!])
Now you can reboot to your hearts content. remember if you update OOS, you will lose the custom recovery, so flash the TWRP.zip after every update!
Denkai said:
do you have fastboot and adb installed on your computer? I assume so as you have oem unlocked to flash magisk, correct?
Copy the TWRP file that ends with .img to your desktop
if so, open a command prompt (windows key +R and type cmd press enter)
type "cd desktop" without quotes and press enter
type fastboot boot "twrp.img" (whatever the file name actually is)
Congrats, you are now in TWRP. But wait, there's more! if you reboot to system or other wise leave TWRP at this point you will revert back to stock. to flash recovery onto your device permanently, install the TWRP.ZIP (The ZIP is IMPORTANT) as it changes the boot on the OP6 to have the TWRP image (oh, by the way, there is no recovery partition on OP6 like previous devices [Thanks A/B partition!])
Now you can reboot to your hearts content. remember if you update OOS, you will lose the custom recovery, so flash the TWRP.zip after every update!
Click to expand...
Click to collapse
Yes I have fastboot and ADB on my computer (Linux btw), and as I mentioned it the first post, I already tried that, except that instead of booting into TWRP after "fastboot boot twrp.img" I got to a screen saying Qualcomm CrashDump mode (see attached image (the image might not be exactly the same as mine, I found that on the internet because I don't have my computer to reproduce it now)).
super odd. maybe your boot image is corrupt? still doesn't explain why fastboot boot isn't working though... Try bluSpark's TWRP image. it's a solid build and I am not having issues with it.
https://forum.xda-developers.com/oneplus-6/development/kernel-t3800965/page17
or you can also try swapping to the other partition by typing 'fastboot --set-active=_a' (or fastboot --set-active=_b) and booting to that recovery.
if that doesn't work for ya, try and restore stock via fastboot is my only suggestion:
https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665
[/COLOR]
abrahammurciano said:
Yes I have fastboot and ADB on my computer (Linux btw), and as I mentioned it the first post, I already tried that, except that instead of booting into TWRP after "fastboot boot twrp.img" I got to a screen saying Qualcomm CrashDump mode (see attached image (the image might not be exactly the same as mine, I found that on the internet because I don't have my computer to reproduce it now)).
Click to expand...
Click to collapse
I wonder if this problem has been solved? After having Root without TWRP since last year, I decided to flash TWRP now because I miss having a Nandroid backup. But just like op, right after I type in "fastboot boot TWRP.img", I end up with that Qualcomm crash dump error, resulting in a fastboot boot loop every time I restart the phone. My only recourse is to use the MSM flash tool that reflashes everything and returns the phone into factory stock. In the process wiping out all my data. I don't think there's anything corrupted
EDIT: the problem wasn't the procedure; it was the damned bootable TWRP .img files. I downloaded different TWRP.img versions, and they all failed to flash into temporary TWRP, except for this one that I found here: https://drive.google.com/open?id=1CJoBQ5ZuAExv27XLWwLMFYfHoLEu5YFJ You can use this bootable .img to flash any TWRP version compatible with your device
Does it work for Android 10?
oneplus 6 running oxygen os beta 30 with magisk 20.1 without twrp
Borat38 said:
[/COLOR]
I wonder if this problem has been solved? After having Root without TWRP since last year, I decided to flash TWRP now because I miss having a Nandroid backup. But just like op, right after I type in "fastboot boot TWRP.img", I end up with that Qualcomm crash dump error, resulting in a fastboot boot loop every time I restart the phone. My only recourse is to use the MSM flash tool that reflashes everything and returns the phone into factory stock. In the process wiping out all my data. I don't think there's anything corrupted
EDIT: the problem wasn't the procedure; it was the damned bootable TWRP .img files. I downloaded different TWRP.img versions, and they all failed to flash into temporary TWRP, except for this one that I found here: https://drive.google.com/open?id=1CJoBQ5ZuAExv27XLWwLMFYfHoLEu5YFJ You can use this bootable .img to flash any TWRP version compatible with your device
Click to expand...
Click to collapse
Please I need TWRP for Blackview BV9600 pro please share with me if you have a link to a webpage I may find it
James Blode said:
If you have magisk manager with working root.... Then YES you can.... Just download Official TWRP app from GPlay... Open it give root permissions and follow the onscreen instructions.... Thats it...and yes use the zip not the img file
Click to expand...
Click to collapse
Hello I'm having magisk root access and official TWRP app but can't use it for NAndroid backup, how can I use the app for backup and fishing custom ROM?

Cannot get ROMs to boot after installing from TWRP

I have had success flashing two ROMS (Lineage OS with MicroG and HavocOS) so far, but at some point, I am now getting nowhere fast trying to reinstall either of these after several clean attempts. I keep ending up at a black screen with a blue light and no more TWRP and no more bootable OS.
Here's what I did...
Starting fresh... Used MSMDownloadTool V4 to install OOS (enchilada_22_O.09_180517) then updated with local update file (OnePlus6Oxygen_22_OTA_030_all_1904032206)
Then, enable developer options, OEM unlock, USB debugging, advanced reboot
Reboot to fastboot and execute "fastboot oem unlock" in Powershell with admin rights
Reboot to OOS, then check developer options again, all good
Reboot to fastboot, execute "fastboot boot twrp-3.2.3-x_blu_spark_v9.91_op6.img"
Reboot to TWRP, install Magisk-v19.2.zip, reboot to OS (to verify root)
Reboot to TWRP, install ROM zip, then install twrp-3.2.3-x_blu_spark_v9.91_op6.
Select Reboot to Recovery within TWRP
And then.... black screen with blue solid light. Can't load TWRP nor can I boot into OS.
I have also tried wiping during some of these attempts and that didn't help. At one point, I had a bricked phone with no bootloader/fastboot, but saved it with the MSM tool.
Can someone please tell me what am I doing wrong? I see some ROMs (such as Lineage0S 16 with MicroG) saying to install a stock OOS twice along with TWRP, then the LOS ROM+TWRP, but I could never get beyond the first attempt at installing stock ROM+TWRP. Same thing happens.
EDIT: Resolved below.
Do you have magisk installed after reboot twrp ?
cypress16 said:
I have had success flashing two ROMS (Lineage OS with MicroG and HavocOS) so far, but at some point, I am now getting nowhere fast trying to reinstall either of these after several clean attempts. I keep ending up at a black screen with a blue light and no more TWRP and no more bootable OS.
Here's what I did...
Starting fresh... Used MSMDownloadTool V4 to install OOS (enchilada_22_O.09_180517) then updated with local update file (OnePlus6Oxygen_22_OTA_030_all_1904032206)
Then, enable developer options, OEM unlock, USB debugging, advanced reboot
Reboot to fastboot and execute "fastboot oem unlock" in Powershell with admin rights
Reboot to OOS, then check developer options again, all good
Reboot to fastboot, execute "fastboot boot twrp-3.2.3-x_blu_spark_v9.91_op6.img"
Reboot to TWRP, install Magisk-v19.2.zip, reboot to OS (to verify root)
Reboot to TWRP, install ROM zip, then install twrp-3.2.3-x_blu_spark_v9.91_op6.
Select Reboot to Recovery within TWRP
And then.... black screen with blue solid light. Can't load TWRP nor can I boot into OS.
I have also tried wiping during some of these attempts and that didn't help. At one point, I had a bricked phone with no bootloader/fastboot, but saved it with the MSM tool.
Can someone please tell me what am I doing wrong? I see some ROMs (such as Lineage0S 16 with MicroG) saying to install a stock OOS twice along with TWRP, then the LOS ROM+TWRP, but I could never get beyond the first attempt at installing stock ROM+TWRP. Same thing happens.
Click to expand...
Click to collapse
What I did is this...
After your first step which is "Starting fresh... Used MSMDownloadTool V4 to install OOS (enchilada_22_O.09_180517) then updated with local update file (OnePlus6Oxygen_22_OTA_030_all_1904032206)", I install again the "OnePlus6Oxygen_22_OTA_030_all_1904032206" to follow the step that requires flashing OOS twice.
Then I followed the steps in https://forum.xda-developers.com/oneplus-6/how-to/tutorial-decrypt-flash-rom-pie-oreo-roms-t3838643, this is to decrypt my device and to be able to flash any ROM infinite times without corrupting again my device.
I suggest you use a newer MSM tool to restore to stock. Then, do local upgrade twice to install the zip on the both slots. Then proceed to unlock the bootloader.
Anytime u flash twrp u need to flash magisk too (no need to reboot if you are using the same slot before flashing magisk) , I think on the last step u forget that
Just boot to twrp and flash magisk again
I wrote that before ? 2e post
Thanks for all the tips. Finally got it working. This is nothing like the Samsung phones I'm used to.....
Here is the process I followed and I finally have a working system with the Havoc Rom, MicroG, the blu_spark kernel and magisk:
MSMDownloadTool V4 to install OOS (enchilada_22_O.09_180517) then updated with local update file (OnePlus6Oxygen_22_OTA_030_all_1904032206)
Unlock booloader
Flash TWRP
Reboot to TWRP and flash oos 9.0.5 ota zip and flash TWRP
Reboot to TWRP
Flash oos 9.0.5 ota zip and TWRP again
Reboot to TWRP
Factory reset
Flash ROM
Reboot TWRP
Flash Magisk
Flash Kernel
Reboot to TWRP
Flash microg
Resume normal life after two excruciating days of failed attempts

Failed root, stuck on unlocked bootloader warning message.

Hi everyone,
I have tried to get root priviledges following a guide from Droidwin.com to flash Magisk throught TWRP. At the very last step, after flashing Magisk 19.3 throught TWRP when I tried to reboot my phone, it gets stuck on the "unlocked bootloader warning message", which is supposed to disappear after a few seconds and move on to the boot animation.
It seems like I can go to the stock recovery, which shows fastboot and wipe actions. At this point, I can acces the fastboot screen, but the device is not listed using the ADB command "adb devices", nothing is find.
I'm wondering, what can I try to restore the phone ? I thank you in advance for any suggestions.
Here are some additionnal informations:
---Device---
Oneplus nord running OxygenOS 10.5.5, european version.
---What I've done to get in this situation---
Unlock bootloader using ADB
Launch an TWRP image file using ADB
"Try" to root using Magisk 19.3 zip throught TWRP
Power off from recovery (using TWRP touch interface), but the guide tells to click reboot at this step ...
Get stuck on the warning message, not having any boot animation.
Try to boot in Fastboot.
Turn the Nord Off and start it with plus minus and Power.
Boot TWRP with "Fastboot boot "TWRP File name.img" and flash magisk 20.4
Thank you @denndenn.
I'm able to launch TWRP using the ADB command "fastboot boot [twrpfile].img". But when TWRP starts, it asks me for my decryption password, I type it, brief lines of code says "unable to read system/apex" before showing the home page of TWRP. Someone knows what this means, and if that can be the cause ?
I've then tried to reflash Magisk 19.3, which lead to the same result. I couldn't figure out how load Magisk 20.4 to my internal storage in order to flash it trought recovery ... Do you know how to flash a file which is not on my phone ?
Search forum....
Msm tool oneplus nord wipes phone but fixes any issues
thibdur said:
Thank you @denndenn.
I'm able to launch TWRP using the ADB command "fastboot boot [twrpfile].img". But when TWRP starts, it asks me for my decryption password, I type it, brief lines of code says "unable to read system/apex" before showing the home page of TWRP. Someone knows what this means, and if that can be the cause ?
I've then tried to reflash Magisk 19.3, which lead to the same result. I couldn't figure out how load Magisk 20.4 to my internal storage in order to flash it trought recovery ... Do you know how to flash a file which is not on my phone ?
Click to expand...
Click to collapse
Plug your phone to your PC while in TWRP, then you can use adb to push files to your phone, for example with adb push magisk.zip /sdcard. Then, flash Magisk in TWRP.
How about flashing stock boot to see if your OPN boots to system again and then simply load Magisk zip to your internal storage and then flash via TWRP?
Thank you a lot for your suggestions !
Here is the solution in my case :
Because fastboot was working, I was able to flash stock oxygen rom, and get every working, but it needs to erase all your data.
You can find a guide on the XDA topic "[ROM][STOCK][FASTBOOT][OPN] Stock Fastboot ROMs for OnePlus Nord". The rom list have the lastest roms version (09/2020), and the process is super automated.
Have a good week-end XDA !

Bootloop after installing magisk module

Hello,
it is my first time modding my phone (Sony XZ2c) and unfortunately I have run into some issues. Let's start with what I have got working:
bootloader unlocked, Lineage OS 17.1 installed, root access by magisk. I was trying to install Viper4Android using this tutorial:
[MOD][V4a][TUTORIAL] ViPER4Android - How to install
Thread to be closed.
forum.xda-developers.com
Unfortunately, after rebooting I get stuck on Sony logo. I can get into fastboot and boot from twrp image but my data storage is encrypted. I tried uninstalling magisk by sideloading uninstaller and flashing boot with stock Lineage OS boot image without success. Is there anything else I can do?
I do not mind wiping everything but: I would like to recover my contacts and photos, plus I spent a lot of time configuring my system and apps so I would like to avoid doing it all again...
Thanks for help!
ML11 said:
Hello,
it is my first time modding my phone (Sony XZ2c) and unfortunately I have run into some issues. Let's start with what I have got working:
bootloader unlocked, Lineage OS 17.1 installed, root access by magisk. I was trying to install Viper4Android using this tutorial:
[MOD][V4a][TUTORIAL] ViPER4Android - How to install
Thread to be closed.
forum.xda-developers.com
Unfortunately, after rebooting I get stuck on Sony logo. I can get into fastboot and boot from twrp image but my data storage is encrypted. I tried uninstalling magisk by sideloading uninstaller and flashing boot with stock Lineage OS boot image without success. Is there anything else I can do?
I do not mind wiping everything but: I would like to recover my contacts and photos, plus I spent a lot of time configuring my system and apps so I would like to avoid doing it all again...
Thanks for help!
Click to expand...
Click to collapse
There is an adb command to delete all magisk modul;es, while keeping magisk. I dont have the link right now.
Personally, I would go into TWRP and delete the viper folder under /data/adb/modules and also check (ie delete) for scripts in /data/adb/post-fs-data.d and /data/adb/service.d
If the above doesn't work, you've got details on other methods here:
https://www.didgeridoohan.com/magisk/Magisk#hn_Disablinguninstalling_modules_manually
DiamondJohn said:
There is an adb command to delete all magisk modul;es, while keeping magisk. I dont have the link right now.
Personally, I would go into TWRP and delete the viper folder under /data/adb/modules and also check (ie delete) for scripts in /data/adb/post-fs-data.d and /data/adb/service.d
Click to expand...
Click to collapse
/data/adb is encrypted unfortunately...
adb wait-for-device shell magisk --remove-modules
This does not work. The phone reboots and get stuck on Sony logo. I guess it only works when the device gets stuck on OS, otherwise adb cannot access the device?
I am wondering why the device does not boot after flashing stock Lineage OS boot image? After staying on Sony logo for a while it gets into fastboot again (blue LED and fastboot detects the device).
ML11 said:
/data/adb is encrypted unfortunately...
adb wait-for-device shell magisk --remove-modules
This does not work. The phone reboots and get stuck on Sony logo. I guess it only works when the device gets stuck on OS, otherwise adb cannot access the device?
I am wondering why the device does not boot after flashing stock Lineage OS boot image? After staying on Sony logo for a while it gets into fastboot again (blue LED and fastboot detects the device).
Click to expand...
Click to collapse
Let nme start by saying, I have NO experience with encrypted phone recovery, but I do understand you wish to keep your data & config. To check your phone, I would try making a nandroid (of the current broken image), flashing a clean image to see if that boots, and its not something deeper in the ROM or the physical phone.
And again, no experience with recovering an encrypted device, have you tried flashing the boot AND system? ie a dirty flash? This would probably be the first attempt, after a nandroid of course.
DiamondJohn said:
have you tried flashing the boot AND system? ie a dirty flash?
Click to expand...
Click to collapse
Could you please explain exactly how to do that? I have: stock Lineage OS recovery image, Lineage OS flashable zip and images extracted from the payload file from the zip: boot, dtbo, system, vbmeta, vendor. What commands should I use?
Is fastboot flash boot boot.img and fastboot flash system system.img correct?
Should I flash both boot_a and boot_b?
Amazing! after flashing boot_a and boot_b and system my phone boots correctly to Lineage OS.
The only thing that I see is the wallpaper and "Phone is starting". Now how should I get back to the state before installing this module? I made a backup of system partition by adb and twrp.
EDIT: I have access to the settings so I managed to uninstall Viper4Android and reboot to safe mode. Still trying!
Unfortunately, due to encryption I am still not able to access photos but I see the files are still there. Should I now restore the system in twrp? Partitions that I can restore: system image, system, vendor image, boot, oem_image, oem. I have also a backup from adb using this command adb backup --twrp system boot. How should I proceed to get everything working again (Viper4Android is uninstalled, I flashed magisk boot again and used magisk --remove-modules so all the modules should be removed). Is is safe to restore now? Which partitions should I restore?
I flashed boot_a boot_b and system (fastboot used system_b).
Any ideas how I should proceed? I tried to restore system and system image in twrp but the phone does not seem to boot. If I just pull or copy the encrypted data, wipe and reinstall the system and then move the data back, will this work and I will be able to access the data when I boot to the system?
After a lot trials I gave up and decided to wipe everything and reflash the system... Fortunately, the most important stuff had been backed up before. Thanks @Didgeridoohan and @DiamondJohn for help!

Need help needed with fastboot(loop)

I've decided to upgrade to OOS11 stable and patch the boot before going into the rom. What I did was:
1. Flash latest TWRP (3.5.2_9-0)
2. Reboot to recovery
3. Flash ONLY OOS11 boot.img
4. Flash TWRP again
5. Install Magisk and Kirisakura-R 1.1.1 kernal (for f2fs support)
6. Reboot to recovery
Here I was going to do the same on other partition but TWRP failed to boot and screen kept flashing but I noticed that ADB was connected so I rebooted to fastboot and flash stock boot I've previously extracted from stock ROM. Now I face another problem, phone doesn't boot anywhere else but fastboot.
I've tried a few stuff to get it back.
# There were some cases where the phone won't boot with bootloader unlocked and stock boot so I managed to patch boot.img with Magisk using an emulator and then flash it.
# Tried booting into TWRP but phone phone would get stuck in "Fastboot mode" screen with fastboot still connected (And taking commands from PC).
# Tried flashing TWRP to boot partition which worked previously but this time the problem stayed and kept booting into fastboot.
A few more points that I should mention,
# I've backed up my entire phone using TWRP so I can unbrick it if I somehow manage to get into TWRP
# I don't have the backup on my computer. It's on the phone.
I absolutely can't lose those data. Yeah, mistake on my side for not backing up on my computer but to my defense, this never happened before so I let my guard down this time.
What options do I have left? Any hint would be appreciated. Thanks for reading

Categories

Resources