Module brick - Magisk

I get in a bootloop after a module is installed, pixel-fy soft bricked my phone and I had to reflash my phone. Im using a redmi note10S.
Any fix? Thanks!
Edit : Im testing some things out seeing what bootloops my phone.
Edit : Anything that repacks the boot image, flashes it, changes it, will get stuck on the Redmi screen, first MIUI logo, then redmi after I restart, then it will boot into recovery.
I have to flash, or factory reset, wipe data/calvichk and userdata reset
if it doesnt boot well..

Hope ur device had adb enabled.
Turn off ur phone and type
Code:
adb wait-for-device shell magisk --remove-modules
Now turn on ur phone.
Another method is to goto /data/adb/modules and remove desired folder using custom recovery

Worked! Thanks!

what I always do is to have the patched boot.img somewhere
if that happens I go into recovery mode, then the file explorer /data/adb/modules and delete the last one I installed
that should fix the bootloop in most cases
anyways, it's better to reflash the patched boot.img just in case just after deleting the problematic module

Related

Help rooting stock without loosing data

Hi,
I got a new Mi Mix 6GB/256GB and am very happy with it. I have stock MIUI Global 9.2.1.0 NAHMIEK. I've been rooting my phones for a long time, but can't seem to succeed with this one.
I unlocked successfully. I tried multiple TWRP advised for this phone but get stuck with the password to decrypt my data partition. I tried to remove the pattern, use the digits associated to the pattern, set a password instead of a pattern, remove fingerprints, remove all security, but still could not decrypt. I tried both flashing and just booting to TWRP from fastboot.
Worst, I bricked a couple of times with the recovery flashing, or even simply booting remotely with twrp, being stuck in the "unlocked" logo on boot. Had to use mi flash to reflash stock ROM.
What I see is advice to wipe data and format unencrypted, but I prefer to keep my data partition impact to avoid reinstalling everything.
Any other idea on how to root? Basically, I need to install gcam which is my primary need.
Thanks!
If I'm not mistaken you need the modified rains twrp, somebody correct me if I'm wrong.
IV been unlocked and rooted for along time and don't really remember what process I used. But I do remember having to use rains twrp.
You can enable camera2.api via TWRP without rooting.
Read the whole thread.
https://xiaomi.eu/community/threads/google-camera-for-mi-max-2.42976/
As far as I know no-one has solved the problem of making a TWRP that can encrypt/decrypt.
If you don't really need the encryption it is better to format.
Thanks for your answers. I had tried TWRP by Mr Raines, but it seems an old version that must have worked on MIUI 8, but not on MIUI 9. TWRP 3.2.1 by Raupe is supposedly the only one working, but not in my case and still not able to bypass encryption...
I tried booting TWRP to push the build.prop with adb with APICamera2 enabled, I had high hopes, but every time I touch it, the phone gets soft bricked and I need to flash back stock...
Just got a solid breakthrough! I simply sideloaded magisk.zip. Then, from Android, used a buil.prop editor to enable cameraAPI2. It seems to work great so far. More precisely:
Install fastboot and adb on PC
Get TWRP 3.2.1 by raupe, and copy it in same folder as adb and rename to twrp.img
fastboot.exe boot twrp.img
From TWRP, cancel decryption, mount system, then go to advanced > ADB sideload
From PC, open cmd as admin, then: adb sideload Magisk.zip (where you would also have put the latest magisk zip in adb folder)
I then used a build.prop editor to add the line: persist.camera.HAL3.enabled=1
I can't believe it!
pzkfwg said:
Thanks for your answers. I had tried TWRP by Mr Raines, but it seems an old version that must have worked on MIUI 8, but not on MIUI 9. TWRP 3.2.1 by Raupe is supposedly the only one working, but not in my case and still not able to bypass encryption...
I tried booting TWRP to push the build.prop with adb with APICamera2 enabled, I had high hopes, but every time I touch it, the phone gets soft bricked and I need to flash back stock...
Click to expand...
Click to collapse
Yeah I meant to say Raupe instead of Mr Rains sorry for tell you that you should try rains. Like I said it's been awhile kinda forgot.. Again my apologies.
---------- Post added at 09:06 PM ---------- Previous post was at 09:05 PM ----------
Let me see if I can find the twrp I used I'm on miui 9.
pzkfwg said:
Just got a solid breakthrough! I simply sideloaded magisk.zip. Then, from Android, used a buil.prop editor to enable cameraAPI2. It seems to work great so far. More precisely:
Install fastboot and adb on PC
Get TWRP 3.2.1 by raupe, and copy it in same folder as adb and rename to twrp.img
fastboot.exe boot twrp.img
From TWRP, cancel decryption, mount system, then go to advanced > ADB sideload
From PC, open cmd as admin, then: adb sideload Magisk.zip (where you would also have put the latest magisk zip in adb folder)
I then used a build.prop editor to add the line: persist.camera.HAL3.enabled=1
I can't believe it!
Click to expand...
Click to collapse
Good for you!
Yes, I used raupes latest TWRP also, forgot to write that before.
Raupe has posted a lot in the otherwise abandoned "official" TWRP thread, you can read about his attempts on encryption:
https://forum.xda-developers.com/mi...y-official-twrp-xiaomi-mi-mix-t3498960/page57

