3

What makes the Android running on a TV aka Smart TV resilient towards abrupt power off/outage events?

By abrupt power off I mean manually turning off the electrical switch to which the power cord of the TV is connected to, or removing the power cord from the electrical outlet, while the TV is still functioning.

If I do the same thing to my PC running a Linux distribution, on next boot my OS would always find that the system partition is in inconsistent state and the OS would try to repair it before moving on with the boot process. That being said I always expect that some of my programs and the data associated with them might no longer be in consistent state. Perhaps the changes I made to my document were no longer saved, or the N number of file that I instructed my file manager to copy seems to not have been copied correctly, and so on.

On an Android TV how come this problem of file corruption and inconsistency not affect the Android apps per se? They all seem to work fine no matter how many times I abruptly turn off the TV. In fact, my Sony Smart TV running ancient Android 4.4 does not offer Shutdown/Power Off option at all. There is only standby mode. One manufacturer, Philips, also recommends turning off one of their TV model completely by pulling out the plug from the electrical outlet. To me TV manufacturers are very confident that their Android TV would continue to work correctly after all these abrupt power outages.

How come? And if Android on a TV is so much resilient than why do Android phones offer such fancy Power off feature where the user has to wait for N seconds before the phone completely shuts off? Why not just kill the power from the processor? That would be convenient to the user. I press Power off, and lo and behold, the phone shuts down right there.

I tried to search about Power related docs on developer.android.com and source.android.com but could not find the answer.

Firelord
  • 25,084
  • 20
  • 124
  • 286
  • 1
    Android apps habe to be aware that they may be killed at any time because of low system RAM, so they have to be developed a little bit carefully with that in mind. – Robert Feb 21 '23 at 14:00
  • I don't think there is a verifiable answer that we can give you, but generally the system is "protected" and things load into RAM and run, were as in PC's most things run off the filesystem into RAM but are read/write from the filesystem regularly... Your TV is more like you phone, with a bootloader and system partition that are generally read-only during normal use, and apps load into RAM as needed and not run consistently while read-writing the file system. – acejavelin Feb 21 '23 at 15:27
  • even phones can't power off completely – alecxs Feb 22 '23 at 02:28
  • Possibly related: https://e2e.ti.com/blogs_/b/industrial_strength/posts/how-to-manage-processor-power-during-an-uncontrolled-power-off – Morrison Chang Feb 22 '23 at 04:09
  • A term from that document is input capacitor’s discharge time so it may be worth noting how long it takes for the TV's power indicator LED to discharge after your remove it from mains power. – Morrison Chang Feb 22 '23 at 04:23

0 Answers0