Magisk module corrupted system, can you disable the module without Root? - Sony Xperia 1 II Questions & Answers

Hi peeps,
In the name of science, and stubbornness, I've been trying to swap the back and recent buttons on the navbar. I was using IconBoy's Magisk Module as a guide. Long story short, I dun goofed, and now SystemUI doesn't work. I start the phone up, and I get a black screen. The battery and clock at the top come in and out, and the power window when you hold the power button is an old school one and also jumps around.
If I flash the stock boot image to remove root, the phone works. I did that and deleted zip, but I don't know how to disable the module. Without root, Magisk manager is locked down, with root it just goes back to the black screen. Any advice?

Without root, Magisk manager is locked down, with root it just goes back to the black screen. Any advice?
Click to expand...
Click to collapse
I sometimes wish we could delete our threads, but since it's here, so hopefully it can help someone else. You need to boot Magisk into core mode. To do that:
1) Flash your Magisk patched boot image.
2) Use osm0sis' Android Image Kitchen tool to unpack your Magisk boot image.
3) Place Tulsadive's overlay.d directory (from here) into the extracted ramdisk directory (there isn't one there, so you aren't overwriting anything).
4) Repack your files into a boot image using Image Kitchen.
5) Flash your new boot image.
6) Restart your phone, disable the bad module, go into settings, and disable core mode.
7) Reboot into bootloader, flash your normal Magisk patched image, and restart.
8) Celebrate that you don't have to wipe your phone

Related

Magisk v17 Failed to Install

