From Android API documentation: Binder.getCallingUid()
returns the Linux uid assigned to the process that sent you the current transaction that is being processed. When AppX calls ServiceY and ServiceY calls getCallingUid()
, it will get UID for X.
My question is: when AppX calls ServiceY, and ServiceY in turn calls ServiceZ, what's the calling UID observed by Z?
Does it make a difference if Y and Z are in the same process?