Magisk patch on SM-A520F (Galaxy A5 2017) FAILED - Magisk

Hello,
I've been using magisk for some time now and no problem until now. I recently updated my firmware to the last version and intended to update it and keeping magisk, but it didn't worked.
Every time I would flash magisk to the boot image by any mean, the system would boot and tell me "system was modified : press the nuke button to restore it (you will lose all your data lol)" or womething like that.
I was able to flash the stock update and get my phone working with the last firmware but magisk is not installed. I also installed TWRP without problems (helped me a lot to flash the stock boot.img and restore the phone).
I tried to install magisk using :
- Odin : Modified boot.img using magisk app and repacked as boot.img.lz4 in the AP file (with correct lz4 parameters)
- TWRP : Flashed modified boot.img from earlier
- TWRP : Flashed magisk ZIP directly
- Odin : Flash full AP modified by Magisk app
Every time, I have that black screen that tells me my system will be wiped if I continue. Magisk, Odin or TWRP do not return any error
Feel free to ask for any file or further info and thank you for your help !
Firwmare version is A520FXXUGCTKA_CL19831441_QB36271825_REV00
Magisk app returns :
- Ramdisk YES
- A/B NO
- SAR NO

Did you try after you install the new rom through Odin, then instal Twrp and then in Twrp you Format data(not wipe) then immediately install magisk. If dosen't work try with another firmware.
I never update firmwares if there isn any visible difference. Mostly is always some security fixes which i dont care about.

hey, Im having a different issue where after installing lineage 18.1 on my a5 i flashed the latest magisk but once i got in the phone it cycled into a bootloop and now it's eternally turned off cant even turn it into twrp. any suggestion?

Related

How to update to Oreo from Magisk rooted stock rom OOS 4.5.1?

Can anyone help me with the steps to update to Android Oreo (OOS 5) from OOS 4.5.1 retaining root?
Below are the current setup of my phone
Rooted - Yes (Magisk version 14.0)
Recovery - TWRP version 3.1.1-2
Current Rom - Stock OOS 4.5.1
I haven't had any problems in updating earlier but now when I try to flash the full oreo rom from TWRP, I am getting error 7.
Below are the steps I followed.
Downloaded the full OTA zip.
Rebooted to recovery.
Unistalled Magisk.
Tried to flash the Oreo OTA zip. At this point TWRP showed error 7.
Reinstalled Magisk and rebooted to system.
Phone is working fine.
you need to use latest twrp for oreo, for example blue spark version, search for it on xda...
Follow this guide here:
https://forums.oneplus.net/threads/how-to-install-oos-5-0-over-rooted-4-5-1.684519/#post-17134194
It's exactly what you need.
All Oreo ROM threads clearly state under the "Instructions" heading, that you need either AkhilNarangs Modified TWRP or Blu_Sparks TWRP V50. Using stock TWRP would result in an error.
If the error may still persist, try flashing a different firmware.
Just to get some more clarity.
I have the original OTA full zip. Should I download the zip file from your thread?
Can I install the custom version of TWRP using the official TWRP app? I am bit confused on how to install it.
Is it important that I should use Magisk 14.3 or will v 14 have the same effect?
Hey there,
I can tell you how I have done it yesterday (successfully).
1. Update TWRP - I prefer blu sparks version 8.52 (Link: https://forum.xda-developers.com/devdb/project/dl/?id=27225); you can do it by using your installed TWRP Version (Install .img)
2. Dirty flash OOS 4.5.1 again (to remove root / magisk) - once finished DO NOT reboot into system, reboot into Recovery/TWRP to verify the new version and afterwards to system
3. flash OOS 5.0 (Oreo) - dirty flash is okay
4. flash magisk Version 14.3
These are the steps I have followed yesterday and all is running perfect and without any problems.
BR
Which recovery is mentioned in this linked discussion resp. in the linked download? Is it blu_spark TWRP?
Regards
Clark
This worked perfectly for me.
Glad to hear that everything is good ?
I did the same and I was suddenly encrypted and no chance to get my data back. Still forcing clean my phone because I cannot format the device. I get always an error message in TWRP like: unable to format to remove encryption
I go crazy...
Enter recovery and wipe data and then cache.
Then reflash the rom and probably you will be good to go.

[Q] how to update after rooting (magisk) ?

Hello
I was on B180 (PRA-LX1C432) rooted with magisk
No updates available in settings/update firmware, but connecting to PC HiSuite B194 appeared (which seems to be for Honor 8 lite by the way). It downloaded it, pushed it to phe phone, but when rebooting it goes to twrp... so obviously I'm still on B180
I imagine we have to flash back stock recovery before updating ? And then twrp again, magisk flash, etc ?
Thanks !
About OTA over magisk I found that on P9 forum:
1) unroot by Magisk Uninstaller, find the download link in the post https://forum.xda-developers.com/sho...63&postcount=1
2) flash from TWRP original stock boot img
3) wipe Dalwik and Cache from TWRP
3) flash from fastboot original stock recovery
4) let it make OTA update but select in the System Update settings to use Full (not differential) update - it will not delete your apps and settings
maybe the safest way indeed...
But as I "catch" the full ota, maybe I can use fastboot to flash only system and boot, and the reflash magisk to patch new boot img ?
anyone ?
Nobody updated after root ??
Ok, this is what I did and happened:
- In TWRP, flash magisk uninstaller script: ERROR 1. After reboot magisk was still here. That was a bad start...
- So I opened magisk app, click Uninstall and then Complete Uninstall. After that I made a reboot as asked, and device rebooted twice.
- Then, went to download mode and flashed stock recovery. And reboot.
- Then went to settings/updates/download latest full ota. It downloaded but refused to start the install process claiming to free up more than 900MB... Nothing on my internal sdcard so I had to uninstall some apps... cool !
- Then it reboot and installed the update
- First boot took a while, I still have "this device cannot be trusted" on start, and OEM unlock in settings is grayed and ON, so I think the bootloader is still unlocked
- Theme and wallpapers were reset with the update
For now I don't have flashed back twrp neither magisk .
In the meantime have you flashed TRWP and Migistik ? And again: do you have still to update your signature or something went wrong in installing fw B194.
Lastly: what do you mean by "went to download mode and flashed"...

