Un-bricking, upgrading and/or repairing software faults on your Samsung Galaxy A5 2017 (SM-A520) can easily be done using this official firmware.
This is a four file (AP, BL, CP and CSC) repair firmware with which you can unbrick your smartphone and/or fix other software faults on the device.
This firmware fixes software issues like:-
Un-brick bricked devices
Fix apps force closing
Device getting stuck during use, or lagging
Fix stuck on boot logo
Fix boot loop
Remove custom recovery (e.g, TWRP)
Remove root and restore default system files
Help upgrade/ update Android version to latest security patch
And just any software related faults
Before downloading any firmware for your Samsung device, check and confirm that the firmware is meant for your exact device model. This is necessary to avoid downloading the wrong file, causing your device to brick.