[Android-tools-devel] Bug#770330: Bug#770330: how to change UID_MIN, UID_MAX, FIRST_GID, LAST_GID, etc.?

László Böszörményi (GCS) gcs at debian.org
Tue Nov 25 15:16:54 UTC 2014


On Tue, Nov 25, 2014 at 12:05 PM, Hans-Christoph Steiner <hans at eds.org> wrote:
> android-permissions integrates the Android permissions into a Debian chroot
> running on Android.  This package should only ever run on a Debian chroot
> running with an Android kernel.  It should modify things like GID_MAX or
> LAST_GID in /etc/login.defs and /etc/adduser.conf to reflect the hard-coded
> Android UIDs and GIDs, but it is a policy violation for a package to modify
> those files. Any suggestions as how to best tackle this issue?
 I need to investigate, but I think policy only forbids modification
of the these files on a normal system. If you or the package create a
chroot and modify these files in it, then it's normal if I ask me now.
You can check if chrooted with the following code snippet (run as
root):
-- cut --
if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
  echo "We are chrooted!"
else
  echo "Business as usual"
fi
-- cut --

I think if you run on an Android device, then 'getprop
ro.build.version.release' should give you its version number,
otherwise should be empty or getprop not even installed. These should
help you, can't test it right now.

Regards,
Laszlo/GCS



More information about the Android-tools-devel mailing list