I need help to Root my SM-M105F

Hello i have the Samsung Galaxy M10 SM-M105F.
I need to root the Phone for make Custom Rom or Edit the Scripts.
I have OEM Unlock the Bootloader and install the Unofficial TWRP with Odin From here
https://forum.xda-developers.com/ga...p-3-3-0-twrp-recovery-samsung-m10-sm-t3925243
TWRP work, but the System is in Bootloop.
Pls i need help to root My Device with working TWRP, System boot and Root
BlacklightMG said:
Maybe try flashing 'no-verity-opt-encrypt' and 'RMM Bypass' zip files?
EDIT: Flash Magisk zip too (it removes dm-verity), and format the data partition
Click to expand...
Click to collapse
It'll be rooted when you flash Magisk. And install the Magisk Manager APK too, to allow root control.
I actually rooted without TWRP by flashing the patched boot image generated from Magisk, and then performed a factory reset because file integrity couldn't be verified. But the Magisk binaries worked.
Amazing, can you pls Upload your Modified Bootloader for me and all People here ?
For make the Galaxy M10 open for users and Dev's.
Sorry for the late reply, but it's always better to do it yourself depending on what OTA update you are currently on. Download the firmware, extract the boot image and patch it with Magisk Manager. Then flash it with ODIN or Heimdall while in download mode. Then I had to factory reset because file integrity could not be verified. But the root was preserved.
BlacklightMG said:
Sorry for the late reply, but it's always better to do it yourself depending on what OTA update you are currently on. Download the firmware, extract the boot image and patch it with Magisk Manager. Then flash it with ODIN or Heimdall while in download mode. Then I had to factory reset because file integrity could not be verified. But the root was preserved.
Click to expand...
Click to collapse
Can you show us how to extract the boot image and patch it with magisk manager ?
I have on my SM-M105FD the Firmware 8.1.0 and Working Root.
Download the Firmware 8.1.0 on the PC and the AP File put on the Phone.
Download and install magisk apk on your Device and patch the AP in Magisk file.
flash the Firmware full with Odin but put on the AP Option the Patched AP file flash and work.
I have with Magisk install the Xposed Framework and install nice plugins.
My phone became stuck in a boot loop so i tried to go back but whenever i try to flash the stock rom through odin it says sw REV. Check fail (Bootloader) Device: 2, Binary 1
Iam Facing A Problem Kindly Guide Me Samsung Galaxy M10 Smm105f U2 Installed Twrp Rec
Iam Facing A Problem Kindly Guide Me
Samsung Galaxy M10 Smm105f U2
Installed Twrp Recovery With Odin
Wiped Data
Flashed Successfuy
No Verify Opt
Rmm State Bypass
And Magisk
Now I Want To Boot In System But After Booting In System Process Device Asking Me For A Password
"Ur device Is encrypted For Security Plz Type ur Pswrd "
Even I Haven't Locked Phone With Any Kind Of Privacy
And I Have Also Flashed A New Firmware But Problem is same it's Not Booting in System
It won't work on android 10, you have to switch to android 8.1,then try ?
DJSAJJAD said:
Iam Facing A Problem Kindly Guide Me
Samsung Galaxy M10 Smm105f U2
Installed Twrp Recovery With Odin
Wiped Data
Flashed Successfuy
No Verify Opt
Rmm State Bypass
And Magisk
Now I Want To Boot In System But After Booting In System Process Device Asking Me For A Password
"Ur device Is encrypted For Security Plz Type ur Pswrd "
Even I Haven't Locked Phone With Any Kind Of Privacy
And I Have Also Flashed A New Firmware But Problem is same it's Not Booting in System
Click to expand...
Click to collapse
It won't work on android 10, you have to switch to android 8.1,then try ?

