256519a529
The LogcatManagerService monitors all privileged (in AID_LOG group) access to logd. Only Root and System Server can read the logd data without tracking. Whenever the logd recieve privileged read data request, the request is forwarded to the LogcatManagerService. The LogcatManagerService can approve or decline the request via binder RPC on logd service. The binder call is enforced by sepolicy. That means only LogcatManagerService can use the logd binder service. And only logd can use the logcat binder service. The next step will add user consent requirement for the logd access. Bug: 197901557 Test: Reboot the device, then run "adb logcat" multiple times both during the booting and after the booting. The control flow goes correctly as we expected. Ignore-AOSP-First: pending fix for logcat privacy issue Change-Id: I5e225b65357e7bfacd5c6c9cb4fab5f309803193