[GUIDE] Repair, Unbrick, Unroot, Re-lock Bootloader and Flash stock firmware in Samsung Devices | XDA Forums

[GUIDE] Repair, Unbrick, Unroot, Re-lock Bootloader and Flash stock firmware in Samsung Devices

Was this guide helpful to you?


  • Total voters
    39
Search This thread

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
Welcome to this easy guide.

Time needed: 15 / 60min (depends on your internet connection)
Ease of operation: Very easy
Don't be fooled by the length of this guide ... the operations to be done are quick and easy.

NB: I state immediately that this procedure does not restore the state of Knox to 0x0 if by chance you have brought it to 0x1.
To date, this is an irreversible process.

In the next lines we will see how to restore our Samsung device to its original factory conditions, after unlocking the Bootloader, rooting and installing various types of custom installations, such as custom OneUI, AOSP or Google ROM.
It may happen that you want to go back to the original firmware of our Samsung, after trying various custom ROMs, after having rooted and modified the recovery, missing with the phone partitions, lost EFS folder or corrupt IMEI. The reasons can be many. This guide is aimed at all those who, with the classic Odin procedure to install the stock rom, are unable to restore the phone to normal operating conditions.

But it can happen to fail in this thing, even using Odin to put back the original software, Odin himself or the phone can crash to the BOOT partition or generate other errors, with VBMeta or generic errors, including partition ones.
So let's see how to solve all the inconveniences due to modding on our Samsungs to 99%. Let's begin!

- MATERIAL REQUIRED:
Latest version of Frija link
Latest version of Odin link
Samsung USB Driver link
File Manager zip (example 7zip) link

PC with Microsoft Windows 7-8-8.1-10-11
USB type C cable

1 - Download the latest stock firmware for our Samsung:
Download the latest version of Frija and once the program has started, enter the model code of your device and the abbreviation of your CSC.
Make sure the "Auto" checkbox is checked.
Once you have checked everything, click on "Check Update" and click on "Download". Wait for it to download.
Immagine 2022-06-01 171858.png


Once you have downloaded the zip containing the various parts that make up the stock software (see image below), extract it to a folder of your choice. We will have 5 files in total.
Immagine 2022-06-03 095805.png


2 - Retrieve the original PIT file
To recover the PIT file (partition list) for our device, go to the firmware folder you just downloaded with Frija, locate the "tar.md5" file with the words CSC_OXM_N............., right click on the it and select rename, adding ".zip" at the end to "transform" it into a compressed file that can be opened. This way you will have something like
"CSC_OXM_N975...............REV01_user_low_ship.tar.md5.zip"
Give the Ok and confirm the change of the file extension.
You should now have the same situation as you see in the image below. Total 5 files of which one is a ".zip" files.
Immagine 2022-06-03 100700.png


Now open the file you just renamed with 7zip, the main window of the 7zip program will open with various files inside:
Immagine 2022-06-01 164656.png


Now copy the "D2S_EUR_OPEN.pit" file by right clicking and selecting the "copy to ..." item and giving the ok without changing anything. The .PIT file will be copied to the same folder as the previously downloaded firmware.
Immagine 2022-06-03 144208.png


Once this is done, the folder that appears will look like this (Now, the total files are 6 of which one is a ".zip" files):
Immagine 2022-06-03 144301.png


Now just put the CSC_OXM ... file back to the previous condition, renaming it one more time and eliminating the ".zip" extension at the end of the name, in order to find an MD5 file again. This will be the file we will have:
"CSC_OXM_N975...............REV01_user_low_ship.tar.md5."

Now we have everything we need. If we have done everything correctly this is the final result (Total 6 files).
Immagine 2022-06-03 101134.png


3 - Prepare and Configure Odin
Now open the latest version of Odin (as of May 2022 the latest version is 3.14.4), load the corresponding downloaded firmware files in the various slots (BL, AP, CP and CSC) as usual.
In the CSC box, upload the file labeled "CSC_OXM_N975 ............... REV01_user_low_ship.tar.md5."

Did you know that....
The CSC_OXM file is used to restore the internal memory as factory, this will delete all personal data in the phone memory, all applications and data associated with it.
The HOME_CSC_OXM file, on the other hand, will not act in any way on the internal memory. Useful if you want to update while remaining in the same type of ROM. Not recommended if your phone has a Custom ROM installed, as it may not start or give errors in previously installed applications.
If you want to do a clean install of the original ROM, always use the CSC_OMX file!

Once this is done, move (still in Odin) to the "Option" tab and check the following items:
Auto Reboot
Nand Erase
Re-partition
F. Reset time

The rest of the items MUST NOT BE SELECTED!
Immagine 2022-06-01 165607.png


Again in Odin, this time go to the PIT tab, a warning message will appear, give the ok and select the first extracted file which has the unique name "D2S_EUR_OPEN.pit"
If you have done everything right you should have the same situation as the image below:
Immagine 2022-06-01 165643.png


Immagine 2022-06-01 165724.png


4 - Return the phone to the original firmware
Connect the USB type C cable to your phone and restart your phone in "Download mode" (check the right combination for your model), or use the Custom Rom to do this, usually all coustom roms or custom recovery offer reboot in Download mode (or Booloader).
In odin in the "Log" tab, you should see the word "Added" with the number of the port to which it is connected (example "0: [COM3]"), if so, press the START key of Odin and wait for the restart (this procedure will delete all data on your device).
If nothing appears, install the Samsung USB drivers and repeat step 4.
Immagine 2022-06-01 165804.png