Help. Deleting magisk modules no root.

I was on magisk rooted pixel 3 Android 10, no twrp. After flashing a magisk module, it boot, but couldn't get into desktop, kind of bootloop. So i fastboot stock boot img and boots, but lost root previleage.
I want to remove the said magisk module, with no root and no twrp.
Any suggestions???
Thanks.
evanxyj said:
I was on magisk rooted pixel 3 Android 10, no twrp. After flashing a magisk module, it boot, but couldn't get into desktop, kind of bootloop. So i fastboot stock boot img and boots, but lost root previleage.
I want to remove the said magisk module, with no root and no twrp.
Any suggestions???
Thanks.
Click to expand...
Click to collapse
While the phone is in the bootloop connect the phone to your PC and open cmd, cd to the folder where you have adb drivers and type:
adb wait-for-device shell magisk --remove-modules
This will remove all the modules and you should exit the bootloop
visa91 said:
While the phone is in the bootloop connect the phone to your PC and open cmd, cd to the folder where you have adb drivers and type:
adb wait-for-device shell magisk --remove-modules
This will remove all the modules and you should exit the bootloop
Click to expand...
Click to collapse
Thanks. Actually my phone booted into system, it said "phone is starting"and kept that forever, but it never went into desktop. Wonder whether or not your script will work...
evanxyj said:
Thanks. Actually my phone booted into system, it said "phone is starting"and kept that forever, but it never went into desktop. Wonder whether or not your script will work...
Click to expand...
Click to collapse
It is not necessary to enter the desktop. I have a Huawei and my phone was in a bootloop showing Huawei logo. I put this script in the cmd while the phone was in huawei logo and I was able to exit the bootloop by losing all magisk modules.
visa91 said:
It is not necessary to enter the desktop. I have a Huawei and my phone was in a bootloop showing Huawei logo. I put this script in the cmd while the phone was in huawei logo and I was able to exit the bootloop by losing all magisk modules.
Click to expand...
Click to collapse
I'll try next time I ****ed up my system again. Thsnks.
visa91 said:
It is not necessary to enter the desktop. I have a Huawei and my phone was in a bootloop showing Huawei logo. I put this script in the cmd while the phone was in huawei logo and I was able to exit the bootloop by losing all magisk modules.
Click to expand...
Click to collapse
Delete. Misguide
evanxyj said:
U can try this one
https://forum.xda-developers.com/pixel-3/themes/magisk-modules-disabler-booting-magisk-t3967433
Click to expand...
Click to collapse
No. Boot images are device specific, and that's a Pixel 3 boot image that won't work on @visa91's Huawei.
Didgeridoohan said:
No. Boot images are device specific, and that's a Pixel 3 boot image that won't work on @visa91's Huawei.
Click to expand...
Click to collapse
My mistake.

Uninstall magisk (+modules) without TWRP (and without root)?

