A Step by Step Guide on How to Update a Samsung Galaxy S7 (SM-G930F/FD) with Magisk Installed.

I do this every so often, so I’m keeping a post here to remind myself how to do it. This guide assumes you have an Exynos S7 rooted with Magisk, and that you want to update your phone’s official firmware. I’m not going to walk you through everything, so you’ll have to know quite a bit about rooting before you read this guide. Remember to back everything up, calls, texts, media, apps, you name it. This process takes a few hours.

Obligatory disclaimer: I’m not responsible for what happens to your phone, you are. Your phone could be rendered inoperable if you choose to follow this guide. In fact you should not follow this guide, get out of here.

Things you should already have:

  • Your phone, with a battery charge of at least 70%
  • Odin
  • Team Win Recovery Project (twrp) for herolte (or hero2lte for Edge) or an alternative custom recovery zip
  • no-verity-opt-encrypt-5.1, a script in the form of a .zip which you should have used when flashing Magisk for the first time
  • The Magisk zip you want to re-flash, or preferably the most recent version
  • The Magisk uninstaller zip
  • Your chosen region’s update firmware files
  • A USB cable.

Magisk XDA thread to download Magisk files from: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

Here’s a step by step guide, now that you have everything you need:

Step 1: Readying the Resources

http://updato.com/firmware-archive-select-model?q=GALAXY+S7

From this link, you’ll need to find the firmware version you desire. For example, the firmware code I’ll use is BTU, which matches my desired phone region. An alternative site would be Sammobile. No matter what website you choose; it will take hours to download the firmware, so be prepared for that. The Edge has separate firmware, so don’t mix them up.

Move the no-verity patch, the magisk zip, and the magisk uninstaller zip onto your phone using a file-transfer method through USB. Move them to the SD card, not the internal memory. Your phone’s internal memory will be unreadable after you flash a custom recovery, so you must use an SD card.

12

12

 

Now you’ve got the zip files on your phone ready to use later. Once done, unplug your phone from the USB cable.

Double-check you have all of your resources. Preferably organised in a folder on your computer. You WILL need to re-flash TWRP (or an alternative recovery) once your phone has been updated, so don’t skip on that even though you already have it installed on your phone. This is because everything on your phone, including the recovery, is overwritten by the firmware flash, apart from your personal data if we use HOME_CSC (hopefully, friendly reminder to backup). However we will not be using HOME_CSC, we have to use CSC instead because updating a rooted phone and retaining user data causes it to soft brick.

For reference, this is how the folder looks on my PC:

et phone hom

In my folder, I have an additional folder; my old firmware. This isn’t required for what we’re doing now though.

Inside the fully-downloaded firmware folder looks like:

et phone hom2

If your files do not look like this, double-check that you’ve gathered everything you need.

Step 2: Removing Magisk (We’ll install it again at the end)

Check that

Boot your S7 into recovery by having your phone fully turned off, then holding the “Volume UP + Power + Home” buttons simultaneously until you see the Samsung boot logo. You should now be on your recovery screen (if you have stock recovery, you have come to the wrong guide).

Important: if you never flashed the no-verity patch when you first rooted using Magisk, removing Magisk will soft-brick your phone. If this applies to you; you can either skip this step, or take the risk. If this doesn’t apply to you, carry on.

From recovery, go to install, then you should find your Magisk-uninstaller zip where you saved it. It may take some navigating. Find it and flash that bad boy. If all went well, which it did for me, your phone is now unrooted. If you see any red messages, try again. If it persists, I’m afraid you’ll probably need to factory reset and restore your backed up data. A more simple way of removing Magisk is to do it from the Magisk manager app itself, but since we want to do the job properly, we flashed the zip. Tap on reboot system.

If all went well, your phone turns back on normally but now it doesn’t have Magisk installed. Turn your phone back off, it’s about to get real.

Step 3: Flashing the New Firmware