5 - Relock the BootLoader
To get rid of that fatal warning message when starting the phone that tells us that the BootLoader is unlocked once and for all, let's put it back in place, relocking the BootLoader.
galaxy-magisk-bootloader-513x1024.jpg

(Image for demonstration purposes)

Turn off the phone, reconnect the USB cable and immediately press the Volume + and Volume- keys at the same time.
Return to Download mode (albeit a little different), with various options (actually only 3).
In this case, follow the second option (Volume up long press: Device unlock mode) hold down the Volume + key for a few moments until the message "Lock Bootloader?" Appears. To confirm everything, make a single click on Volume + (also in this case the phone will be formatted by the system again) and wait for a complete restart.

6 - Relock OEM (optional but recommended if you want to stick with the Samsung ROM)
Once your phone has restarted and the initial setup is complete, you can also disable the OEM unlock capability and reuse the security features.
To do this, go to Settings / Phone Information / Software Information and tap several times on the wording "Build version" in order to unlock the "Developer options". If prompted, unlock your smartphone with your PIN or sign.
Now go back to the main Settings page, open the Developer Options and check that the "OEM Unlock" item is disabled, otherwise disable it and restart the device.
OEM.png


Well now you have your Samsung with Original firmware again. Enjoy
 
Last edited:

RedSpikeJr

Senior Member
Oct 4, 2019
62
20
Welcome to this easy guide.

Time needed: 15 / 60min (depends on your internet connection)
Ease of operation: Very easy
Don't be fooled by the length of this guide ... the operations to be done are quick and easy.

NB: I state immediately that this procedure does not restore the state of Knox to 0x0 if by chance you have brought it to 0x1.
To date, this is an irreversible process.

In the next lines we will see how to restore our Samsung device to its original factory conditions, after unlocking the Bootloader, rooting and installing various types of custom installations, such as custom OneUI, AOSP or Google ROM.
It may happen that you want to go back to the original firmware of our Samsung, after trying various custom ROMs, after having rooted and modified the recovery, missing with the phone partitions, lost EFS folder or corrupt IMEI. The reasons can be many. This guide is aimed at all those who, with the classic Odin procedure to install the stock rom, are unable to restore the phone to normal operating conditions.

But it can happen to fail in this thing, even using Odin to put back the original software, Odin himself or the phone can crash to the BOOT partition or generate other errors, with VBMeta or generic errors, including partition ones.
So let's see how to solve all the inconveniences due to modding on our Samsungs to 99%. Let's begin!

- MATERIAL REQUIRED:
Latest version of Frija link
Latest version of Odin link
Samsung USB Driver link
File Manager zip (example 7zip) link

PC with Microsoft Windows 7-8-8.1-10-11
USB type C cable

1 - Download the latest stock firmware for our Samsung:
Download the latest version of Frija and once the program has started, enter the model code of your device and the abbreviation of your CSC.
Make sure the "Auto" checkbox is checked.
Once you have checked everything, click on "Check Update" and click on "Download". Wait for it to download.
View attachment 5628035

Once you have downloaded the zip containing the various parts that make up the stock software (see image below), extract it to a folder of your choice. We will have 5 files in total.
View attachment 5629259

2 - Retrieve the original PIT file
To recover the PIT file (partition list) for our device, go to the firmware folder you just downloaded with Frija, locate the "tar.md5" file with the words CSC_OXM_N............., right click on the it and select rename, adding ".zip" at the end to "transform" it into a compressed file that can be opened. This way you will have something like
"CSC_OXM_N975...............REV01_user_low_ship.tar.md5.zip"
Give the Ok and confirm the change of the file extension.
You should now have the same situation as you see in the image below. Total 5 files of which one is a ".zip" files.
View attachment 5629261

Now open the file you just renamed with 7zip, the main window of the 7zip program will open with various files inside:
View attachment 5628037

Now copy the "D2S_EUR_OPEN.pit" file by right clicking and selecting the "copy to ..." item and giving the ok without changing anything. The .PIT file will be copied to the same folder as the previously downloaded firmware.
View attachment 5629463

Once this is done, the folder that appears will look like this (Now, the total files are 6 of which one is a ".zip" files):
View attachment 5629465

Now just put the CSC_OXM ... file back to the previous condition, renaming it one more time and eliminating the ".zip" extension at the end of the name, in order to find an MD5 file again. This will be the file we will have:
"CSC_OXM_N975...............REV01_user_low_ship.tar.md5."
Now we have everything we need. If we have done everything correctly this is the final result (Total 6 files).
View attachment 5629265

3 - Prepare and Configure Odin
Now open the latest version of Odin (as of May 2022 the latest version is 3.14.4), load the corresponding downloaded firmware files in the various slots (BL, AP, CP and CSC) as usual.
In the CSC box, upload the file labeled "CSC_OXM_N975 ............... REV01_user_low_ship.tar.md5."



Once this is done, move (still in Odin) to the "Option" tab and check the following items:
Auto Reboot
Nand Erase
Re-partition
F. Reset time

The rest of the items MUST NOT BE SELECTED!
View attachment 5628039


