What steps are needed to deal with Magisk and OTAs for the S9/S9+, specifically? - Samsung Galaxy S9+ Questions & Answers

So, there are a few different methods to deal with Magisk when you want an OTA - but the question is, just how far do we have to go when it comes to the S9/S9+?
Will OTAs fail if you have TWRP installed? Will OTA's fail if you've ever done anything to your system partition? (I've installed an app and converted it to a system app)
If they're really not that sensitive, then my understanding of the procedure is this:
1. Uninstall the Magisk Manager app as well as any apps you installed and converted to system apps.
2. Boot to TWRP and flash the Magisk Uninstaller.
3. Boot normally.
4. Re-enable updates in Developer Options and check for the OTA update.
5. Let the OTA finish updating.
6. Boot to TWRP and flash the Magisk Installer.
Can someone tell me if my procedure is correct, or if not, what I'm missing?
Thanks!

Related

Magisk using flashfire thoughts.

I'm no developer by any means, first thing. Just spit balling some thoughts for others to possibly make reality. If you were to install the stock unrooted software via zip. Followed by Magisk. Would this satisfy Magisk requirements for unrooted software? While allowing Flashfire to install Magisk directly behind the rom before the reboot? If I knew how to make a zip from the stock tar I would try this on an old s4 I have. But again I only dabble in this stuff so im pretty green.
magisk can hide root but not xposed with supersu.
Reason: pphson's superuser requires a modified boot.img, which will fail on this device.
I have the same problem. I have an S6 Edge without a custom recovery so I can't install Magisk since you can only install it by flashing it through recovery.

[GUIDE] ROOT+XPOSED+SAFETYNET at the same time on Stock and stock based ROMs

This guide provides all the steps and patches required to root the Stock system and having Xposed installed while maintaining SafetyNet (Android Pay, Pokemon Go, etc) compatibility. There are some problems of this method that Magisk is supposed to fix, however the latest Magisk v10 is not supporting our stock ROM yet.
The prerequisites of this guide is to have the bootloader unlocked and TWRP recovery.
DOWNLOADS
The recipe require the following ingredients to be downloaded to your internal or external storage:
1. TWRP 3.0.3 (This is the last release at this moment). more info in the Official Thread. Thanks to @jcadduono . TWRP 3.0.2 can't succesfully flash SuperSU 2.79
2. Default Stock ROM for your phone (Required only if you have modified your system or boot partition). You can download them from this thread. Thanks to @DrakenFX . You can alsouse any other custom ROM based on stock such as ZADMix or HelsAx7 SubMix (both tested).
3. SuperSU v2.79. more info in its official thread.
4. SUhide 0.55. More info in its official thread. Thanks to Chainfire.
5. SafetyNet-KCAL Kernel patch, thanks to @jcadduono also for this one!
6. Xposed v86.2 So far only this version is compatible with SUhide.
7. Material Design Xposed Manager app by DVDandroid. More info about this release in its official thread.
8. Root Switch 1.3.3.2 app. Thanks to shakalaca. More info in its official thread.
INSTALLATION
1. Do a backup of your system, I recommend Boot+System+Data partitions. The next steps will modify at least your boot and data partitions, and some Xposed modules will modify also your system partition.
2. If you already have TWRP 3.0.3 then just boot to recovery and proceed to step 3. If you are still using TWRP 3.0.2 please upgrade to the latest TWRP 3.0.3 and reboot to recovery again.
3. I recommend to flash the default Boot and System Partitions and reboot directly to recovery. You can also use any other custom ROM based on the stock ROM such as ZADMix or HelsAx7.
4. All this step must be done without leaving TWRP. Flash SuperSU 2.79 adding also the zips for SUhide 0.55, Xposed v86.2 and the SafetyNet Kernel patch in that order. They must be flashed together. Without leaving TWRP, navigate from the main menu to Advanced > Terminal, introduce the command reboot disemmcwp and the system will reboot by itself once or twice while configuring the settings for SuperSU. Do not be alarmed.
5. Install Xposed Manager and Root Switch apps.
6. Now you have your system fully rooted and you can now install Xposed modules. However you will see the test app SafetyNet Helper reporting a validation failure. Do not worry about it anymore! When you want to initiate a SafetyNet sensitive application (Android Pay or Pokemon Go among others), just open Root Switch and disable root, no need to reboot. SafetyNet will pass and all your apps will work. You can see that Xposed continue working even after disabling root since it was started before. Do not forget to enable root again otherwise new apps requiring root won't load.
Magisk v10+ promises auto root hide per app, but sadly our stock ROM is not yet supported and the method psoposed here requires the user to disable root before loading any SafetyNet protected app.
Enjoy
Reserved for future Magisk guide.
Has anyone managed to get this working on A2017G/B09? I've had a few attempts, forcing systemless SuperSU, but it hangs at the "AXON" boot screen
H0lmEd said:
Has anyone managed to get this working on A2017G/B09? I've had a few attempts, forcing systemless SuperSU, but it hangs at the "AXON" boot screen
Click to expand...
Click to collapse
At what point of the guide is it hanging at the Axon boot screen? after step 4? Have you ensured that the SafetyNet patch is the last thing you flashed before boot?
I just did this on my B29 A2017U phone and it worked perfectly, can switch root on and off with the root switcher and Safetynet passes fully with root set to off.
My previous attempts were all thwarted by the bootloader being unlocked, so that patch to the kernel works great. I'll be backing this up with twrp and getting a little more adventurous (really want to try the BeastMode kernel) soon.
Much thanks for making it nice and simple, Oki !
Oki said:
At what point of the guide is it hanging at the Axon boot screen? after step 4? Have you ensured that the SafetyNet patch is the last thing you flashed before boot?
Click to expand...
Click to collapse
I'm on the same configuration (A2017G B09). I did a step by step installation/reboot/installation/reboot. The Problem is with suhide. After installing suhide the boot process will stick in the Axon screen.
tron1 said:
I'm on the same configuration (A2017G B09). I did a step by step installation/reboot/installation/reboot. The Problem is with suhide. After installing suhide the boot process will stick in the Axon screen.
Click to expand...
Click to collapse
You do not have to reboot after SUhide. The files at step 4 have to be flashed together without leaving TWRP otherwise it won't work.
Oki said:
You do not have to reboot after SUhide. The files at step 4 have to be flashed together without leaving TWRP otherwise it won't work.
Click to expand...
Click to collapse
In theory you're right. But how do like a bugfix to be done if you don't know at which point you're failing?!?
tron1 said:
In theory you're right. But how do like a bugfix to be done if you don't know at which point you're failing?!?
Click to expand...
Click to collapse
The last patch fixes some problems created by SuperSU, SUhide and Xposed. This is why all the patches in step 4 have to be flashed together without leaving TWRP and in the specified order, otherwise it wont work on stock ROMs.
That looks way complicated. What's wrong with the easy way of flashing Magisk V10 + Phh Superuser r266? This has worked on all my devices since the November security patch broke suhide. Magisk now takes care of the flag to hide bootloader unlock status so no need for a kernel patch too. Then flash systemless Xposed by topjohnwu if you want that and you can turn it on and off in Magisk Manager if you want to use Android Pay, play Pokemon Go, etc.
Hi,
I have a A2017G running B08, already unlocked and witch SuperSU 2.79. Just the older version of TWRP.
Can I just upgrade the TWRP and proceed with step 4 and so on? Hate to go back to stock...
Tia,
Cheers,
/Cacti
Tikerz said:
That looks way complicated. What's wrong with the easy way of flashing Magisk V10 + Phh Superuser r266? This has worked on all my devices since the November security patch broke suhide. Magisk now takes care of the flag to hide bootloader unlock status so no need for a kernel patch too. Then flash systemless Xposed by topjohnwu if you want that and you can turn it on and off in Magisk Manager if you want to use Android Pay, play Pokemon Go, etc.
Click to expand...
Click to collapse
For some reason Magisk is not compatible with the Axon 7 kernel. Not yet. This is why it is so complicated and requires a guide. Last time I tested this was yesterday using Magisk v10.2 and phh Superuser r2, and they still failed to root the system.
le_cactus said:
Hi,
I have a A2017G running B08, already unlocked and witch SuperSU 2.79. Just the older version of TWRP.
Can I just upgrade the TWRP and proceed with step 4 and so on? Hate to go back to stock...
Tia,
Cheers,
/Cacti
Click to expand...
Click to collapse
Yes you can try to begin with step 4 with SUhide on. It should work. However I recommend you to upgrade to TWRP 3.0.3 and do the whole step 4.
Gr8. Thanks.
Cheers,
/Cacti
Oki said:
The last patch fixes some problems created by SuperSU, SUhide and Xposed. This is why all the patches in step 4 have to be flashed together without leaving TWRP and in the specified order, otherwise it wont work on stock ROMs.
Click to expand...
Click to collapse
Not quite sure I understand you.
I've tried doing this on A2017g, b09;
0) wipe data/system/boot
1) flash stock Boot stack + System stack zips in twrp 3.0.3 unlocked bl
2) rebooted straight to recovery
3) flashing SuperSU wrote to system so I had to start again but forcing systemless (in terminal; echo "SYSTEMLESS">/data/.SuperSU
4) flash supersu, suhide
5) flash xposed
6) flash the safety net/kcal patch
7) reboot
And I still get stuck on "AXON" boot screen
H0lmEd said:
Not quite sure I understand you.
I've tried doing this on A2017g, b09;
0) wipe data/system/boot
1) flash stock Boot stack + System stack zips in twrp 3.0.3 unlocked bl
2) rebooted straight to recovery
3) flashing SuperSU wrote to system so I had to start again but forcing systemless (in terminal; echo "SYSTEMLESS">/data/.SuperSU
4) flash supersu, suhide
5) flash xposed
6) flash the safety net/kcal patch
7) reboot
And I still get stuck on "AXON" boot screen
Click to expand...
Click to collapse
SuperSU 2.79 installs in systemless mode, no need to set systemless.
Regarding your problem, please try this. Instead of rebooting using the button, open the terminal in TWRP and type "reboot disemmcwp". I hope this was your problem.
This doesn't work for me. Steps:
1. complete wipe
2. install b29 boot stack
2. install b29 system
3. install super su 2.79
4. install su hide 0.55
su hide comes back with an error that says it can't find super su and I should make sure I've installed 2.79 or greater.
edit:
I missed the part in step 3 where you say "reboot directly to recovery". I tried that, but it rebooted to system instead and now I lost TWRP entirely.
edit2:
fastboot flashed twrp again and once in recovery I was able to get through step 4
edit3:
Now it's just stuck on the axon logo. Tried force reboot and the same thing.
Are you sure you tested this from scratch? I have the US version of the axon 7.
Oki said:
SuperSU 2.79 installs in systemless mode, no need to set systemless.
Regarding your problem, please try this. Instead of rebooting using the button, open the terminal in TWRP and type "reboot disemmcwp". I hope this was your problem.
Click to expand...
Click to collapse
I have tried it and am stuck on the same stage also even after using "reboot disemmcwp".
I followed all of your steps and am using an A2017G B08.
corpdecker said:
I just did this on my B29 A2017U phone and it worked perfectly, can switch root on and off with the root switcher and Safetynet passes fully with root set to off.
My previous attempts were all thwarted by the bootloader being unlocked, so that patch to the kernel works great. I'll be backing this up with twrp and getting a little more adventurous (really want to try the BeastMode kernel) soon.
Much thanks for making it nice and simple, Oki !
Click to expand...
Click to collapse
Don't install beast mode yet, from my experience all the steps from op worked fine until I flashed beast mode and it broke safetynet.
lexman098 said:
This doesn't work for me. Steps:
1. complete wipe
2. install b29 boot stack
2. install b29 system
3. install super su 2.79
4. install su hide 0.55
su hide comes back with an error that says it can't find super su and I should make sure I've installed 2.79 or greater.
edit:
I missed the part in step 3 where you say "reboot directly to recovery". I tried that, but it rebooted to system instead and now I lost TWRP entirely.
edit2:
fastboot flashed twrp again and once in recovery I was able to get through step 4
edit3:
Now it's just stuck on the axon logo. Tried force reboot and the same thing.
Are you sure you tested this from scratch? I have the US version of the axon 7.
Click to expand...
Click to collapse
Are you using TWRP 3.0.3? SuperSU 2.79 installs fine and in systemless mode when flashed with the latest TWRP. TWRP 3.0.2 can't flash it properly.
Yes this method has been tested, not only with stock Roms, but also with ZADmix.
If you are doing a complete cleanup before flashing the ROM, boot into system at least once after installing the ROM so the data tree structure is setup. You actually don't need a full cleanup.
Kingo64 said:
I have tried it and am stuck on the same stage also even after using "reboot disemmcwp".
I followed all of your steps and am using an A2017G B08.
Click to expand...
Click to collapse
H0lmEd said:
And I still get stuck on "AXON" boot screen
Click to expand...
Click to collapse
Please ensure you have flashed the right stock ROM for your unit. I have modified Ingredient 2 in the OP since it was highly misleading. Ensure you have unlocked bootloader, TWRP 3.0.3 and flash the right ROM for your system: ZTE_A2017GV1.0.0B09_BootStack_by_tron1.zip and ZTE_A2017GV1.0.0B09_StockSystem_by_tron1.zip. And boot to the system at least once before continue to the rest of the procedure.

