Manually add UID to a system group Let's say i create a custom group on Android (We will call it GID 5000) and i want to add users (apps) to this group, how can i manually add the app's UID to GID 5000 ? If possible, without touching the APK.
Based on Linux, Android supports the addgroup and adduser commands (I just checked on one of my devices, and the command exists). I'm not sure whether it supports the full set of options available on Linux, but what should work is at least

# create a new group
addgroup [--gid ID] group
# add a user (app) to that group
adduser &lt;user&gt; &lt;group&gt;


From the adduser man page:


  If called with two non-option arguments, adduser will add an existing user to an existing group.