Again in Odin, this time go to the PIT tab, a warning message will appear, give the ok and select the first extracted file which has the unique name "D2S_EUR_OPEN.pit"
If you have done everything right you should have the same situation as the image below:
View attachment 5628043

View attachment 5628045

4 - Return the phone to the original firmware
Connect the USB type C cable to your phone and restart your phone in "Download mode" (check the right combination for your model), or use the Custom Rom to do this, usually all coustom roms or custom recovery offer reboot in Download mode (or Booloader).
In odin in the "Log" tab, you should see the word "Added" with the number of the port to which it is connected (example "0: [COM3]"), if so, press the START key of Odin and wait for the restart (this procedure will delete all data on your device).
If nothing appears, install the Samsung USB drivers and repeat step 4.
View attachment 5628041

5 - Relock the BootLoader
To get rid of that fatal warning message when starting the phone that tells us that the BootLoader is unlocked once and for all, let's put it back in place, relocking the BootLoader.
View attachment 5629449
(Image for demonstration purposes)

Turn off the phone, reconnect the USB cable and immediately press the Volume + and Volume- keys at the same time.
Return to Download mode (albeit a little different), with various options (actually only 3).
In this case, follow the second option (Volume up long press: Device unlock mode) hold down the Volume + key for a few moments until the message "Lock Bootloader?" Appears. To confirm everything, make a single click on Volume + (also in this case the phone will be formatted by the system again) and wait for a complete restart.

6 - Relock OEM (optional but recommended if you want to stick with the Samsung ROM)
Once your phone has restarted and the initial setup is complete, you can also disable the OEM unlock capability and reuse the security features.
To do this, go to Settings / Phone Information / Software Information and tap several times on the wording "Build version" in order to unlock the "Developer options". If prompted, unlock your smartphone with your PIN or sign.
Now go back to the main Settings page, open the Developer Options and check that the "OEM Unlock" item is disabled, otherwise disable it and restart the device.
View attachment 5629493

Well now you have your Samsung with Original firmware again. Enjoy
Hi there. I tried it and didn't work for me.
Tried with differents CSC too, but my phone doesn't start the system. Just starts the download and recovery mode
It doesn't even show up the charging screen when powered off

Tried so many things and I can't boot my system...
I made a post with the info about what happened:


Please help...
 
  • Like
Reactions: Anty666

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
Ok, tell me where you get stuck ... or can you follow the whole guide but then the phone doesn't start?
Is the model number of your Note10+ is SM-N975F?
What original CSC did you have before you root?
Hi there. I tried it and didn't work for me.
Tried with differents CSC too, but my phone doesn't start the system. Just starts the download and recovery mode
It doesn't even show up the charging screen when powered off

Tried so many things and I can't boot my system...
I made a post with the info about what happened:


Please help...
 

RedSpikeJr

Senior Member
Oct 4, 2019
62
20
Ok, tell me where you get stuck ... or can you follow the whole guide but then the phone doesn't start?
Is the model number of your Note10+ is SM-N975F?
What original CSC did you have before you root?
I followed the full guide, but I got stuck after flashing the firmware in Odin. It shows the screen of "Erasing data", and after that, nothing more
Even after locking again the bootloader
And yes, I ticked what's needed in Odin and used the .pit file

My model it's SM-N975F

The original CSC it's ZTO. Flashed the latest firmware
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
Ok so with Odin it didn't give you any problem. Let's say he freezes when he does the first boot that does the factory reset. Right?
Well odd, because once the original firmware is installed, I don't see why it should crash on boot ... unless there is a hardware problem in the phone's internal memory.
I know it may sound trivial, but the usb cable you use is good and did you use the latest version of Odin?
Have you checked maybe if the internal memory is right for you. If it is 256Gb or 512Gb
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
You could try this, if you see that it does not start try to enter the recovery (the original one) and delete everything you can, like cache and do a reset data directly from the recovery. Then try restarting and see if it starts.
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
If it still doesn't boot, try this thing.
Install TWRP custom recovery and enter once installed.
Go to Wipe Section in TWRP, Repair or Change partition, System and Data, and Changed Ext4 to EXTFAT. And changed back to Ext4. Eventually rerun the guide again.
 

RedSpikeJr

Senior Member
Oct 4, 2019
62
20
Ok so with Odin it didn't give you any problem. Let's say he freezes when he does the first boot that does the factory reset. Right?
Well odd, because once the original firmware is installed, I don't see why it should crash on boot ... unless there is a hardware problem in the phone's internal memory.
I know it may sound trivial, but the usb cable you use is good and did you use the latest version of Odin?
Have you checked maybe if the internal memory is right for you. If it is 256Gb or 512Gb
The USB it's the original from Samsung.
The device is 256GB
You could try this, if you see that it does not start try to enter the recovery (the original one) and delete everything you can, like cache and do a reset data directly from the recovery. Then try restarting and see if it starts.
Tried this already. Didn't work
If it still doesn't boot, try this thing.
Install TWRP custom recovery and enter once installed.
Go to Wipe Section in TWRP, Repair or Change partition, System and Data, and Changed Ext4 to EXTFAT. And changed back to Ext4. Eventually rerun the guide again.
I tried this but not in the process of "Do the format and then do the Odin process" so I can try

I'm trying now with USB OTG to know if I can flash the system.img (and know if from there I can solve this)
 
  • Like
Reactions: ExileTM

RedSpikeJr

