I am not asking what the process is to undergo doing it, but how it is programmed in the first place to prevent certain actions, such as:
1.Downloading to SD card from Google Play store.
2.Accessing/modifying files mounted on the /system directory, and such directories like that.
3.Modifying text, GUI components, etc.
REALIZE that I am NOT asking for code, samples, etc., I just want to know the general idea of how this would be implemented in the source, i.e., hierarchial system, privilege blocking code on the GUI end, or possibly code running in a kernel process, etc.