All Samsung smartphones including the latest Galaxy S4 include a “binary counter”. This counter only increases when you install non-official Samsung recovery. So if you end up installing ClockworkMod or TWRP recovery to install custom ROMs, this binary counter is increased.
If you do flash an official Samsung firmware (or root-injected Samsung firmware), the binary counter does not increase.
Fortunately, XDA developer ChainFire develops Triangle Away app which allows you to reset the binary counter.
What does this mean for you as a consumer?
Nothing, you can always get your Galaxy S4 completely back to stock by installing an official Samsung firmware and also resetting binary counter using Triangle Away app. The beauty of Samsung phones like Galaxy S4 is that it is possible to “unvoid” your warranty completely back to stock easily using free online tools unlikes HTC, where you can re-lock HTC phones but HTC will still know you’ve rooted your device.
What is a Custom ROM?
A custom ROM is a custom, modified operating system that you can install on your Android device. Basically it's like installing Windows OS on a Macbook. By installing a custom ROM, you can bypass stock factory settings like locked hotspot tether, install new Android versions early, or even convert your phone into another OS.
With a custom ROM, you can really maximize the capabilities of your smartphone by adding custom features that have been developed by open source developers.
How to Install Custom ROMs
First, you will need to root your device, if it is not rooted yet, follow our root tutorial and root your phone.
Once rooted, you should have TWRP installed on your phone. Installation of a custom ROM is easy if you learn the basic of it. If you don't know how to install custom ROMs using TWRP recovery, see our tutorial on How to Install Custom ROM using TWRP!