Senior Member
Oct 4, 2019
62
20
If it still doesn't boot, try this thing.
Install TWRP custom recovery and enter once installed.
Go to Wipe Section in TWRP, Repair or Change partition, System and Data, and Changed Ext4 to EXTFAT. And changed back to Ext4. Eventually rerun the guide again.
Tried from reset data on official recovery to doing the change of format in TWRP and the doing all of the process again. No success.

Also tried with USB OTG with system, vendor, product and boot image. Neither

One thing that happened is that when trying to change the system partition to exFAT, it gave an error (system is not mounted) but changed the format to vFAT. Changing it to another option doesn't give that error, so I tried to do with another option and back to ext4.

I don't think it's a physical issue, if turns on, there is some hope at least
 
Last edited:

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
There is almost certainly a solution to your problem. (have you tried to do "format data" and typed "yes" in TWRP recovery?). Anyway, it's night at my place now, I'll see tomorrow to think of some other solution.
 

RedSpikeJr

Senior Member
Oct 4, 2019
62
20
Tried already. Also tried to format the data with fastboot (Lineage Recovery gives the option to fastboot in Samsung)
 

Titanity

Member
May 28, 2018
40
3
I have the exackt same problem with my note10+ with 256GB and dual sim. and the problem you describe is also 100% what i experienced and still have as an issue... If you get to the point where you can solve the issue then please write me my friend. I will do the same ofcourse... btw can you use your pen in TWRP? i can only mark the files but not click them to run...? i have the idea that the TWRP for our model isnt built right somehow..
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
I assume you haven't solved the problem yet. In these days I have looked around but I have not found much ...
I saw a video, which through the ADB shell a guy was able to find the list of all partitions with the numbers of all the blocks and information and practically managed to rebuild the system partition from scratch, but I don't know if it works on samsung.
This is video:
Then another thing, what procedure did you follow for rooting? You may have had problems during the rooting process.
I followed this guide:
 

RedSpikeJr

Senior Member
Oct 4, 2019
62
20
To update the situation
The battery of the phone inflated like a balloon, so I needed to go to a technician. I don't know for sure if that was caused by something physical, but will update when have some news
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
Ok, let me know if the technician can get you to restart the phone, and out of curiosity, he can bring the knox back to 0.
 

aaaajwedk

New member
Jun 28, 2022
2
0
Hi, I was trying this today and I'm stuck at "An error has occured while updating the device software."

Odin was stuck at product.img for over an hour so I restarted the phone using volume down and power.
I tried again and it keeps getting stuck at product.img while the phone shows this error. Please could you help me out?

I followed all the steps exactly as you said, but I noticed while in download mode that it showed Warranty Void: 1
I did not root the phone, only flashed Pixel Experience and now trying to go back to OneUI

Screenshot 2022-06-28 062936.png
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
Hi, I was trying this today and I'm stuck at "An error has occured while updating the device software."

Odin was stuck at product.img for over an hour so I restarted the phone using volume down and power.
I tried again and it keeps getting stuck at product.img while the phone shows this error. Please could you help me out?

I followed all the steps exactly as you said, but I noticed while in download mode that it showed Warranty Void: 1
I did not root the phone, only flashed Pixel Experience and now trying to go back to OneUI

View attachment 5647587
Hello, then, the Warranty Void at 1 is triggered when you install a non-original firmware (in this case the PixelExperience), or when you change Recovery (ex: the TWRP) or you run the ROOT.
Any other software that is not in original firmware triggers the Knox to 0x1 irreversibly.
In your specific case, by installing the LineageOS Recovery and the PixelExperence ROM you have triggered the Knox at 0x1.
I am sorry.
Coming to your problem, the model of your phone what it is (ex: SM-N975F) and the CSC (ex: ITV). Did you download the original software for your exact model? Did you extract the PIT file from the original firmware and put it in the Option tab in Odin?
 

aaaajwedk

New member
Jun 28, 2022
2
0
Hello, then, the Warranty Void at 1 is triggered when you install a non-original firmware (in this case the PixelExperience), or when you change Recovery (ex: the TWRP) or you run the ROOT.
Any other software that is not in original firmware triggers the Knox to 0x1 irreversibly.
In your specific case, by installing the LineageOS Recovery and the PixelExperence ROM you have triggered the Knox at 0x1.
I am sorry.
Coming to your problem, the model of your phone what it is (ex: SM-N975F) and the CSC (ex: ITV). Did you download the original software for your exact model? Did you extract the PIT file from the original firmware and put it in the Option tab in Odin?
Hello, I got it working just now by using a different cable and USB port. The procedure completed and the phone restarted by itself, and now its perfectly fine. Thank you so much for your help.

Yes, the phone is an SM-N975F. Despite Knox being tripped, my banking and payment apps are still working so I'm happy :D

I'm sure your article will be helpful to many more users. Thank you!
 

ExileTM

Senior Member
Apr 4, 2012
135
39
Montefano
Hello, I got it working just now by using a different cable and USB port. The procedure completed and the phone restarted by itself, and now its perfectly fine. Thank you so much for your help.

Yes, the phone is an SM-N975F. Despite Knox being tripped, my banking and payment apps are still working so I'm happy :D

I'm sure your article will be helpful to many more users. Thank you!
OK well. Glad it was helpful. Yes, however, until you root all the apps will work. The only one are some applications by Samsung that will no longer work because they are based on the knox.
Otherwise like Google Pay, all banking and account apps, software updates should work smoothly.
 