Magisk 25.2 severely breaks LineageOS 18.1 on Samsung Galaxy Tab S5e (SM-T725)

For some odd reason Magisk breaks auto-rotation and sets selinux to permissive on boot after updating to 25.2 (from 25.1).
This is not the first time Magisk messes up Selinux rules. I usuall solved this by making a fresh OS install already with patched boot and by installing the managing app afterwards.
However, this time autorotation stopped working for some reason. And when i try to uninstall Magisk using its app -- OS no longer boots, as if it fails to restore initial boot image.
This selinux problem began since v25.
I use latest official build of Lineage OS 18.1. I have TWRP installed, which i use to install LineageOS.
What am i doing wrong? Has anyone experienced such issues?
I posted the same problem here (did not notice/checked SELinux back then and sound is probably also not working), figured out that all sensors do not work, checked with "Sensor Test" app. I was already considering a separate thread, thus I'll continue here, because this issue definitely deserves a separate thread. Documentation is so scattered and sometimes so confusionly described, that it was hard to make sense of it all...
(Disclaimer: Although I have necessary experience with installing custom ROMs etc., everything stated below is at my own understanding ).
My device: Samsung Galaxy Tab S5e LTE
My goal was: TWRP, LineageOS and Magisk. How hard can it be?
Problems are that (most of the) Samsung devices do not have a "ramdisk" partition where Magisk is normally installed, also the increasingly complexity of encryption en integrity checks makes this more annoying.
First, let me retrace my steps, as far as I can.
When reading the TWRP page, we get a clue where to start: "You are therefore strongly advised to first root your device with Magisk and then pre-root a TWRP image before flashing it to recovery", this is because "Both TWRP and Magisk-rooted Android boot using the recovery kernel, with the device's hardware keys used to choose between TWRP and Android at boot time".
(Magisk "hijacks" part of the recovery partition, since the absence of a ramdisk partition.)
Spoiler: later on you learn this is not completely the case any more, but I would still recommend to hold on to this method, because the TWRP page also states that: "The usual path of installing TWRP prior to rooting is problematic on this device, because the Magisk installer does not support installation to recovery from TWRP. Furthermore, prior rooting of the device with Magisk carries the significant advantage of disabling various device protection mechanisms that you will otherwise need to take care of manually.", and it continues with more scary warnings...
1. Thus followed the Samsung section of the Magisk documentation to have the bootloader unlocked and Magisk installed, but stock firmware is still installed, no problem whatsoever.
Then decipher the already mentioned instruction: "...pre-root a TWRP image before flashing it to recovery". This apparently means that Magisk has to patch the TWRP image, just like as was done with the Samsung firmware.
2. Downloaded the *.tar file of TWRP, extracted the image, patched with Magisk and repacked to the *.tar file with 7-Zip in order to be able to flash it with Odin (see step 4).
*3. I do not recall when I installed the "VBMeta file", although this is instructed in the Lineage OS installation instructions, when following the TWRP instructions it says "...you can now jump to its own section", thus skipping it?? (I did it somewhere in the process...)
Unknown: whether it is still required to patch and flash VBmeta (to disable some verification process)...
4. Flash TWRP recovery, see YouTube video below. This video mentions the use of "multidisabler-samsung", which disables "FBE, proca, Vaultkeeper and auto-reflash of stock recovery on Samsung Pie devices". Current latest version was 3.1, downloaded from this XDA post, I think.
Just as in the YouTube video, I also was stuck at the Samsung logo. After booting into the stock firmware you can check if Magisk still works.
Not sure: "multidisabler-samsung" needed?
5. Install LineageOS (and GApps). The most straightforward step, just install LineageOS, read the instructions. Then install GApps (e.g., BiTGApps).
6. After booting (power and volume + button) and setting up LineageOS, a Magisk icon should be visible in the app drawer, click it and the Magisk app is installed, when opened, Magisk is setting up a few more things and reboots the tablet.
*******************************************************************************************
This is the point were you finally think you made it, but no, here the issues arise.
Issues thus being SELinux permissive status (Xandros Darkstorm), no sound and non-working sensors, thus "auto rotating" feature is not working.
At this point I started to regret my purchase...
In the search of a solution to the problem I stumbled upon the following familiar and solved Magisk issue #4911 (LineageOS 18.1 no sound and no sensors after booting with Magisk), which refers to issue #4394 (Magisk > 21.4 is difficult to install on LineageOS (18.1) with TWRP (Direct Install not enabled unless you use old zip)).
In short: this post mentioned patching the boot image instead of the recovery image.
*******************************************************************************************
I. I extracted "boot.img" from the LineageOS zip file, patched it via Magisk (ramdisk is added to the boot image) and replaced the "boot.img" in the zip file with 7-Zip.
II. Booted into TWRP, flashed an original TWRP image, so recovery is replaced. (Rebooted I guess.)
III. Then wiped previously LineageOS installation and, flashed the LineageOS zip file with patched boot image and GApps and rebooted to system.
IV. After setting up, install Magisk, let is do its thing.
V. I installed "Root Checker Basic" in order to check I gained root checker. It was a PASS! And checked with "Sensor Test" if all sensors worked, they did! And sound also worked .
Yay!
Clearly, all of this can be optimized. Some questions remain, what steps are really necessary and I am also still wondering how to apply a LineageOS update... Anyhow at least it is working.
What resolved
Xandros Darkstorm said:
For some odd reason Magisk breaks auto-rotation and sets selinux to permissive on boot after updating to 25.2 (from 25.1).
This is not the first time Magisk messes up Selinux rules. I usuall solved this by making a fresh OS install already with patched boot and by installing the managing app afterwards.
However, this time autorotation stopped working for some reason. And when i try to uninstall Magisk using its app -- OS no longer boots, as if it fails to restore initial boot image.
This selinux problem began since v25.
I use latest official build of Lineage OS 18.1. I have TWRP installed, which i use to install LineageOS.
What am i doing wrong? Has anyone experienced such issues?
Click to expand...
Click to collapse
What fixed this for me is after re-flashing stock in Odin to get everything working again, just rename the magisk apk to install.zip and flash that in twrp, and open the magisk app once booted, no other steps needed for install, no image patching or anything.
Might be worth seeing if this is the same issue or if there's a more fundamental problem with 25.2
Hi,
I stumbled upon this thread while searching for a way to install Magisk on a S5e.
Following the guide here: https://wiki.lineageos.org/devices/gts4lvwifi/install I already unlocked the bootloader, flashed vbmeta.tar with Odin, flashed lineage-19.1-20221114-recovery-gts4lvwifi.img with Odin and flashed lineage-19.1-20221114-nightly-gts4lvwifi-signed.zip with TWRP-recovery.
Lineage is working fine, but I would also like to use Magisk.
I understood, that the order I follwed is not the recommended order for having both Magisk and Lineage. At least, that is, what you described at the beginning of your post.
But as with your last part you mentioned, that there where issues with sensors, ...
And the solution was to
I. Replace recovery with a patched boot.img of Lineage zip and wipe a prev. Lineage installation
I guess, I might be able to stiull do that though I already have Lineage on the S5e (currently with Lineage/TWRP recovery), right?
I can patch the boot.img from within lineage-19.1-20221114-nightly-gts4lvwifi-signed.zip with Magisk app, right?
Or would I have to patch lineage-19.1-20221114-recovery-gts4lvwifi.img
Is there anything to consider, when zipping the image with the patched boot.img again?
Which TWRP image did you choose to be flashed at step II.?
Barium said:
I. I extracted "boot.img" from the LineageOS zip file, patched it via Magisk (ramdisk is added to the boot image) and replaced the "boot.img" in the zip file with 7-Zip.
II. Booted into TWRP, flashed an original TWRP image, so recovery is replaced. (Rebooted I guess.)
III. Then wiped previously LineageOS installation and, flashed the LineageOS zip file with patched boot image and GApps and rebooted to system.
IV. After setting up, install Magisk, let is do its thing.
V. I installed "Root Checker Basic" in order to check I gained root checker. It was a PASS! And checked with "Sensor Test" if all sensors worked, they did! And sound also worked .
Yay!
Clearly, all of this can be optimized. Some questions remain, what steps are really necessary and I am also still wondering how to apply a LineageOS update... Anyhow at least it is working.
Click to expand...
Click to collapse
Thanks
If this is also a solution, can you please let me know, if there is anyhting to consider, when flashing the stock (got it from SAMMOBILE)? Can the lineage-19.1-20221114-recovery-gts4lvwifi.img still be left on the tab?
After re-flashing the stock, I guess you flashed lineage again, right?
Or did you stay with the stock and just flashed magisk (after renaming the apk to zip)?
Thanks
TheTofu said:
What fixed this for me is after re-flashing stock in Odin to get everything working again, just rename the magisk apk to install.zip and flash that in twrp, and open the magisk app once booted, no other steps needed for install, no image patching or anything.
Click to expand...
Click to collapse
I dared patching the TWRP recover for S5e and flashed it via Odin (AP).
S5e boots up in Lineage, Magisk is working fine.
But when I power off the tablet or restart, Lineage Recovery shows up telling me, that my data would be corrupt.
My only options are to try again or to do a factory reset.
Only way out of this is to re-flash the above mentioned recovery image again.
So how do I get the Magisk patched TWRP recovery permanent?
I wiped system? and re-flashed Lineage via TWRP, got "original" TWRP Recovery for S5e Magisk permanent.
I have to admid, I tried several things and got lucky I did not break something.
I had nearly, what I wanted - TWRP, Lineage and Magisk, but there were issues with the sensors (no auto rotate).
Again I helped myself:
1) flashed the original, unpatched TWRP Recovery for S5e
2) flashed unpatched Lineage for S5e
3) flashed MindTheGapps
4) flashed Magisk-v25.2.apk
No bootloop, original TWRP permanent, Magisks working fine, no issues with sensors.
Tried steps 1, 2 and 4 with the Lineage Recovery and it worked too.

Root not working after flashing Magisk patched boot.img on Samsung GT-I9300

It's a bit of an older phone but I cannot get root properly working on my Samsung GT-I9300 using Magisk. I need Magisk to hopefully get some banking apps working again on my LineageOS 17.1 custom ROM. I downloaded Magisk v25.2 (Latest) from github, patched the boot.img from the installed ROM: lineage-17.1-20200717-UNOFFICIAL-i9300.zip, all with no errors.
Instead of using fastboot I renamed the patched magisk_patched-25200_eb1Em.img to boot.img and created a tar file from it so I can flash it with Odin3 v3.14.1.exe (AP checkbox) as I did for the twrp recovery image. After this some signs of root access are visible. Root Checker Pro even shows my device as rooted. Still it says that the su binaries are missing and Magisk keeps showing as not installed. I even tried CF-Auto-Root-m0-m0xx-gti9300.tar through odin and/or flash UPDATE-SuperSU-v2.46.zip through the installed twrp recovery but the results stay the same.
Wat can I do more to get it working?

Categories

Resources