I have a OnePlus 7T, which I rooted by booting to magisk_patched_boot.img (since there is no TWRP for OnePlus 7T yet).
I installed some module which caused bootloop. I recovered from bootloop by dirty flashing stock rom (just the boot.img).
Bootloop resolved. Root gone.
Now if I boot into magisk_patched_boot.img, it gets stuck on bootloop again. So I am assuming the magisk module files are still present.
How do I get rid of those modules?
Try here:
https://didgeridoohan.com/magisk/Ma...agisk_functionality_bootloop_loss_of_root_etc
Didgeridoohan said:
Try here:
https://didgeridoohan.com/magisk/Ma...agisk_functionality_bootloop_loss_of_root_etc
Click to expand...
Click to collapse
Worked like a charm, thank you so much!!
If anyone else is suffering through the same issue, while in bootloop, enter the following command in command prompt (in adb directory)
Code:
adb wait-for-device shell magisk --remove-modules
mihir24 said:
Worked like a charm, thank you so much!!
If anyone else is suffering through the same issue, while in bootloop, enter the following command in command prompt (in adb directory)
Code:
adb wait-for-device shell magisk --remove-modules
Click to expand...
Click to collapse
I have the same problem. I dirty flashed the stock rom and now i reflashed the patched rom in order to enter the command.
nothing happens for me. i just copy and pasted that command. is that wrong?
thanks
so yea i need to uninstall modules so i can root and not format wipe the phone. i have tried the whole adb wait-for-device shell magisk --remove-modules when its sitting on the g with the line under it. it reboots but then just goes back to the g with a line under it. i have read up on other ways to do it one involving twrp but unfortunately twrp isn't out for 3xl. any help would be appreciated thanks in advance.
DrUnkeN_TiGeR said:
so yea i need to uninstall modules so i can root and not format wipe the phone. i have tried the whole adb wait-for-device shell magisk --remove-modules when its sitting on the g with the line under it. it reboots but then just goes back to the g with a line under it. i have read up on other ways to do it one involving twrp but unfortunately twrp isn't out for 3xl. any help would be appreciated thanks in advance.
Click to expand...
Click to collapse
were u able to find any solution? I'm in the same boat as u
mihir24 said:
Worked like a charm, thank you so much!!
If anyone else is suffering through the same issue, while in bootloop, enter the following command in command prompt (in adb directory)
Code:
adb wait-for-device shell magisk --remove-modules
Click to expand...
Click to collapse
thank you :good::good::good::good:
Hi, I would like to run adb on my Galaxy S10+ but if I plug any usb cable on my phone, it starts. How to disable this behavior please?
I tried the same for my Pixel 3a. I can't get adb to recognize it. Fastboot does and if I boot to stock bootloader it at least boots and recognizes it but of course it doesn't snow magisk installed..
mihir24 said:
Worked like a charm, thank you so much!!
If anyone else is suffering through the same issue, while in bootloop, enter the following command in command prompt (in adb directory)
Code:
adb wait-for-device shell magisk --remove-modules
Click to expand...
Click to collapse
Holy crap, thanks for the clarification!! I found the original instructions but could not get it to work, this got it working!
You have to be in the bootloop and then enter the command above!
This worked on my Huawei P20 Pro.
Doesn't work for me, adb Devices doesn't show anything. I can boot to rescue mode or into adb sideload and it finds it. Really want to get this working
GrandMstrBud said:
Doesn't work for me, adb Devices doesn't show anything. I can boot to rescue mode or into adb sideload and it finds it. Really want to get this working
Click to expand...
Click to collapse
You can try this. It is for the Pixel 3a only.
fastboot boot image-new.img
image-new.img
https://www.androidfilehost.com/?fid=8889791610682920432
You should boot up with root but modules disabled. Remove your modules with root explorer located here (data/adb/modules) then remove the .disable_magisk file that is in the cache/ folder. It is a hidden file (starts with a dot) so your root file explorer will need to be set to show hidden files.
This all should be done while in bootloop after flashing your magisk_patched.img
Just boot to fastboot and boot the image.
https://forum.xda-developers.com/pixel-3a/how-to/magisk-modules-disabler-booting-magisk-t3976621
Tulsadiver said:
You can try this. It is for the Pixel 3a only.
fastboot boot image-new.img
image-new.img
https://www.androidfilehost.com/?fid=8889791610682920432
You should boot up with root but modules disabled. Remove your modules with root explorer located here (data/adb/modules) then remove the .disable_magisk file that is in the cache/ folder. It is a hidden file (starts with a dot) so your root file explorer will need to be set to show hidden files.
This all should be done while in bootloop after flashing your magisk_patched.img
Just boot to fastboot and boot the image.
https://forum.xda-developers.com/pixel-3a/how-to/magisk-modules-disabler-booting-magisk-t3976621
Click to expand...
Click to collapse
Hey there, I'm using a Pixel 4a and I've run into the exact same issue unfortunately. While in the boot loop I ran the adb command but it just keeps on waiting to detect my device. There seems to be no modified magisk_patched.img defaulting to Magisk core-only mode on XDA for the Pixel 4a (only for older devices), and I've also tried your other tutorial using the AIK to build a custom one for myself, which did not work unfortunately. What should I do to restore root while preventing the problematic module from loading? Thank you!!!:crying:
mihir24 said:
Worked like a charm, thank you so much!!
If anyone else is suffering through the same issue, while in bootloop, enter the following command in command prompt (in adb directory)
Code:
adb wait-for-device shell magisk --remove-modules
Click to expand...
Click to collapse
just replying to say this helped me!!
With magisk, after flashing the patched boot.img (generated from magisk) via fastboot and receiving a bootloop, i ran this code, which then restarted my phone and got me to my homescreen
using oneplus7 and android 11, thanks, now i have root with magisk (rip twrp?)
tThank you so much this saved my device from getting flashing the ROM again
For future readers, you should boot into safe mode (Google to find the key press combination for safe mode) and then reboot again. This will disable all magisk modules so you can go into the manager and remove the module/s causing the bootloop
CerealKiiller said:
For future readers, you should boot into safe mode (Google to find the key press combination for safe mode) and then reboot again. This will disable all magisk modules so you can go into the manager and remove the module/s causing the bootloop
Click to expand...
Click to collapse
Thank You So So Much. I already thought i'd have completely re set up every module and setting.