I attempted to go from Magisk v16 to Magisk v17 from the app, Install > Patch Boot Image File > Magisk-v17(1700).zip and I get the below .
I opened up Root Checker and it let me know that the device no longer has Root.
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
! Installation Failed
Magisk Log File
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
boot_patch.sh[73]: can't create /proc/self/fd/: Is a directory
MagiskBoot v17.0(17000) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
No boot image magic found!
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
! Installation failed
Device Stats
Nexus 6P
Lineage 15.1
TWRP - latest
Any help would be greatly appreciated.
monteie2016 said:
I attempted to go from Magisk v16 to Magisk v17 from the app, Install > Patch Boot Image File > Magisk-v17(1700).zip and I get the below .
I opened up Root Checker and it let me know that the device no longer has Root.
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
! Installation Failed
Magisk Log File
- Copying image to cache
- Device platform: arm64-v8a
- Existing zip found
- Extracting files
boot_patch.sh[73]: can't create /proc/self/fd/: Is a directory
MagiskBoot v17.0(17000) (by topjohnwu) - Boot Image Modification Tool
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
No boot image magic found!
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
boot_patch.sh[91]: can't create /proc/self/fd/: Is a directory
! Installation failed
Device Stats
Nexus 6P
Lineage 15.1
TWRP - latest
Any help would be greatly appreciated.
Click to expand...
Click to collapse
Happened with me also...i gues the only solution is you have to uninstall mafisk via magisk uninstaller and flash it once again via whatever recovery you are using...i am also using lineage os 15.1 but with RN4....
Happened to me as well. HTC u11, ViperU 1.8.0, Android 7.1.1, TWRP 3.2.2. Tried flashing it though TWRP got a bootloop. Had to revert back to my previous nan which luckily I made yesterday.
I attempted the same, now my galaxy s6 is in a boot loop
Look other posts in this section - you should flash latest uninstaller before Magisk v17 package. It seems that some residues from v16 prevent v17 from installing correctly.
^^^^^^^^^^
how to uninstall magisk completely without custom recoery
Hello Guys
I can not install Magisk v17.1
I delete it complete with the uninstaller
And then flashed again in TWRP, but dont work
Magisk icon is not visible and I can not manually install the Magisk Manager
Pls Help
edkmho said:
how to uninstall magisk completely without custom recoery
Click to expand...
Click to collapse
I had to reflash stock (OTA sideload version, in stock recovery) via adb sideload. Essential phone. Wifi is working now, didn't lose any data.
I'm also having the issue on my OnePlus 5T. I was running v16.0, and when I tried to flash the v17.1 zip in TWRP like usual, but it said zip signature verification failed. I flashed the Magisk uninstaller zip and tried again, but still had the same problem. I've lost root, but all my data is still intact and it never had boot issues.
After using uninstaller in recovery, restart into recovery to flash v17
aydinbahadir88 said:
And then flashed again in TWRP, but dont work
Magisk icon is not visible and I can not manually install the Magisk Manager
Click to expand...
Click to collapse
Do you update from 16.0? If Yes test following:
Download the seperate MagiskManager-v5.9.1.apk
Make sure that you adb is working, connect your phone to computer
Code:
adb devices
must show your phone, if not adb is not proper set
Code:
adb install MagiskManager-v5.9.1.apk
if you get a error message like
the sign with the installed apk has not matsched..aborted
Click to expand...
Click to collapse
the uninstaller not proper delete the old magisk manager
try
Code:
adb uninstall com.topjohnwu.magisk
the result must be an sucess
then again
Code:
adb install MagiskManager-v5.9.1.apk
result must also sucess
Reboot, voiala its done....
You see the Magisk Manager
Does anyone have a working solution?
1.download magisk 17.zip from inside magisk 16
2. uninstall magisk 16 (i do from inside, not twrp)
3. instal magisk 17.zip from twrp
4. open magisk 17 and get notification for downloaded magisk 17.apk
5. download and instal it,
tested by my phone
mi5 Lineage Os 15.1
How I recovered from this on a Pixel 2 XL
I'll chime in with my experience here, as it might save someone else a lot of time if they are at my skill level with this stuff (which is only moderate, I suppose, although I do always get things to work eventually!).
As of yesterday, I had a Pixel 2 XL, rooted with Magisk, and working great. This morning, during the middle of the night, Magisk innocently asks if I want to upgrade to a new version. I was very tired (in fact, I think I was sleeping when my phone buzzed to alert me of the upgrade message) and don't even know how I responded except that it was "yes" to the upgrade part. By the time I'd fully awakened, I had a phone that waw in a boot loop. I went back to sleep, figuring I'd have better luck looking at it after a little rest.
Getting out of the boot loop was easy: I just reinstalled the August 2018 factory image for the phone. However, getting Magisk reinstalled was an adventure. I saw posts that said I should run the Magisk uninstaller, but when I did it just said that Magisk was already uninstalled. And yet, whenever I tried to apply either v16.0 or v17.1, I got errors (error codes 1, 2, and 255 at different times).
Up until this event, I'd always upgraded Magisk by installing it via TWRP. However, that was not working, so I thought I needed to try patching the boot image, something I'd never done before. Because I'd never done it before, it took me a while to understand the steps, which are actually quite simple. This is where I'm hoping I might save someone some time. Basically, my fear was not knowing which file the "boot image" was. Seasoned Android veterans might get a chuckle out of this, and that's fine, but I was looking at the file in the factory image download and basically saw only two image files: bootloader-taimen-tmz20j.img and radio-taimen-g8998-00253-1805232234.img. I was trying to figure out if either of those could be the boot image, and they both seemed pretty big to be a boot image! Finally it dawned on me that the much larger file in the directory was a zip archive (named image-taimen-ppr1.180610.009.zip). I looked inside there, and sure enough, there was a rather small file named boot.img. I was pretty sure that was the "boot image" file!
Here's what I did after that, again just hoping to help anyone who finds themselves in the same predicament I was in: Magisk is broken, root isn't working, and I can't install any of the Magisk *.zip images via TWRP.
- First, I downloaded a copy of Magisk Manager: this version is named MagiskManager-v5.9.1.apk.
- Next, I ran a couple adb commands to send the Magisk Manager apk and the stock boot.img to my phone:
Code:
adb push MagiskManager-v5.9.1.apk /sdcard/Download
adb push boot.img /sdcard/Download
- Next, I installed /sdcard/Download/Magisk-Manager-v5.9.1.apk by nagivating to it (I use ES File Manager) and launching it from there.
- Next I opened Magisk Manager
- Magisk Manager detects that there is a newer version available and asks if I want to upgrade
- I said yes
- I told it that I wanted to patch a boot image
- I chose /sdcard/Download/boot.img as the "unpatched" (stock) boot image
- Magisk Manager churned away for maybe half a minute and then produced a new file called patched_boot.img, saved in the same directory as boot.img.
After that, all I had to do was run these commands:
Code:
adb reboot bootloader
fastboot flash boot patched_boot.img
fastboot reboot
As soon as the phone restarted, I opened Magisk Manager again and it verified that its upgrade was successful, and root began working for me again also.
Like I said, I hope this helps someone else. If not, it's probably good for me to just write it all out anyway.
Cheers,
Sky Captain
_sky.captain_ said:
I'll chime in with my experience here, as it might save someone else a lot of time if they are at my skill level with this stuff (which is only moderate, I suppose, although I do always get things to work eventually!).
As of yesterday, I had a Pixel 2 XL, rooted with Magisk, and working great. This morning, during the middle of the night, Magisk innocently asks if I want to upgrade to a new version. I was very tired (in fact, I think I was sleeping when my phone buzzed to alert me of the upgrade message) and don't even know how I responded except that it was "yes" to the upgrade part. By the time I'd fully awakened, I had a phone that waw in a boot loop. I went back to sleep, figuring I'd have better luck looking at it after a little rest.
Getting out of the boot loop was easy: I just reinstalled the August 2018 factory image for the phone. However, getting Magisk reinstalled was an adventure. I saw posts that said I should run the Magisk uninstaller, but when I did it just said that Magisk was already uninstalled. And yet, whenever I tried to apply either v16.0 or v17.1, I got errors (error codes 1, 2, and 255 at different times).
Up until this event, I'd always upgraded Magisk by installing it via TWRP. However, that was not working, so I thought I needed to try patching the boot image, something I'd never done before. Because I'd never done it before, it took me a while to understand the steps, which are actually quite simple. This is where I'm hoping I might save someone some time. Basically, my fear was not knowing which file the "boot image" was. Seasoned Android veterans might get a chuckle out of this, and that's fine, but I was looking at the file in the factory image download and basically saw only two image files: bootloader-taimen-tmz20j.img and radio-taimen-g8998-00253-1805232234.img. I was trying to figure out if either of those could be the boot imag, and they both seemed pretty big to be a boot image! Finally it dawned on me that the much larger file in the directory was a zip archive (named image-taimen-ppr1.180610.009.zip). I looked inside there, and sure enough, there was a rather small file named boot.img. I was pretty sure that was the "boot image" file!
Here's what I did after that, again just hoping to help anyone who finds themselves in the same predicament I was in: Magisk is broken, root isn't working, and I can't install any of the Magisk *.zip images via TWRP.
- First, I downloaded a copy of Magisk Manager: this version is named MagiskManager-v5.9.1.apk.
- Next, I ran a couple adb commands to send the Magisk Manager apk and the stock boot.img to my phone:
Code:
adb push MagiskManager-v5.9.1.apk /sdcard/Download
adb push boot.img /sdcard/Download
- Next, I installed /sdcard/Download/Magisk-Manager-v5.9.1.apk by nagivating to it (I use ES File Manager) and launching it from there.
- Next I opened Magisk Manager
- Magisk Manager detects that there is a newer version available and asks if I want to upgrade
- I said yes
- I told it that I wanted to patch a boot image
- I chose /sdcard/Download/ as the "unpatched" (stock) boot image
- Magisk Manager churned away for maybe half a minute and then produced a new file called patched_boot.img, saved in the same directory as boot.img.
After that, all I had to do was run these commands:
Code:
adb reboot bootloader
fastboot flash boot patched_boot.img
fastboot reboot
As soon as the phone restarted, I opened Magisk Manager again and it verified that its upgrade was successful, and root began working for me again also.
Like I said, I hope this helps someone else. If not, it's probably good for me to just write it all out anyway.
Cheers,
Sky Captain
Click to expand...
Click to collapse
I too have a Pixel 2XL but had a much easier upgrade experience. I downloaded the latest version of Magisk files (3 files: MagiskManager-v5.9.1.apk, Magisk-uninstaller-20180901, and Magisk-v17.1 from here https://www.xda-developers.com/magisk-v17-1-android-pie-a-b-support/) and put them on my phone.
Rebooted into recovery TWRP run the Magisk-uninstaller-2018090 file, then ran Magisk-v17.1 rebooted and all worked (thanks to ALL the developers out there!!!)
I'm running rooted Pie (standard google Pie) with Rootchecker, 4.4.153-FlashKernal-Wahoo-v3.06, Greenify, AdAway, and of course Magisk 17.1.
Hope this helps.
akohle said:
After using uninstaller in recovery, restart into recovery to flash v17
Click to expand...
Click to collapse
flashed uninstaller in recovery
flashed v17
rebooted
it worked
If patch boot image is getting failed in magisk latest version v17.1 then enable storage permission for magisk app manually in Device/OS setting. Now patch boot image again, It will get patched successfully.
I
pierro78 said:
flashed uninstaller in recovery
flashed v17
rebooted
it worked
Click to expand...
Click to collapse
OK...im a relative newbie here...first post actually....but Im a bit stuck in a fastboot boot loop
LG G5 tmobile running fulmics
I decided to try this exact process to get my root back by updating Magisk
booted into TWRP through ADB
flashed uninstaller using TWRP
(cleared cache/dalvik)
flashed v 17.1 (not 17) using TWRP
(cleared cache/dalvik)
rebooted
now i'm stuck in fastboot bootloop….can reboot from fastboot but nothing else
any advice would be appreciated!
update: I am able to get to TWRP using reboot command and holding power and volume down. flashed uninstaller wiped cache/dalvik...rebooted into TWRP long way and then installed 17....still fastboot at startup again
Art1mis said:
If patch boot image is getting failed in magisk latest version v17.1 then enable storage permission for magisk app manually in Device/OS setting. Now patch boot image again, It will get patched successfully.
Click to expand...
Click to collapse
many thanks for the tip!!
spent like an hour trying to figure out why my pixel 2 was failing to patch the boot image.
Allowed storage permissions, flashed the patched boot and now im rooted

Bootloop

Hi, my device reboot after I unlock it, I only have access to my Internal memory of my phone via PC
how to unistall/disable magisk so I can delete the modules?
Is there a folder that I can delete?
I don't have TWRP
albysprx said:
Hi, my device reboot after I unlock it, I only have access to my Internal memory of my phone via PC
how to unistall/disable magisk so I can delete the modules?
Is there a folder that I can delete?
I don't have TWRP
Click to expand...
Click to collapse
How you got magisk to work without flashing it?
PoochyXXX
PoochyX said:
How you got magisk to work without flashing it?
PoochyXXX
Click to expand...
Click to collapse
with patched the boot img of my firmware with magisk manager and then I flashed it with fastboot
albysprx said:
with patched the boot img of my firmware with magisk manager and then I flashed it with fastboot
Click to expand...
Click to collapse
Ohhhhh.... Root is very particular without a custom recovery to get your phone to that exact working state it was in before if you had a custom recovery there could of been a couple modules you could use
PoochyXXX
You can always flash a stock boot image. That will disable Magisk completely, but has the drawback of leaving you without root...
To disable or uninstall modules without removing Magisk you would have to have access to /cache (place a file named .disable_magisk, with the leading dot, in /cache and Core Only Mode will be enabled) or /data/adb (delete the Magisk image file) through recovery. Usually not an option on a stock recovery... If there is no custom recovery for your device you might not have many options, but if there is one available and you don't want to install it, you could at least boot it with "fastboot boot recovery <name_of_recovery_file>".
Didgeridoohan said:
You can always flash a stock boot image. That will disable Magisk completely, but has the drawback of leaving you without root...
To disable or uninstall modules without removing Magisk you would have to have access to /cache (place a file named .disable_magisk, with the leading dot, in /cache and Core Only Mode will be enabled) or /data/adb (delete the Magisk image file) through recovery. Usually not an option on a stock recovery... If there is no custom recovery for your device you might not have many options, but if there is one available and you don't want to install it, you could at least boot it with "fastboot boot recovery <name_of_recovery_file>".
Click to expand...
Click to collapse
Yeah, I got working again with flashing the stock boot.img but after flashed again the pacthed boot.img my phone bootloop again...
I tried to install TWRP and got it working, I typed /cache/.disable_magisk in terminal and rebooted and the device works, went to magisk manager and no modules was there, disabled core magisk and the device bootloop again...
now I'm trying to reinstall the entire firmware and make a factory reset before reinstalling magisk...
Should this remove modules installed?
Didgeridoohan said:
You can always flash a stock boot image. That will disable Magisk completely, but has the drawback of leaving you without root...
To disable or uninstall modules without removing Magisk you would have to have access to /cache (place a file named .disable_magisk, with the leading dot, in /cache and Core Only Mode will be enabled) or /data/adb (delete the Magisk image file) through recovery. Usually not an option on a stock recovery... If there is no custom recovery for your device you might not have many options, but if there is one available and you don't want to install it, you could at least boot it with "fastboot boot recovery <name_of_recovery_file>".
Click to expand...
Click to collapse
Yeah, I got working again with flashing the stock boot.img but after flashed again the pacthed boot.img my phone bootloop again...
I tried to install TWRP and got it working, I typed /cache/.disable_magisk in terminal and rebooted and the device works, went to magisk manager and no modules was there, disabled core magisk and the device bootloop again...
now I'm trying to reinstall the entire firmware and make a factory reset before reinstalling magisk...
Should this remove modules installed?
albysprx said:
Yeah, I got working again with flashing the stock boot.img but after flashed again the pacthed boot.img my phone bootloop again...
I tried to install TWRP and got it working, I typed /cache/.disable_magisk in terminal and rebooted and the device works, went to magisk manager and no modules was there, disabled core magisk and the device bootloop again...
now I'm trying to reinstall the entire firmware and make a factory reset before reinstalling magisk...
Should this remove modules installed?
Click to expand...
Click to collapse
If you got the device booting (in Core Only Mode) and still have root you could just use a file explorer, navigate to /sbin/.magisk/img and delete the offending module directories. Or, you could delete the Magisk image file in recovery (it's in /data/adb). Either of those options would remove the modules.
Didgeridoohan said:
If you got the device booting (in Core Only Mode) and still have root you could just use a file explorer, navigate to /sbin/.magisk/img and delete the offending module directories. Or, you could delete the Magisk image file in recovery (it's in /data/adb). Either of those options would remove the modules.
Click to expand...
Click to collapse
Got my device working again in magisk core only mode but the folder /sbin/.magisk/img is empty .-.
albysprx said:
Got my device working again in magisk core only mode but the folder /sbin/.magisk/img is empty .-.
Click to expand...
Click to collapse
Now that you have your device running, do a complete uninstall from the Magisk Manager and start over. That should remove everything...
Didgeridoohan said:
Now that you have your device running, do a complete uninstall from the Magisk Manager and start over. That should remove everything...
Click to expand...
Click to collapse
ok I deleted the magisk.img from data/adb/magisk, did a complete unistall from magisk manager (after the unistall the phone reboot to the TWRP without doing anything), sideloaded the magisk unistaller and got "ERROR: 1", after that I rebooted, rebooted again in recovery mode and installed magisk, rebooted, removed the core mode and rebooted again..
It works!!
Thanks a lot

SM-T295 - Finally rooted tablet!! (updated 19-March-2021)

I have root on my SM-T295 A8 tablet!!
See my new post: How to Install TWRP and Root T295
Update 19 March 2021
Tested on T295XXU3BUC3 ROM
Prerequisites:
Bootloader unlocked - search forums.xda-developers for instructions how to do this.
OEM unlock on. In Settings/developer options, OEM Unlock slider should be to the right.
I see people still trying to patch files to get root.
If you flash the TWRP posted by @Talich52, with reboot unchecked you can install Magisk from TWRP.
1. If prerequisites met: install Android 9 bootloader through ODIN
2. Reboot to system
3. Go into download mode.
4. Open ODIN and in the AP slot put TWRP (see attachment below)
5. Uncheck auto reboot
6. Flash TWRP
7. Press vol dn + pwr keys.
8: When screen goes blank, press vol up + pwr keys.
9. Keep holding down both keys after reboot.
10. Tablet will reboot again.
11. When Samsung logo appears stop pressing pwr key.
12. When bootloader msg appears, release vol up key, quickly press & release pwr key, and quickly press vol up key until in TWRP.
13. You will then format (NOT WIPE) data. Answer yes to the format prompt
14. Clear dalvik/cache if prompted
15. Install Fix_vendor_9.0.zip or Fix_vendor_10.0.zip. See attached files.
16. Clear dalvik and cache.
17. Reboot back into recovery.
18. Install magisk - see attached
19. Reboot into system. May reboot again - that's okay
20. Enjoy!!
Updated (23 March 2020) my Tab A with XXS3ATB2 and got it rooted!!
Attached AP.tar file is for XXU2ASL3 only.
T295-Magisk-AP.tar
Okay, after multiple failed attempts, I read about a method to root my T295. It did not work!! But, I decided to just use Magisk Manager on the boot.img file only. The resultant file would not flash - it will fail. The original boot.img & recovery.img files are 65,536K bytes each. I had to take the Magisk modified boot.img and overlay it onto the original boot.ing file. I did the same for the recovery.img. Then the files would flash successfully. The first thing after booting was to check Magisk Manager. It showed I have Magisk 20.3 installed. So, I tested this with Root Explorer. I did have root!!
If you are going to try this, you need to unlock your boot loader, I think. I have not tried this with a locked bootloader.
Basic instructions
PLEASE READ ALL OF THIS BEFORE STARTING!! VERY IMPORTANT!!
Here are the steps to root your tablet:
Make a backup of you apps & data before doing this. This procedure will
wipe all you data.
Go to settings.
Select software info
Tap build number 7 times to get into developer mode
Go back to main settings page.
Scroll to bottom and select developer mode
In middle of page find OEM unlocking
Make sure slider is all the way to the right (should say allow bootloader to be unlocked)
Unlock bootloader:
1. turn off tablet
2. press and hold down vol up & vol down keys together
3. insert usb cable (should already be connected to computer)
4. when bootloader screen appears, release all keys
5. press and hold vol up key for 5 seconds, then release
6. read instructions on screen to unlock bootloader (this will wipe all your data)
After reboot, go through normal setup.
Now for the hard part.
You need to download the complete ROM you have installed on your Tablet.
It will be better if you have the same ROM version as I do in post in this post (#1).
You need to unzip the ROM so you can flash it in ODIN.
If you are on the same ROM version as in my post #1, then you can just download my rooted files.
Unzip my downloaded root files zip file.
Unzip the downloaded ROM files.
In the AP* file, you need to replace my files in the zip: boot.img, recovery.img & vbmeta.img
Start ODIN. Select files for BL*, AP*, CSC* & CP*
For CSC file, select HOME_CSC*
*** Uncheck auto reboot ***
Flash ROM.
After flashing ROM. press vol dn + pwr key
As soon as screen goes blank press vol up key and hold
When get into recovery, select data wipe, then reboot
Set up phone as you normally would.
After setup, go to Play store and install Magisk Manager. Run Magisk Manager to see if you have root.
Do It Yourself Instructions
You need to do some research before doing this. This is NOT a walk you by the hand tutorial. You need to learn some things before following these instructions. Learn how to use lz4.exe. Learn how to use simg2img. Learn how to make a .tar file.
Make a backup of you apps & data before doing this. This procedure will
wipe all you data.
Go to settings.
Select software info
Tap build number 7 times to get into developer mode
Go back to main settings page.
Scroll to bottom and select developer mode
In middle of page find OEM unlocking
Make sure slider is all the way to the right (should say allow bootloader to be unlocked)
Unlock bootloader:
1. turn off tablet
2. press and hold down vol up & vol down keys together
3. insert usb cable (should already be connected to computer)
4. when bootloader screen appears, release all keys
5. press and hold vol up key for 5 seconds, then release
6. read instructions on screen to unlock bootloader (this will wipe all your data)
After reboot, go through normal setup.
Now for the hard part.
You need to download the complete ROM you have installed on your Tablet.
Extract ROM files
Extract system.*.lz4, recovery*.lz4 and vbmeta*.lz4
Use tar to make an AP.tar file with the 3 above files. **Search the Internet if you do not know how to use tar.
Copy the AP.tar file to your phone. It is better to use adb push to prevent file correuption.
Install Magisk Manager from Play store.
Run Magisk Manager. Select install Magisk. Choose Select and Patch a file. Follow directions on screen to patch the AP.tar file.
Once the AP.tar file has been patched, use adb to pul the file to yur computer.
Extract the file from the AP.tar file.
Now come the hard part:
You cannot edit .lz4 directly. You have to decompress them. After decompressing system*, use simg2img to decompress the sparse file. Search the Internet if you do not know how to do this.
Now we make our modified files so they will flash in ODIN.
Instructions:
I used hex editor neo - a windows 10 app
I opened the stock kernel & recovery files in hex editor neo
I opened the Magisk modified kernel & recovery files in hex editor neo
I copied the modified kernel & recovery code onto their respective stock files in hex editor neo
I saved the stock files & closed hex editor neo.
I used cygwin to create a tar file: boot.img, recovery.img, vbmeta.img plus other files in original AP*.MD5 file.
You should also flash all ROM *.MD5 files (BL, CP, CSC) per Magisk instructions.
New AP.tar contents:
boot.img
dtbo.img.lz4
meta-data
recovery.img
system.img.ext4.lz4
userdata.img.ext4.lz4
vbmeta.img
vendor.img.ext4.lz4
I used Odin to flash the tar file
Flash ROM.
After flashing ROM. press vol dn + pwr key
As soon as screen goes blank press vol up key and hold
When get into recovery, select data wipe, then reboot
Set up phone as you normally would.
After setup, go to Play store and install Magisk Manager. Run Magisk Manager to see if you have root.
After installing Magisk:
(Powering up normally) → (System with NO Magisk)
(OEM Recovery Key Combo) → (Splash screen) → (Release all buttons) → (System with Magisk)
(OEM Recovery Key Combo) → (Splash screen) → (Keep pressing volume up) → (Actual recovery)
Please follow my instructions and the install instructions from Magisk web page.
Magisk Installation
What system do you use to manipulate the files? (Windows? Linux? Android?)
What is "overlay"? Do you extract the boot.img from the original AP.tar.md5, and from the magisk-patched.tar, copy the magisk-patched-boot.img to the beginning of the original-boot.img, and then replace the boot.img in magisk-patched.tar?
Do you give Odin four files, or just AP? Do you use CSC or HOME_CSC?
J.Michael said:
What system do you use to manipulate the files? (Windows? Linux? Android?)
What is "overlay"? Do you extract the boot.img from the original AP.tar.md5, and from the magisk-patched.tar, copy the magisk-patched-boot.img to the beginning of the original-boot.img, and then replace the boot.img in magisk-patched.tar?
Do you give Odin four files, or just AP? Do you use CSC or HOME_CSC?
Click to expand...
Click to collapse
In answer to your question, basically, yes.
I only flash the 3 files in the .tar file
I am on a Windows 10 laptop. Only 3 files need to be modified by Magisk: boot.img, recovery.img, vbmeta.img
I use Hex Editor Neo for overlaying the modified kernel and recovery files..
At the end of these 2 stock files is code that needs to be there, thus the 65 MB file size.
So I open the stock .img files (boot, recovery) in Hex Editor Neo, and copy the modded boot, recovery code into each stock .img file..
I use cygwin to create the .tar file, then flash with ODIN 3.1.14
Where does this leave you with respect to booting? Do you have to hold down buttons like you're trying to boot to recovery, then let go at the right time, to boot with Magisk active? Have you booted "normally" since you installed Magisk? Is Magisk still active? Have you shut down completely and then rebooted?
Wu's writeup says, when he's patching an AP file, to install to recovery, the boot.img is patched to "remove the signature of the image to prevent soft bricks". He doesn't explain why the signature would cause a soft brick with an unlocked bootloader and a nulled-out vbmeta. If you're restoring the original signature, it seems like you're flirting with the situation he was trying to avoid.
Will you be posting in the main Magisk thread. Aside from the news of another success, the details of your solution might help Wu improve the automatic patching enough to make manual adjustments unnecessary.
J.Michael said:
Where does this leave you with respect to booting? Do you have to hold down buttons like you're trying to boot to recovery, then let go at the right time, to boot with Magisk active? Have you booted "normally" since you installed Magisk? Is Magisk still active? Have you shut down completely and then rebooted?
Wu's writeup says, when he's patching an AP file, to install to recovery, the boot.img is patched to "remove the signature of the image to prevent soft bricks". He doesn't explain why the signature would cause a soft brick with an unlocked bootloader and a nulled-out vbmeta. If you're restoring the original signature, it seems like you're flirting with the situation he was trying to avoid.
Will you be posting in the main Magisk thread. Aside from the news of another success, the details of your solution might help Wu improve the automatic patching enough to make manual adjustments unnecessary.
Click to expand...
Click to collapse
No keypress is required for booting to maintain root.
I have tried this multiple ways: shutdown/boot & reboot - still have root.
I have not posted in main Magisk thread yet. Can you give me a link to the main thread where I can post this information?
https://forum.xda-developers.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382
This is the General Discussion thread. I've seen references to github for reporting bugs. github might be a better bet for providing technical information about how patching should be implemented.
J.Michael said:
https://forum.xda-developers.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382
This is the General Discussion thread. I've seen references to github for reporting bugs. github might be a better bet for providing technical information about how patching should be implemented.
Click to expand...
Click to collapse
Thanks for the link. I have posted to the Magisk forum.
Well, besides the possible outcomes, I tried the method and it worked for me. I'm not loosing magisk between boots too, not touching system apps but I can install modules and get root.
So, thank you very much for the finding!
Gartrax said:
Well, besides the possible outcomes, I tried the method and it worked for me. I'm not loosing magisk between boots too, not touching system apps but I can install modules and get root.
So, thank you very much for the finding!
Click to expand...
Click to collapse
You're welcome. Enjoy your Tab A now that you have root.
gcrutchr said:
I have root on my SM-T295 A8 tablet!!
Attached boot.tar file is for XXU2ASL3 only.
T295-Magisk-AP.tar
Okay, after multiple failed attempts, I read about a method to root my T295. It did not work!! But, I decided to just use Magisk Manager on the boot.img file only. The resultant file would not flash - it will fail. The original boot.img & recovery.img files are 65,536K bytes each. I had to take the Magisk modified boot.img and overlay it onto the original boot.ing file. I did the same for the recovery.img. Then the files would flash successfully. The first thing after booting was to check Magisk Manager. It showed I have Magisk 20.3 installed. So, I tested this with Root Explorer. I did have root!!
If you are going to try this, you need to unlock your boot loader, I think. I have not tried this with a locked bootloader.
Click to expand...
Click to collapse
You must have a unlocked bootloader to proceed. How did you overlay the files?
secretwolf98 said:
You must have a unlocked bootloader to proceed. How did you overlay the files?
Click to expand...
Click to collapse
Instructions moved to Post #1
In unlocking the bootloader, does it have any negative side? I remember on my sasung s5 before that i would loose what they call knox and not be able to restore permanently. How abiut in the 2019 tab?
amnher said:
In unlocking the bootloader, does it have any negative side? I remember on my sasung s5 before that i would loose what they call knox and not be able to restore permanently. How abiut in the 2019 tab?
Click to expand...
Click to collapse
Probably the same situation. I do not care about knox. I do not care about Samsun Pay.
I have not tested anything to restore knox.
gcrutchr said:
Probably the same situation. I do not care about knox. I do not care about Samsun Pay.
I have not tested anything to restore knox.
Click to expand...
Click to collapse
Attempting to restore Knox would be a waste of time because it is impossible. When you think of Knox, think of the manufacture warranty. Once you void the warranty, it's a goner.
secretwolf98 said:
Attempting to restore Knox would be a waste of time because it is impossible. When you think of Knox, think of the manufacture warranty. Once you void the warranty, it's a goner.
Click to expand...
Click to collapse
My understanding is knox is not installed on the T295
gcrutchr said:
My understanding is knox is not installed on the T295
Click to expand...
Click to collapse
According to the off site, the tablet has a Knox
Some user use the file from #1 and have this error(about security)
only official released binaries are allowed to be flashed after reboot
gcrutchr said:
My understanding is knox is not installed on the T295
Click to expand...
Click to collapse
The T29x and T51x has knox.
secretwolf98 said:
The T29x and T51x has knox.
Click to expand...
Click to collapse
Yea...just checked in priv-app folder.
I read somewhere the T29x series did not have knox...must have read wrong...ha, ha
And what we have?
How I can solve the problem with "Only official released binaries are allowed to be flashed"?
Alloc777 said:
And what we have?
How I can solve the problem with "Only official released binaries are allowed to be flashed"?
Click to expand...
Click to collapse
Did you unlock bootloader?
Did you toggle OEM unlock in settings/developer options?

How to delete magisk module without root?

Hi, I have installed a magisk module that brokes the system and gets stuck on Havoc OS logo, by flashing original boot image I'm using the phone seamless, but I'm not root anymore.
I tried with TWRP filemanager, but for this device (Redmi Note 9 merlin) it must not work very well and I can't go inside /data/adb/modules folder (It says I haven't permission for that). I didn't found a way to do with adb (but I hope it's possible).
Any idea would be welcome, thanks!
You can't.
For removing modules, you have two methods.
For first method, you need to boot in emergency mode, open magisk manager, remove module and reboot.
(It works only with magisk +v21.)
(To boot in emergency mode, keep pressed volume down after boot starts.)
For second method, you need to flash the original stock boot.img, open magisk manager, remove module, reboot and then flash the magisk patched boot.img again.
Here, you can find boot images for original stock and magisk patched: https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204671/
Good luck
Do you need help with your MERLIN device ?
Read this FAQ: https://forum.xda-developers.com/t/...for-merlin-redmi-10x-4g-redmi-note-9.4225177/

[UPDATE / KEEP ROOT GUIDE] MAY 2021 (RQ2A.210505.002) - "FLAME" Magisk & Stock Boot / DTBO Images

(Sorry guys, this would have been up sooner, but Android File Host hasn't been letting me upload all day for some reason, so I just temporarily uploaded May 2021's files to my Google Drive for now instead. Enjoy! --- moved back to AFH )
IMPORTANT!! THESE FILES / THIS THREAD IS FOR PIXEL 4 "FLAME" ONLY, NOT PIXEL 4 XL "CORAL"!!
**IT IS HIGHLY RECOMMENDED TO PATCH THE STOCK BOOT IMAGE YOURSELF, FROM YOUR OWN DEVICE, USING MAGISK MANAGER. WHILE THERE'S A GOOD CHANCE THE FILE I PROVIDED BELOW WILL BE IDENTICAL (USE A FILE HASH CHECKSUM TOOL IF YOU'RE CURIOUS), THERE IS ALSO A CHANCE THEY MAY HAVE SMALL, BUT SIGNIFICANT, VARIANCES**
Thanks for the info and link, @wrongway213
Link to @topjohnwu's post: twitter dot com /topjohnwu/status/1272136975022084097?s=19 (until I figure out how to stop new XDA from forcing the URL to embed a giant twitter posting in the middle of the post...)
ALL FILES BELOW ARE FOR "RQ2A.210505.002, May 2021"!
Magisk v22.1 Patched Boot Image: https://www.androidfilehost.com/?fid=2188818919693794194
Factory Untouched Boot Image: https://www.androidfilehost.com/?fid=2188818919693794193
Factory Untouched DTBO Image: https://www.androidfilehost.com/?fid=2188818919693794195
----------------------------------------------
-------------UPDATE PROCESS BELOW-------------
----------------------------------------------​
EASY UPDATE / SEAMLESS KEEP-ROOT UPDATE PROCESS (using a PC - a very intuitive, effective, and relatively safe method).
** You can only follow this guide verbatim if coming EXACTLY from build "11.0.0 (RQ2A.210405.005, Apr 2021". But the general idea is the same for other builds, you just need the correct files for your device.
flame-rq2a.210405.005-factory-dtbo.img: https://www.androidfilehost.com/?fid=2188818919693776329
flame-rq2a.210405.005-factory-boot.img: https://www.androidfilehost.com/?fid=2188818919693776333
May 2021 sideload OTA zip: https://dl.google.com/dl/android/aosp/flame-ota-rq2a.210505.002-6509c4b3.zip
DO NOT BOOT BACK INTO O/S UNTIL ALL STEPS ARE COMPLETED - THIS ENSURES EVERYTHING BOOTS BACK UP WITH MAGISK / EDXPOSED ALL RUNNING PROPERLY RIGHT AWAY
1. boot into bootloader
----------------
** I was on custom kernel, so I needed to flash BOTH the stock boot and dtbo images
2. fastboot flash boot flame-rq2a.210405.005-factory-boot.img
3. fastboot flash dtbo flame-rq2a.210405.005-factory-dtbo.img
......* these steps to restore stock recovery; dtbo.img also necessary for some kernel installations.
......* won't hurt to flash both anyway, so if you're unsure, go ahead and do both.
-----------------
4. use volume keys to change selection to boot to Recovery Mode
......- when you reach the android symbol with No Command, hold power button, tap volume up, in case you've forgotten
5. choose option "Apply update from ADB"
6. adb sideload flame-ota-rq2a.210505.002-6509c4b3.zip
7. Once the OTA sideload is done, Reboot to bootloader (you'll also notice it's now on the other slot after OTA flashed)
8. fastboot flash boot flame-rq2a.210505.002-magisk_patched-22100.img
9. done, start the phone
(Optional - Flash custom kernel. If you had a custom kernel, you need to re-flash it)
This is a 100% seamless update that requires no additional / re-setup of any of my Magisk or EdX/LSposed setups. All of the factory files can be found here https://developers.google.com/android/images. boot.img and dtbo.img are in their corresponding full Factory Image zips, and the ota zip is under Full OTA Images.
-------------------------------------------------
-------------------TROUBLESHOOTING-------------------
-------------------------------------------------​
Issues after updating?
If you end up unable to boot or bootlooping afterwards, you most likely have an old Magisk module that isn't playing nice with the new build. There are 2 main things you can do:
1. Flash the new factory untouched boot image. You will of course lose root, and all modules will be disabled. However, it should at least get you able to boot back up quickly and have a working phone if you're in a bind.
2. I would recommend checking Tulsadiver's thread: https://forum.xda-developers.com/pixel-4-xl/how-to/magisk-modules-disabler-booting-magisk-t3990557
Instead of reverting to stock boot image, fastboot boot (NOT FLASH) Tulsadiver's boot image. This will boot your phone in Magisk Core-Only Mode, with all modules disabled but root retained. From here you can open Magisk Manager and disable suspect modules. Before rebooting, go to Magisk Manager's settings and disable Magisk Core-Only Mode. Once you disable the incompatible module, the phone should boot back up.
- See this post (or thread) for more tips / context / an example: https://forum.xda-developers.com/showpost.php?p=82509691&postcount=16
Since Magisk v21.x, Core Only mode has been replaced by using Android's built-in Safe Mode. Booting into Safe Mode should essentially boot you back into your system but with all modules disabled (as well as Magisk Hide). Keep in mind that even after you reboot, modules will remain disabled, unless you re-enable them first. Also remember to re-enable Magisk Hide if you had it enabled before.
Please see @Didgeridoohan's guide for more details: https://www.didgeridoohan.com/magisk/MagiskModuleIssues#hn_Core_Only_Mode
It's also worth mentioning, his guide is extremely well-made and contains a lot of useful information that could benefit all Magisk users and modders. I highly recommend looking through it anyway!
Thanks for sharing

Categories

Resources