What is the steps of keeping TWRP and Flashing OTA through TWRP?

I have read basically all the posts here on xda related to this matter. But, being a noob in "rom,kernel, recovery" world, I need to get spoon-fed in some area. Can any kindhearted fellow answer the following questions?
1. I will always use latest official MIUI global beta rom. I need to have the MOST stable custom recovery installed all the time (preferably TWRP official if possible). I want to receive OTA and flash them via custom recovery. Can it be done? if so, what are the MOST hassle-free steps? (want to have root for sum lucky pather action)
2. What are these "encryption", "force disable encryption treble" stand for and what it means for a user like me who wants to run latest Magisk all the time with custom recovery?
3. I can manage to flash OTA and then flash magisk again if needed to maintain root status, is that all I need to do before booting into the new updated and rooted system?
If someone can explain and provide insights, that will be a great help.
1. The most hassle free to do OTA updates is to revert back to stock recovery when the update.zip package is ready to be flashed because
2. Every OTA update in MIUI will encrypt /data partition. (This is Xiaomi's standard data protection). I didn't tried to do OTA updates with Official Twrp but you can try. That is why everyone when trying to flash custom rom, flashing DFE.zip (Disable Force Encryption) will of course disables the system to encrypt data during boot.
3. Magisk has OTA survival script so when there is OTA updates, Magisk will automatically install after OTA update is finished.

Update to v11.0.6 QFJEUXM, preserve Magisk and OrangeFox (or TWRP)

Had QFJEUXM v11.0.5.0,
OrangeFox v10.1.2,
Hasty kernel,
Magisk Canary v20416
Today received OTA notification for QFJEUXM v11.0.6.0 (frankly, expected v12 but ok for now).
Did not accept OTA (System update, Automatic download disabled) but proceeded as following:
1) Downloaded full Recovery/zip firmware
https://bigota.d.miui.com/V11.0.6.0...AGlobal_V11.0.6.0.QFJEUXM_79a4386920_10.0.zip
2) Opened (in MiXPorer), copied out boot.img, patched boot.img from Magisk Manager (Preserve DM-Verity and Preserve Encryption On, Recovery Mode Off)
3) Rebooted to OrangeFox, flashed firmware zip from (1)
4) Rebooted again to OrangeFox (otherwise stock Recovery will overwrite), flashed patched_boot.img from (2)
5) Rebooted to system:
- all apps, settings and data preserved
- Magisk, modules, root grants all preserved
By (4), OrangeFox was also preserved.
Instead of OrangeFox, you can also use Official TWRP (probably Unofficial as well and likely other custom Recoveries)
Btw, Official TWRP v3.4.0 just released:
https://dl.twrp.me/davinci/
finally supporting back-up of Data if using dual apps:
https://forum.xda-developers.com/showpost.php?p=82910629&postcount=316
Updated mine today also. dowload zip, patched boot with magisk, installed zip and boot image with TWRP, looks like all is fine.
Great, thanks for the advice as I usually follow your recommendations.
Proceeded with Hasty kernel, it works fawlessly with QFJEUXM v11.0.6:
Download Hasty-davinci-Intoxicated-insider.zip from:
https://forum.xda-developers.com/showpost.php?p=82564409&postcount=119
1) Reboot to OrangeFox/TWRP and
flash the just downloaded Hasty
2) Reboot to system - Magisk Manager will show that Magisk is not installed, never mind
3) Reboot to OrangeFox/TWRP and make a Backup of Boot
4) Reboot to system and patch the just backed up boot.emmc.win
5) Reboot to OrangeFox/TWRP and flash the just patched patched_boot.img
Reboot to system and enjoy Hasty kernel (longer lasting battery) with Magisk
Step (2) could probably be skipped and therefore steps (1) and (3) merged to a single step:
Reboot to OrangeFox/TWRP and
flash Hasty, then backup Boot
This maybe a stupid question (probably is) I normally use TWRP and not that I have needed to do it yet but what are the steps for restoring a backup with OF and from reading the guide it doesn't actually explain it? I currently backup to a OTG USB stick.
thanks
brachios said:
This maybe a stupid question (probably is) I normally use TWRP and not that I have needed to do it yet but what are the steps for restoring a backup with OF and from reading the guide it doesn't actually explain it? I currently backup to a OTG USB stick.
thanks
Click to expand...
Click to collapse
With the latest official TWRP 3.4.0 I was finally able to successfully back-up Data partition (I'm using dual WhatsApp and it was failing both with TWRP and OrangeFox)
Hence you can use TWRP 3.4.0 (instead of OrangeFox as explained in post #1) and backup everything (except Cache and TWRP recovery itself) in advance - but I didn't need to restore anything (ie, didn't need to restore Data upon upgrading MIUI): all my apps, data and settings were preserved
Otherwise, I also (partially) backup things over Google and Mi account
What I was trying to say is I'm now using Orangefox and just looking how to do a restore if needed as I was using TWRP for years.
brachios said:
What I was trying to say is I'm now using Orangefox and just looking how to do a restore if needed as I was using TWRP for years.
Click to expand...
Click to collapse
There is also Backup/Restore option in OrangeFox
AFAIK, Fox uses the TWRP engine (Fox has different UI and few more options) hence it's backup (files indeed look the same) should be restorable through TWRP
I liked Fox but for now I switched to TWRP since finally being able to make full nandroid backup by TWRP 3.4.0 - hoping that Fox will be updated to the latest TWRP engine
Thanks, being comfortable with TWRP I might switch back at least I know what I'm doing.
Is there are anybody here who did upgrade to QFJEUXM v11.0.6, but who has NO Magisk (and ideally, has locked Bootloader) to check SafetyNet with the attached app, or alternatively with:
https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample
zgfg said:
Is there are anybody here who did upgrade to QFJEUXM v11.0.6, but who has NO Magisk (and ideally, has locked Bootloader) to check SafetyNet with the attached app, or alternatively with:
https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample
Click to expand...
Click to collapse
No matter if on v11.0.6 or older, if Bootloader is unlocked, CTS Profile will fail (since the last day or two) and Magisk with Magisk Hide Props Config cannot help
Seems that custom ROMs are excluded from the problem (from Google's ongoing testing)
Google is testing SafetyNet, they will hopefully turn off again that hardware backed CTS Profile attestation later:
https://groups.google.com/forum/m/#!msg/safetynet-api-clients/lpDXBNeV7Fg/Ov2H6ZvhBQAJ
But nobody knows when they can enforce for real and forever, affecting Google Play Device certification and Google Pay
zgfg said:
No matter if on v11.0.6 or older, if Bootloader is unlocked, CTS Profile will fail (since the last day or two) and Magisk with Magisk Hide Props Config cannot help
Click to expand...
Click to collapse
Use e.g. Magisk Hide Props Config module for Magisk and chose the option to delete a prop ro.product.model - reboot and CTS Profile will be using Basic attestation mode, so CTS Profile and SafetyNet will pass
If Playstore shows Device is not certified,, go to Settings, Apps, enable System services, search for Google and delete Cache and Data for Google Playstore, Google Services Play and Google Services Framework
Did anyone had a successful backup>restore with TWRP v3.4.0/11.0.6?
i tried to get my backup to phone but i get the famous "extractTarFork() process ended with ERROR: 255"
EDIT: was able to get the backup back. wiped all partitions, reflashed with miflash, put the same version of miui after, then the backup worked fine, phew!

Problem after update Magisk

Hello,
yesterday I got a notification to update Magisk to v.21.3. I did it directly with Magisk Manager.
Since then I'm having problems with some apps and I notice that a new version of Magisk was release just to fix this problem.
When I try to install the v.21.4 with the Magisk Manager there is an option unchecked but I do not know if I have to check it or no.
Keep AVB 2.0/dm-verity
I do not know what is this. When I update to v.23.1 I did not have that option, was direct but now when I want to update to 21.4 from Magisk Manager I have this option and I do not know what to do.
Thanks
I assume nobody answered you because you could have just googled it.
Disable DM-Verity or Android Verified Boot without TWRP
In this tutorial, we will show you the steps to disable DM-Verity or Android Verified Boot (AVB) without using TWRP Recovery.
www.droidwin.com

Categories

Resources