[GUID] Solution MIUI 11 or other Bootloop with lastest Magisk (with Google Pay)

Hello Guys
Got issues with my 2 mi phones after the Stable Global MIUI 11
I assume that you can try to use this theory to resolve your boot loop with Magisk as well.
Requirement:
Unlocked the bootloader
Step 1. You need TWRP recovery.
And the phone can go to fastboot mode and use CMD
Code:
fastboot flash recovery twrp(whatever your twrp name).img
Some stock boot recovery the recovery img when you try to boot the phone
So in CMD
Code:
fastboot boot twrp(whatever your twrp name).img
Step 2 Install Magisk by putting it thro TWRP
Install Zip, after installation don't restart your phone yet (it will boot loop)
Use the File Manager in TWRP
Go to /data/adb/magisk/chromeos find "futility" file and chmod 644
Go to /data/adb/magisk find "BusyBox" file and chmod 664
Click to expand...
Click to collapse
Then you can restart the phone to system
Step 3 Edit google service database
Download SQL editor. Navigate to /data/data/com.google.android.gms/databases and open dg.db
Change any value contains "attest" the column C to from "10(most the case)" to "0"
Click to expand...
Click to collapse
If you see too many of them, you can clear cache and data for Play store, google service and google pay.
Step 4 Change permission to DB
Many ways of doing it, I still use the file manager in TWRP
Go to /data/data/com.google.android.gms/databases find "dg.db" file and chmod 440
Click to expand...
Click to collapse
Restart
Step 5 in Magisk Hide google Service and Google Pay
Then enjoy open your Google pay and add your card.
Hope this can help you.
Best
Zhu
Why to complicate that much, there is much easier way
Sent from my Redmi Note 8 Pro using Tapatalk
I would just like to point out that this isn't a solution per se, more of a dirty workaround. By using chmod 644 on those files you're crippling Magisk and a whole bunch of stuff will break...
This sounds like a better workaround, since it won't break Magisk functionality (untested by me, since I don't have any MIUI devices, so I can't confirm if it actually works):
https://forum.xda-developers.com/showpost.php?p=80995509&postcount=4
goulaobangzi said:
Hello Guys
Got issues with my 2 mi phones after the Stable Global MIUI 11
I assume that you can try to use this theory to resolve your boot loop with Magisk as well.
Requirement:
Unlocked the bootloader
Step 1. You need TWRP recovery.
And the phone can go to fastboot mode and use CMD
Code:
fastboot flash recovery twrp(whatever your twrp name).img
Some stock boot recovery the recovery img when you try to boot the phone
So in CMD
Code:
fastboot boot twrp(whatever your twrp name).img
Click to expand...
Click to collapse
After this, when you boot to TWRP, you can do factory reset, but you loose data...