Open up Odin on your computer. For better measure, you can right-click the program and select “Run as administrator”. As you already have Magisk on your phone, you must be thinking “hello darkness my old friend”, being familiar with Odin.

You need to unzip the firmware file before you put any of the files into Odin, so make sure you’ve done that before carrying on.

You should be seeing this interface:

odeein

Click on BL and it’ll open a windows explorer window. Navigate to the firmware folder you saved and select corresponding MD5 hash file with the prefix “BL”:

ballz

 

 

 

 

 

Now it’s been selected under the BL tab:

ballz2

Do the exact same for the other tabs by selecting their corresponding prefix from the firmware folder except from the CSC file. i.e. the AP file goes in the AP tab and the CP file goes in the CP tab. The program might stutter a bit as it checks the files.

For the CSC tab, you want to do something slightly different. Do not select the HOME_CSC file. Instead, select the similar “CSC” file.

Remember, if you use the HOME_CSC file instead of the normal CSC file, your phone will soft brick when the new firmware is flashed. Do not try it. Backup and reinstall your user data.

At this point you should be seeing something like this:

32523532

Your phone should still be off, if it isn’t then turn it off. Hold down the Volume DOWN + Power + Home” buttons to enter the firmware download screen.

Press “Volume UP” to confirm. Now plug your phone back into the USB cable, this is the moment of truth. In the log, something similar to “<ID:0/004> Added!!” should appear, showing that the program has recognised your phone plugging in. The number that appears on your screen may differ.

Do not change anything in the options, these should be the default settings:

opts

Press “Start” and the firmware download process will begin. This takes a few minutes, so make sure you don’t accidentally unplug the phone in the process.

Step 4: Making Sure the New Firmware Works

Once completed, you should be seeing this:

ye boi

At this point, it’s safe to disconnect your phone and close Odin if you so wish, but we’ll be needing it again in a second. Your phone should also display a few update screens, let it do its thing. It can take up to 15 minutes and get hot to the touch so be VERY patient. If your phone has not left the boot screen for half an hour, then it’s time to worry and you will likely have to enter recovery and factory reset. Luckily, that’s the reason we backed up.

The reason we turn on the phone again is so that we can confirm the phone is still working as it should before we root it again. It also gives it a chance to completely finish the update process before we flash anything again.

Step 5: Re-flashing the Custom Recovery

Once you’ve confirmed everything is still where it should be, you can install the custom recovery again. If for some reason your phone was wiped, you need the no-verity patch and the magisk zip stored on your phone somewhere.

In this guide we’re using TWRP, but other custom recoveries work as well. Turn off your phone and run Odin again. On Odin, place your TWRP tar file into the AP slot and disable Auto Reboot in the options.

buyacka

Put your phone into download mode once more by turning it off, then holding down the Volume DOWN + Power + Home” buttons until it enters the download screen. Press the “Volume UP” button to confirm. Plug it into the PC via USB again. The log should say “<ID:0/004> Added!” as before. Press Start.

Once you see “<OSM> All threads completed. (succeed 1 / failed 0)”: Hold “Volume DOWN” + “Power” + “Home” to exit download mode and whilst holding all the buttons, immediately swap from “Volume DOWN” to “Volume UP” when the screen turns black. Continue holding until the recovery screen appears, for good measure.

If the TWRP recovery screen doesn’t appear, try turning the phone off and then holding “Volume UP + Power + Home”.

On the latest version of TWRP, you should swipe right to allow modifications. Then navigate to Install. The rest is yours.

Notes

  • Do not “restore stock boot image” if your phone asks
  • using the home_csc does not delete user data, but you should use csc as using home_csc will cause your phone to bootloop and you will have to flash stock Android again
  • Google Pay will reset
  • yes disable dm-verity using the patch
  • edit build.prop file lines to: ro.config.tima=0 AND wlan.wfd.hdcp=disable
  • ‎Rename the following file /system/lib/liboemcrypto.so to /liboemcrypto.so.bak
Advertisements