Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61b90bd2 authored by JP Abgrall's avatar JP Abgrall
Browse files

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
parent c761b54e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
        }