Bricked Realme X2 Pro (Still have TWRP and Fastboot)

I was trying to flash the Ozip to restore the stock rom using TWRP and after that boom
damaged boot/recovery that msg
i still can go inside twrp and the fastboot mode
what i did notice is that the file folder name changed to system_root and it was just system bevor
is there any fix for it i am using the CN Version
(how-to unbrick your realme device) fastboot needed fix inside.
I Went totally nuts last night when i bricked my phone so i did figure out my self how to unblock the phone.
First you need to BE ABLE TO ENTER FASTBOOT it won't work without it and you need working TWRP.
First you need to go to TWRP and go to mount and unmount everything and disable MTP.
Then go to Advanced and select Terminal
type in LS make sure there is 2 Folders one called system and one called system_root
make sure that the system folder is empty if empty type in rm -r system
and rename the system_root folder to system using mv system_root system
after that boot into Fastboot mode and Flash your Rom for your Device using the Fastboot Tool
Hope that works for you guys.
System wiped/corrupted. Flash the chinese fastboot rom to fix it via fastboot
The real mistake is when your device brick with locked bootloader, all the other cases are solvable.
HTCDevil said:
The real mistake is when your device brick with locked bootloader, all the other cases are solvable.
Click to expand...
Click to collapse
Yep once you lock you doomed
Funny is my bootloader still unlock and my fingerprint works fine on the stock rom
Sent from my RMX1931 using Tapatalk
natedogg20050 said:
Yep once you lock you doomed
Funny is my bootloader still unlock and my fingerprint works fine on the stock rom
Click to expand...
Click to collapse
That's interesting, i thought it works only if you relock bootloader and then update fw
HTCDevil said:
That's interesting, i thought it works only if you relock bootloader and then update fw
Click to expand...
Click to collapse
Worked perfectly fine even on the old 0.8 firmware
Sent from my RMX1931 using Tapatalk
Can you make a small video please showing this steps? After that terminal thing I didn't understand anything
talalahmed said:
Can you make a small video please showing this steps? After that terminal thing I didn't understand anything
Click to expand...
Click to collapse
I will is your device broken
Sent from my RMX1931 using Tapatalk
What to do when 2 Folders one called system and one called system_root are missing? cant access data in MTP when in TWRP from PC to send the rom file.
natedogg20050 said:
I Went totally nuts last night when i bricked my phone so i did figure out my self how to unblock the phone.
First you need to BE ABLE TO ENTER FASTBOOT it won't work without it and you need working TWRP.
First you need to go to TWRP and go to mount and unmount everything and disable MTP.
Then go to Advanced and select Terminal
type in LS make sure there is 2 Folders one called system and one called system_root
make sure that the system folder is empty if empty type in rm -r system
and rename the system_root folder to system using mv system_root system
after that boot into Fastboot mode and Flash your Rom for your Device using the Fastboot Tool
Hope that works for you guys.
Click to expand...
Click to collapse
hack-os said:
What to do when 2 Folders one called system and one called system_root are missing? cant access data in MTP when in TWRP from PC to send the rom file.
Click to expand...
Click to collapse
Can you enter twrp?
Sent from my RMX1931 using Tapatalk
natedogg20050 said:
I will is your device broken
Click to expand...
Click to collapse
Thanks,I fixed it but not with your steps,it turns out using the Chinese twrp fixed everything for me
Solved.! (For me) CN
I unlocked the bootloader according to the guide [Guide] Guides for x2 Pro[Locking/unlocking bootloader, tweaks and more]. And flashed TWRP successfully. MY MAIN MISTAKE -> DIDN'T MAKE A BACKUP AT THIS POINT.
Then I flash canary debug magisk and open gapps micro (culprit for brick). Then tried to reboot but stuck in yellow Realme screen. Then went back to recovery tried "Facrory reset", "Format data", flash latest CN ozip, even fastboot flash and guide by natedogg20050 with no luck. But Lineage OS unofficial by karthick mostwanted worked with magisk 20.3. :good:
For one final time I tried to get back the stock(since Lineage is still in alpha ATM), after seeing this post by exadeci. Did a "format data" following fastboot flash with chinese images, SUCCESS...!!! :victory: And even updated with ozips from CN site worked.. Finger print works too.
Still in update process to latest .15 . Plan to install magisk.(hopefully canary debug).
Will update this after latest upgrade + magisk install.
don't worry we can
first reboot to recovery
then go to wipe
and wipe sytem,catche,davik catche and data
then download the stock os for realme software
download link(please select your mobile) in realme software website
and flash the recovery
wipe catche and data
and you are back to stock os
enjoy
natedogg20050 said:
I Went totally nuts last night when i bricked my phone so i did figure out my self how to unblock the phone.
First you need to BE ABLE TO ENTER FASTBOOT it won't work without it and you need working TWRP.
First you need to go to TWRP and go to mount and unmount everything and disable MTP.
Then go to Advanced and select Terminal
type in LS make sure there is 2 Folders one called system and one called system_root
make sure that the system folder is empty if empty type in rm -r system
and rename the system_root folder to system using mv system_root system
after that boot into Fastboot mode and Flash your Rom for your Device using the Fastboot Tool
Hope that works for you guys.
Click to expand...
Click to collapse
after do that my phone boot only in TWRP but i can't see anything.
if I connect the phone to the computer it is empty and if I want to transfer something on it gives me an error.
can you help me ?
SOLVED: i formatted by TWRP.
When I type LS in terminal it gives a long list. There is a "system" and a "system_root".
When I try to open "system" with cd system command, it says, no such file or directory. When I enter "cd system_root" it goes into this Folder. But using "ls" command within this Folder it just shows nothing. Am I doing something wrong?
Any idea?
P.S. Yes I can enter fastboot, and TWRP is working.
natedogg20050 said:
I Went totally nuts last night when i bricked my phone so i did figure out my self how to unblock the phone.
First you need to BE ABLE TO ENTER FASTBOOT it won't work without it and you need working TWRP.
First you need to go to TWRP and go to mount and unmount everything and disable MTP.
Then go to Advanced and select Terminal
type in LS make sure there is 2 Folders one called system and one called system_root
make sure that the system folder is empty if empty type in rm -r system
and rename the system_root folder to system using mv system_root system
after that boot into Fastboot mode and Flash your Rom for your Device using the Fastboot Tool
Hope that works for you guys.
Click to expand...
Click to collapse
Sir Backe said:
When I type LS in terminal it gives a long list. There is a "system" and a "system_root".
When I try to open "system" with cd system command, it says, no such file or directory. When I enter "cd system_root" it goes into this Folder. But using "ls" command within this Folder it just shows nothing. Am I doing something wrong?
Any idea?
P.S. Yes I can enter fastboot, and TWRP is working.
Click to expand...
Click to collapse
did you figure it out ?
natedogg20050 said:
did you figure it out ?
Click to expand...
Click to collapse
Thanks for asking! Yes, I did, but in a different way. It was a long way, running from stuck in yellow realme boot logo to bootloops already on the white realme start logo. Finally I got back a running system, which I don't trust anymore now. My configuration is:
- unlocked bootloader
- TWRP 3.3.1.13
- Magisk canary debug 8ca5a048 (20405)
- Magis Manager 72f6770d (278)
- Andorid 10, C24
I was already at this point 2 days ago. Then Magisk Manager announced an update. Stupid as I am, I just klicked install, and arrived at the same point. Stuck in yellow boot logo, and the whole operation started from beginning. Now I am at the same point again as above, and Magisk Manager announces again an update for itself. But I don't trust it anymore, and I don't know what to do. Just leave it? Or making a nandroid backup first? But will it be sufficiant to backup boot partition, system image and data when the crash comes again? I don't know what to do.
HTCDevil said:
The real mistake is when your device brick with locked bootloader, all the other cases are solvable.
Click to expand...
Click to collapse
My Phone cannot boot and cannot go to recovery mode. What should I do? Please help:crying:
allan1998PH said:
My Phone cannot boot and cannot go to recovery mode. What should I do? Please help:crying:
Click to expand...
Click to collapse
If you have unlocked bootloader you could go in fastboot mode and flash twrp, then format data

Categories

Resources