I would like to know how is the default launcher set after a factory reset. What files are in charge of telling the OS, for example, that the Touchwiz app is the default launcher for Samsung devices.
I do not want to replace the launcher, that is something I already know how to do. This is a very specific question regarding how the os works. I am interested in doing a system update via recovery and changing the files that tell the OS which app is the default launcher, in order to tell it that my newly flashed app (flashed in system partition) is.
I look forward to your response. Thanks in advance.
EDIT:
As stated, Samsung is just a given example but it is one of an endless list. This is an os general-behaviour related question not manufacturer specific.