Its also a show of how incredibly complex phones are where just the nfc chip has its own bootloader and firmware and update protocol.
And yeah, seemingly every modern chip has ended up with its own ARM processor with some undocumented firmware blob, to provide its "hardware" functions. Better than bespoke state machines, I guess.
One of the ways the S3 (and I think S4) can self-brick is that the flash controller table gets corrupt, so its firmware goes into a boot loop (making the flash chip disappear to the main processor). Someone did a similar reverse engineering trek to unbrick S3s that have fallen victim to this bug. I just wish the chip registers were documented in the datasheet, and the firmware more open. I've got a bricked S4 with some concert pics that I'll get around to hacking on some day...
> As I had replicated this vulnerability, I disclosed it to Samsung, as it was likely they would want to remediate it. Remediation was performed by them on all newly manufactured chips, as well as chips currently in development, as of April 2020
facepalm. The NFC chip firmware integrity is assured by it being loaded from the application processor. Signature schemes that prevent users from running their own code on devices they own are unjust, and you're doing nobody any favors by reporting bugs in them (apart from the power-hungry manufacturers pushing this junk). The author has basically obsoleted their own code on future models.
Everytime one of my friends says they rooted their phone, I ask them how. And the answer is always "I was on some website, downloaded some binary and executed it". So as I understand it, they make themselfes completely vurnurable to somebody from the internet who made that root binary.
Custom roms are a lot more risky, there are 100s of different flavors made by relatively unknown developers and even though they are technically open source, I find it highly unlikely that none of them contain malware. I mean you can introduce a memory corruption bug in few handful characters, these custom roms are practically unauditable.
Depending on your phone and threat model, it's not obvious that this is worse than the alternative. Given that there have been phone manufacturers that outright shipped malware, and most phones stop getting security patches after a few months and then steadily accrue CVEs, it may be better to chance a 3rd-party ROM.
After that root is provided with Magisk, which is also open source. And you could also install the Google software package if you want at this stage to get Play Store / etc.
Plus, with LOS you get guaranteed security & version updates for Android for years and years and years. Unfortunately firmware blobs for the hardware are provided by the OEM, and while LOS tries to keep them updated sometimes they are a bit old, and updates for those will eventually end when the OEM stops providing updates.
I'm personally glad to be off Samsung products again now, but I was really disappointed when my spouse switched to a model without MST.
https://en.wikipedia.org/wiki/Magnetic_secure_transmission
And it seems LG has a similar technology they call Wireless Magnetic Communication (WMC).
I just can't believe how dumb it was to put a memory read command into the older NFC chip! Maybe nobody thought about security back then?
And one annoying thing is how some of the constant like 4 and size of (which some is 4) is used Interchangably. Also some init of the Array has data but actually is a read into Array. Just to confuse reader ?