android - AOSP : how to get uid of given package name in c? -
i want uid of application, have applications package name , want in c.
are there api returns uid related given package in source? in class , requirements then?
you can in java process.myuid().
on native, can use getuid(), when including unistd.h
, sys/types.h
.
if want application, use packagemanager , see this answer on so.
in general read unix question uids. , gids
Comments
Post a Comment