fehmiturk

Member
Feb 7, 2009
16
12
Hi, is this guide usable for the S22 snapdragon version? My device is rooted, and I want to back to original firmware.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Welcome to this easy guide.

    Time needed: 15 / 60min (depends on your internet connection)
    Ease of operation: Very easy
    Don't be fooled by the length of this guide ... the operations to be done are quick and easy.

    NB: I state immediately that this procedure does not restore the state of Knox to 0x0 if by chance you have brought it to 0x1.
    To date, this is an irreversible process.

    In the next lines we will see how to restore our Samsung device to its original factory conditions, after unlocking the Bootloader, rooting and installing various types of custom installations, such as custom OneUI, AOSP or Google ROM.
    It may happen that you want to go back to the original firmware of our Samsung, after trying various custom ROMs, after having rooted and modified the recovery, missing with the phone partitions, lost EFS folder or corrupt IMEI. The reasons can be many. This guide is aimed at all those who, with the classic Odin procedure to install the stock rom, are unable to restore the phone to normal operating conditions.

    But it can happen to fail in this thing, even using Odin to put back the original software, Odin himself or the phone can crash to the BOOT partition or generate other errors, with VBMeta or generic errors, including partition ones.
    So let's see how to solve all the inconveniences due to modding on our Samsungs to 99%. Let's begin!

    - MATERIAL REQUIRED:
    Latest version of Frija link
    Latest version of Odin link
    Samsung USB Driver link
    File Manager zip (example 7zip) link

    PC with Microsoft Windows 7-8-8.1-10-11
    USB type C cable

    1 - Download the latest stock firmware for our Samsung:
    Download the latest version of Frija and once the program has started, enter the model code of your device and the abbreviation of your CSC.
    Make sure the "Auto" checkbox is checked.
    Once you have checked everything, click on "Check Update" and click on "Download". Wait for it to download.
    Immagine 2022-06-01 171858.png


    Once you have downloaded the zip containing the various parts that make up the stock software (see image below), extract it to a folder of your choice. We will have 5 files in total.
    Immagine 2022-06-03 095805.png


    2 - Retrieve the original PIT file
    To recover the PIT file (partition list) for our device, go to the firmware folder you just downloaded with Frija, locate the "tar.md5" file with the words CSC_OXM_N............., right click on the it and select rename, adding ".zip" at the end to "transform" it into a compressed file that can be opened. This way you will have something like
    "CSC_OXM_N975...............REV01_user_low_ship.tar.md5.zip"
    Give the Ok and confirm the change of the file extension.
    You should now have the same situation as you see in the image below. Total 5 files of which one is a ".zip" files.
    Immagine 2022-06-03 100700.png


    Now open the file you just renamed with 7zip, the main window of the 7zip program will open with various files inside:
    Immagine 2022-06-01 164656.png


    Now copy the "D2S_EUR_OPEN.pit" file by right clicking and selecting the "copy to ..." item and giving the ok without changing anything. The .PIT file will be copied to the same folder as the previously downloaded firmware.
    Immagine 2022-06-03 144208.png


    Once this is done, the folder that appears will look like this (Now, the total files are 6 of which one is a ".zip" files):
    Immagine 2022-06-03 144301.png


    Now just put the CSC_OXM ... file back to the previous condition, renaming it one more time and eliminating the ".zip" extension at the end of the name, in order to find an MD5 file again. This will be the file we will have:
    "CSC_OXM_N975...............REV01_user_low_ship.tar.md5."

    Now we have everything we need. If we have done everything correctly this is the final result (Total 6 files).
    Immagine 2022-06-03 101134.png


    3 - Prepare and Configure Odin
    Now open the latest version of Odin (as of May 2022 the latest version is 3.14.4), load the corresponding downloaded firmware files in the various slots (BL, AP, CP and CSC) as usual.
    In the CSC box, upload the file labeled "CSC_OXM_N975 ............... REV01_user_low_ship.tar.md5."

    Did you know that....
    The CSC_OXM file is used to restore the internal memory as factory, this will delete all personal data in the phone memory, all applications and data associated with it.
    The HOME_CSC_OXM file, on the other hand, will not act in any way on the internal memory. Useful if you want to update while remaining in the same type of ROM. Not recommended if your phone has a Custom ROM installed, as it may not start or give errors in previously installed applications.
    If you want to do a clean install of the original ROM, always use the CSC_OMX file!

    Once this is done, move (still in Odin) to the "Option" tab and check the following items:
    Auto Reboot
    Nand Erase
    Re-partition
    F. Reset time

    The rest of the items MUST NOT BE SELECTED!
    Immagine 2022-06-01 165607.png


    Again in Odin, this time go to the PIT tab, a warning message will appear, give the ok and select the first extracted file which has the unique name "D2S_EUR_OPEN.pit"
    If you have done everything right you should have the same situation as the image below:
    Immagine 2022-06-01 165643.png


    Immagine 2022-06-01 165724.png


    4 - Return the phone to the original firmware
    Connect the USB type C cable to your phone and restart your phone in "Download mode" (check the right combination for your model), or use the Custom Rom to do this, usually all coustom roms or custom recovery offer reboot in Download mode (or Booloader).
    In odin in the "Log" tab, you should see the word "Added" with the number of the port to which it is connected (example "0: [COM3]"), if so, press the START key of Odin and wait for the restart (this procedure will delete all data on your device).
    If nothing appears, install the Samsung USB drivers and repeat step 4.
    Immagine 2022-06-01 165804.png


    5 - Relock the BootLoader
    To get rid of that fatal warning message when starting the phone that tells us that the BootLoader is unlocked once and for all, let's put it back in place, relocking the BootLoader.
    galaxy-magisk-bootloader-513x1024.jpg

    (Image for demonstration purposes)

    Turn off the phone, reconnect the USB cable and immediately press the Volume + and Volume- keys at the same time.
    Return to Download mode (albeit a little different), with various options (actually only 3).
    In this case, follow the second option (Volume up long press: Device unlock mode) hold down the Volume + key for a few moments until the message "Lock Bootloader?" Appears. To confirm everything, make a single click on Volume + (also in this case the phone will be formatted by the system again) and wait for a complete restart.

    6 - Relock OEM (optional but recommended if you want to stick with the Samsung ROM)
    Once your phone has restarted and the initial setup is complete, you can also disable the OEM unlock capability and reuse the security features.
    To do this, go to Settings / Phone Information / Software Information and tap several times on the wording "Build version" in order to unlock the "Developer options". If prompted, unlock your smartphone with your PIN or sign.
    Now go back to the main Settings page, open the Developer Options and check that the "OEM Unlock" item is disabled, otherwise disable it and restart the device.
    OEM.png


    Well now you have your Samsung with Original firmware again. Enjoy
    4
    Welcome to this easy guide.

    Time needed: 15 / 60min (depends on your internet connection)
    Ease of operation: Very easy
    Don't be fooled by the length of this guide ... the operations to be done are quick and easy.

    NB: I state immediately that this procedure does not restore the state of Knox to 0x0 if by chance you have brought it to 0x1.
    To date, this is an irreversible process.

    In the next lines we will see how to restore our Samsung device to its original factory conditions, after unlocking the Bootloader, rooting and installing various types of custom installations, such as custom OneUI, AOSP or Google ROM.
    It may happen that you want to go back to the original firmware of our Samsung, after trying various custom ROMs, after having rooted and modified the recovery, missing with the phone partitions, lost EFS folder or corrupt IMEI. The reasons can be many. This guide is aimed at all those who, with the classic Odin procedure to install the stock rom, are unable to restore the phone to normal operating conditions.

    But it can happen to fail in this thing, even using Odin to put back the original software, Odin himself or the phone can crash to the BOOT partition or generate other errors, with VBMeta or generic errors, including partition ones.
    So let's see how to solve all the inconveniences due to modding on our Samsungs to 99%. Let's begin!

    - MATERIAL REQUIRED:
    Latest version of Frija link
    Latest version of Odin link
    Samsung USB Driver link
    File Manager zip (example 7zip) link

    PC with Microsoft Windows 7-8-8.1-10-11
    USB type C cable

    1 - Download the latest stock firmware for our Samsung:
    Download the latest version of Frija and once the program has started, enter the model code of your device and the abbreviation of your CSC.
    Make sure the "Auto" checkbox is checked.
    Once you have checked everything, click on "Check Update" and click on "Download". Wait for it to download.
    View attachment 5628035

    Once you have downloaded the zip containing the various parts that make up the stock software (see image below), extract it to a folder of your choice. We will have 5 files in total.
    View attachment 5629259

    2 - Retrieve the original PIT file
    To recover the PIT file (partition list) for our device, go to the firmware folder you just downloaded with Frija, locate the "tar.md5" file with the words CSC_OXM_N............., right click on the it and select rename, adding ".zip" at the end to "transform" it into a compressed file that can be opened. This way you will have something like
    "CSC_OXM_N975...............REV01_user_low_ship.tar.md5.zip"
    Give the Ok and confirm the change of the file extension.
    You should now have the same situation as you see in the image below. Total 5 files of which one is a ".zip" files.
    View attachment 5629261

    Now open the file you just renamed with 7zip, the main window of the 7zip program will open with various files inside:
    View attachment 5628037

    Now copy the "D2S_EUR_OPEN.pit" file by right clicking and selecting the "copy to ..." item and giving the ok without changing anything. The .PIT file will be copied to the same folder as the previously downloaded firmware.
    View attachment 5629463

    Once this is done, the folder that appears will look like this (Now, the total files are 6 of which one is a ".zip" files):
    View attachment 5629465

    Now just put the CSC_OXM ... file back to the previous condition, renaming it one more time and eliminating the ".zip" extension at the end of the name, in order to find an MD5 file again. This will be the file we will have:
    "CSC_OXM_N975...............REV01_user_low_ship.tar.md5."

    Now we have everything we need. If we have done everything correctly this is the final result (Total 6 files).
    View attachment 5629265

    3 - Prepare and Configure Odin
    Now open the latest version of Odin (as of May 2022 the latest version is 3.14.4), load the corresponding downloaded firmware files in the various slots (BL, AP, CP and CSC) as usual.
    In the CSC box, upload the file labeled "CSC_OXM_N975 ............... REV01_user_low_ship.tar.md5."



    Once this is done, move (still in Odin) to the "Option" tab and check the following items:
    Auto Reboot
    Nand Erase
    Re-partition
    F. Reset time

    The rest of the items MUST NOT BE SELECTED!
    View attachment 5628039


    Again in Odin, this time go to the PIT tab, a warning message will appear, give the ok and select the first extracted file which has the unique name "D2S_EUR_OPEN.pit"
    If you have done everything right you should have the same situation as the image below:
    View attachment 5628043

    View attachment 5628045

    4 - Return the phone to the original firmware
    Connect the USB type C cable to your phone and restart your phone in "Download mode" (check the right combination for your model), or use the Custom Rom to do this, usually all coustom roms or custom recovery offer reboot in Download mode (or Booloader).
    In odin in the "Log" tab, you should see the word "Added" with the number of the port to which it is connected (example "0: [COM3]"), if so, press the START key of Odin and wait for the restart (this procedure will delete all data on your device).
    If nothing appears, install the Samsung USB drivers and repeat step 4.
    View attachment 5628041

    5 - Relock the BootLoader
    To get rid of that fatal warning message when starting the phone that tells us that the BootLoader is unlocked once and for all, let's put it back in place, relocking the BootLoader.
    View attachment 5629449
    (Image for demonstration purposes)

    Turn off the phone, reconnect the USB cable and immediately press the Volume + and Volume- keys at the same time.
    Return to Download mode (albeit a little different), with various options (actually only 3).
    In this case, follow the second option (Volume up long press: Device unlock mode) hold down the Volume + key for a few moments until the message "Lock Bootloader?" Appears. To confirm everything, make a single click on Volume + (also in this case the phone will be formatted by the system again) and wait for a complete restart.

    6 - Relock OEM (optional but recommended if you want to stick with the Samsung ROM)
    Once your phone has restarted and the initial setup is complete, you can also disable the OEM unlock capability and reuse the security features.
    To do this, go to Settings / Phone Information / Software Information and tap several times on the wording "Build version" in order to unlock the "Developer options". If prompted, unlock your smartphone with your PIN or sign.
    Now go back to the main Settings page, open the Developer Options and check that the "OEM Unlock" item is disabled, otherwise disable it and restart the device.
    View attachment 5629493

    Well now you have your Samsung with Original firmware again. Enjoy
    I tested on S22 Snapdragon version and restored to factory firmware successfully. Thanks for the effort.
    2
    It did worked, but it triggered knox for me. I had rooted with original firmware and the knox wasn't triggered, and if only I knew that downloading firmware from frija will void the warranty I would just do a factory reset and lock the bootloader with the original frmware that phone came in the first place :(
    If you are rooted, even with the original firmware the Knox was certainly 1. It is possible that the program you use to verify the knox, such as Samsung Info or Knox Status did not detect the root or similar and therefore gave you as knox to 0.
    There is no root that doesn't trip knox, even if the firmware is original.
    Downloading original firmware from Frija, as well as Sammobile or Samfw have never brought any problems to the knox that I know of, also because if they were modified or altered you would have to unlock the bootloader to install them otherwise it blocks you during the flash phase.
    I'm sorry but as already mentioned in the post, but if you have the knox at 1 this will always remain at 1, there is no going back.
    The guide talks about returning the phone to the original firmware when installing other custom ROMs, so I don't understand why you followed this guide if you had the original rooted firmware. If you only wanted to remove the root, the procedure is totally different, you just had to go into the custom recovery you installed and perhaps follow another 2 or 3 steps that are not in this guide for obvious reasons.
    1
    Welcome to this easy guide.

    Time needed: 15 / 60min (depends on your internet connection)
    Ease of operation: Very easy
    Don't be fooled by the length of this guide ... the operations to be done are quick and easy.

    NB: I state immediately that this procedure does not restore the state of Knox to 0x0 if by chance you have brought it to 0x1.
    To date, this is an irreversible process.

    In the next lines we will see how to restore our Samsung device to its original factory conditions, after unlocking the Bootloader, rooting and installing various types of custom installations, such as custom OneUI, AOSP or Google ROM.
    It may happen that you want to go back to the original firmware of our Samsung, after trying various custom ROMs, after having rooted and modified the recovery, missing with the phone partitions, lost EFS folder or corrupt IMEI. The reasons can be many. This guide is aimed at all those who, with the classic Odin procedure to install the stock rom, are unable to restore the phone to normal operating conditions.

    But it can happen to fail in this thing, even using Odin to put back the original software, Odin himself or the phone can crash to the BOOT partition or generate other errors, with VBMeta or generic errors, including partition ones.
    So let's see how to solve all the inconveniences due to modding on our Samsungs to 99%. Let's begin!

    - MATERIAL REQUIRED:
    Latest version of Frija link
    Latest version of Odin link
    Samsung USB Driver link
    File Manager zip (example 7zip) link

    PC with Microsoft Windows 7-8-8.1-10-11
    USB type C cable

    1 - Download the latest stock firmware for our Samsung:
    Download the latest version of Frija and once the program has started, enter the model code of your device and the abbreviation of your CSC.
    Make sure the "Auto" checkbox is checked.
    Once you have checked everything, click on "Check Update" and click on "Download". Wait for it to download.
    View attachment 5628035

    Once you have downloaded the zip containing the various parts that make up the stock software (see image below), extract it to a folder of your choice. We will have 5 files in total.
    View attachment 5629259

    2 - Retrieve the original PIT file
    To recover the PIT file (partition list) for our device, go to the firmware folder you just downloaded with Frija, locate the "tar.md5" file with the words CSC_OXM_N............., right click on the it and select rename, adding ".zip" at the end to "transform" it into a compressed file that can be opened. This way you will have something like
    "CSC_OXM_N975...............REV01_user_low_ship.tar.md5.zip"
    Give the Ok and confirm the change of the file extension.
    You should now have the same situation as you see in the image below. Total 5 files of which one is a ".zip" files.
    View attachment 5629261

    Now open the file you just renamed with 7zip, the main window of the 7zip program will open with various files inside:
    View attachment 5628037

    Now copy the "D2S_EUR_OPEN.pit" file by right clicking and selecting the "copy to ..." item and giving the ok without changing anything. The .PIT file will be copied to the same folder as the previously downloaded firmware.
    View attachment 5629463

    Once this is done, the folder that appears will look like this (Now, the total files are 6 of which one is a ".zip" files):
    View attachment 5629465

    Now just put the CSC_OXM ... file back to the previous condition, renaming it one more time and eliminating the ".zip" extension at the end of the name, in order to find an MD5 file again. This will be the file we will have:
    "CSC_OXM_N975...............REV01_user_low_ship.tar.md5."
    Now we have everything we need. If we have done everything correctly this is the final result (Total 6 files).
    View attachment 5629265

    3 - Prepare and Configure Odin
    Now open the latest version of Odin (as of May 2022 the latest version is 3.14.4), load the corresponding downloaded firmware files in the various slots (BL, AP, CP and CSC) as usual.
    In the CSC box, upload the file labeled "CSC_OXM_N975 ............... REV01_user_low_ship.tar.md5."



    Once this is done, move (still in Odin) to the "Option" tab and check the following items:
    Auto Reboot
    Nand Erase
    Re-partition
    F. Reset time

    The rest of the items MUST NOT BE SELECTED!
    View attachment 5628039


    Again in Odin, this time go to the PIT tab, a warning message will appear, give the ok and select the first extracted file which has the unique name "D2S_EUR_OPEN.pit"
    If you have done everything right you should have the same situation as the image below:
    View attachment 5628043

    View attachment 5628045

    4 - Return the phone to the original firmware
    Connect the USB type C cable to your phone and restart your phone in "Download mode" (check the right combination for your model), or use the Custom Rom to do this, usually all coustom roms or custom recovery offer reboot in Download mode (or Booloader).
    In odin in the "Log" tab, you should see the word "Added" with the number of the port to which it is connected (example "0: [COM3]"), if so, press the START key of Odin and wait for the restart (this procedure will delete all data on your device).
    If nothing appears, install the Samsung USB drivers and repeat step 4.
    View attachment 5628041

    5 - Relock the BootLoader
    To get rid of that fatal warning message when starting the phone that tells us that the BootLoader is unlocked once and for all, let's put it back in place, relocking the BootLoader.
    View attachment 5629449
    (Image for demonstration purposes)

    Turn off the phone, reconnect the USB cable and immediately press the Volume + and Volume- keys at the same time.
    Return to Download mode (albeit a little different), with various options (actually only 3).
    In this case, follow the second option (Volume up long press: Device unlock mode) hold down the Volume + key for a few moments until the message "Lock Bootloader?" Appears. To confirm everything, make a single click on Volume + (also in this case the phone will be formatted by the system again) and wait for a complete restart.

    6 - Relock OEM (optional but recommended if you want to stick with the Samsung ROM)
    Once your phone has restarted and the initial setup is complete, you can also disable the OEM unlock capability and reuse the security features.
    To do this, go to Settings / Phone Information / Software Information and tap several times on the wording "Build version" in order to unlock the "Developer options". If prompted, unlock your smartphone with your PIN or sign.
    Now go back to the main Settings page, open the Developer Options and check that the "OEM Unlock" item is disabled, otherwise disable it and restart the device.
    View attachment 5629493

    Well now you have your Samsung with Original firmware again. Enjoy
    Hi there. I tried it and didn't work for me.
    Tried with differents CSC too, but my phone doesn't start the system. Just starts the download and recovery mode
    It doesn't even show up the charging screen when powered off

    Tried so many things and I can't boot my system...
    I made a post with the info about what happened:


    Please help...
    1
    Ok so with Odin it didn't give you any problem. Let's say he freezes when he does the first boot that does the factory reset. Right?
    Well odd, because once the original firmware is installed, I don't see why it should crash on boot ... unless there is a hardware problem in the phone's internal memory.
    I know it may sound trivial, but the usb cable you use is good and did you use the latest version of Odin?
    Have you checked maybe if the internal memory is right for you. If it is 256Gb or 512Gb
    The USB it's the original from Samsung.
    The device is 256GB
    You could try this, if you see that it does not start try to enter the recovery (the original one) and delete everything you can, like cache and do a reset data directly from the recovery. Then try restarting and see if it starts.
    Tried this already. Didn't work
    If it still doesn't boot, try this thing.
    Install TWRP custom recovery and enter once installed.
    Go to Wipe Section in TWRP, Repair or Change partition, System and Data, and Changed Ext4 to EXTFAT. And changed back to Ext4. Eventually rerun the guide again.
    I tried this but not in the process of "Do the format and then do the Odin process" so I can try

    I'm trying now with USB OTG to know if I can flash the system.img (and know if from there I can solve this)