How to unbrick Samsung device and restore stock ROM.
Updated: Dec 23, 2019
In this post you will learn how you can unbrick your Samsung device, and re-flash it with the stock firmware to restore warranty. This works on all Samsung devices from the oldest to the newest. In order to do this, you'll need a Windows PC and a USB cable to connect phone to PC.
How to do it:
1) Ensure the device's bootloader is unlocked. The chances are it is already unlocked since you will have unlocked it to make the modifications you made which resulted in it becoming bricked. If the bootloader is not unlocked, do the following:
a) Go to device settings.
b) Select "About Device"
c) Select "Software Info"
d) Tap the build number 7 times until you see a toast.
e) Return to settings main menu. Go to "Developer options".
f) Find the "OEM Unlocking" toggle and turn it on.
2) Download Samsung's USB driver.
3) Run the .exe application to install Samsung USB driver onto your computer (if it's in ZIP format, extract the ZIP first, then run the .exe). You should see a success message when the installation is finished.
4. Download Odin. This is the tool we will use to flash the firmware.
5. Extract the Odin ZIP file to a location of your choice.
6. Go to SamMobile, where you can download the latest firmware for your device. Search for your device's model number and country code. For example: SM-T580, BTU. Warning: Downloading the wrong firmware will brick your device.
7. Select the latest firmware that is appropriate to your device. You may need to change the country dropdown to be able to find it correctly.
8. Download the firmware. You may need to sign up. Unless you are premium, you also need to wait to download :|.
9. You should get a ZIP file. Extract it to a location of your choice. It will contain 4-5 files (old models will only have 1 file).
10. Turn off you device. Boot your device into download mode. The key combination of this varies by device. For most devices (with a physical home button) you hold VOLUME DOWN+POWER+HOME together for 3 seconds. For devices without a physical home button, you may need to research how to enter it. The command adb reboot bootloader doesn't seem to work on Samsung.
11. Press Volume Up. You will see "Downloading... Do not turn off target".
12. Connect phone to PC. Note that MTP doesn't work in Download mode.
13. Launch Odin. In the log you will see "Added" if the device is attached correctly.
14. Attach all the files to their respecitve slots (e.g. BL goes to BL, AP goes to AP etc.). If you want to do a clean flash, use CSC in the CSC slot. If you want to keep your userdata (not recommended), use HOME_CSC instead. Not all devices will have a CP file.
NOTE: Some older devices will only have an AP file. This is not an error.
15. Click "Start" when you are ready, and the firmware will begin flashing to your device. The update can take between 5-10 minutes.
16. The device will reboot automatically when finished, and you should see "Installing system update".
17. Your device will reboot to the system now, and your phone is now unbricked! You can safely disconnect the USB cable now.