[Samsung Galaxy Tab A series Questions & Answers] Sceleratis:
Hi, recently I accidentally bricked my Galaxy Tab A 10.1 with Spen (SM-P580) by accidentally disabling "OEM Unlock" in the developer settings while I had TWRP and a custom ROM installed. I was only able to get into download mode due to the factory reset protection lock, so I tried downloading the stock firmware online and then flashing it to bring the device back to fully stock firmware so I could get past the lock and not have a brick. Unfortunately, when I flashed the firmware, despite it seemingly being for my specific device (and matching my build number), I was no longer able to boot the device at all. It would turn on and would seem to immediately lose power, charging would turn on the flash and cause it to heat up, and no amount of charging would fix the issue. It was completely bricked and there was no way for me to go back into download mode to try flashing again or try flashing a different firmware. Thankfully, I contacted Samsung and because it's still under warranty they were nice enough to fix it for free, and did so by completely replacing the motherboard according to the repair slip, which is not something I would have been able to do.

My question is: How do I make a full backup of the stock firmware and recovery so if this somehow ever happens again where the FRP lock kills my device, I can reflash in download mode the original firmware that I know is 100% going to work with it and is correct? I don't want to gamble with potentially using the wrong firmware again, seeing as that gamble killed the thing.

The Model is SM-P580NZKAXAR. Based on the last part (XAR) and the fact that other non-sammobile sites listed the US wifi only firmware as XAR, I assumed "Cellular south (XAR)" was the correct firmware I needed which was obviously incorrect as it completely bricked the device. For this reason, I'm wondering if there's a way with software on windows or something to completely backup the existing stock firmware before I do anything, because I doubt Samsung would be so nice a second time, and I'd really rather not go through all this again. Obviously these websites get the original firmware that's flashable via download mode somehow, so I'd like to know how or if that's possible. Also before I went and downloaded the firmware I checked the Samsung desktop app that allows you to fix firmware issues but it said my device wasn't supported so it wasn't much help. I'd like to avoid installing any custom recoveries ahead of time as if something gets messed up there will be no way for me to actually boot into recovery as far as I'm aware, and the FRP lock will block me from reflashing the custom recovery or anything else that isn't stock. It goes without saying that if this is possible I'd like to do it without installing a custom recovery or rooting as I'd like to have a proper fully stock backup that isn't going to trip the FRP lock.

Also the way I accidentally disabled OEM Unlock was I simply toggled the developer options off and then back on in a slimmed down version of the stock rom, but in doing so it also reset the OEM unlock setting and I completely forgot to make sure it was still enabled. Next thing I know I go to reboot (was trying to figure out an issue with a usb device) and then the thing was FRP locked. Needless to say, it was something extremely simple and easy to do by accident. I also just checked the device and the build number matches the firmware that I downloaded, so I don't know if it was mislabeled or what but something was not correct.