From 61b90bd211021886049f72cb666a5b49b83b3c64 Mon Sep 17 00:00:00 2001 From: JP Abgrall Date: Wed, 9 Nov 2011 10:30:08 -0800 Subject: [PATCH] adb: grant it AID_NET_BW_STATS for full /proc/net/xt_qtaguid/stats Normally only bandwidth stats for the uid reading .../stats is returned. With the extra group, adb shell will be able to read stats from all UIDs. This is to be used to offer data usage profiling to developers. Change-Id: If3d2941ce5aa4dbb1a23947b97b893149ba224f7 --- adb/adb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adb/adb.c b/adb/adb.c index a91004c36..e35c33425 100644 --- a/adb/adb.c +++ b/adb/adb.c @@ -907,9 +907,11 @@ int adb_main(int is_daemon, int server_port) ** AID_NET_BT and AID_NET_BT_ADMIN to diagnose bluetooth (hcidump) ** AID_SDCARD_RW to allow writing to the SD card ** AID_MOUNT to allow unmounting the SD card before rebooting + ** AID_NET_BW_STATS to read out qtaguid statistics */ gid_t groups[] = { AID_ADB, AID_LOG, AID_INPUT, AID_INET, AID_GRAPHICS, - AID_NET_BT, AID_NET_BT_ADMIN, AID_SDCARD_RW, AID_MOUNT }; + AID_NET_BT, AID_NET_BT_ADMIN, AID_SDCARD_RW, AID_MOUNT, + AID_NET_BW_STATS }; if (setgroups(sizeof(groups)/sizeof(groups[0]), groups) != 0) { exit(1); }