As Vesko said, in most android devices multi user is disabled. Some device manufacturers enable it. Foe example you have to bind a service with AIDl and disable a feature for a user in your privileged app. Here you need to know bind service as which user. We can invoke bindServiceAsUser
using reflection.
UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
UserHandle owner = null;
owner = um.getUserForSerialNumber(0L);
try {
MethodUtils.invokeMethod(getApplicationContext(), "bindServiceAsUser", new Object[]{i, serviceConnection, Context.BIND_AUTO_CREATE, owner});
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}