Use this to fix bootloops, failed updates or software problems on Samsung Galaxy phones.
1. Get the right firmware
Download the firmware for the exact model (e.g. SM-A145F) and your region. Unzip it: you'll get AP, BL, CP and CSC files.
2. Install the Samsung USB driver on your PC, then open Odin as administrator.
3. Put the phone in Download mode
Power off. On newer Galaxy phones hold Volume Up and Volume Down together and plug in the USB cable. Press Volume Up to continue when the warning appears. Odin should show "Added!!".
4. Load the files
BL into BL, AP into AP, CP into CP.
CSC: use HOME_CSC to keep your data, or CSC for a clean install (erases everything).
5. Check the options
Leave "Auto Reboot" and "F. Reset Time" ticked. Never tick "Re-Partition".
6. Click Start and don't touch the cable until Odin shows "PASS!". The phone restarts on its own.
If Odin shows "FAIL", the firmware is usually older than the phone's current bootloader. Download a newer version.