apparmor.d/apparmor.d/profiles-a-f/adb
2024-06-29 23:05:45 +01:00

38 lines
937 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2022 Mikhail Morfikov
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/adb
@{exec_path} += @{lib}/android-sdk/platform-tools/adb
profile adb @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/devices-usb>
include <abstractions/nameservice-strict>
include <abstractions/user-download-strict>
network inet stream,
network inet6 stream,
network netlink raw,
signal (receive) set=(kill) peer=scrcpy,
@{exec_path} mrix,
/usr/share/scrcpy/scrcpy-server r,
owner @{tmp}/adb.@{int}.log rw,
owner @{HOME}/.android/ rw,
owner @{HOME}/.android/adb.@{int} rw,
owner @{HOME}/.android/adbkey rw,
include if exists <local/adb>
}
# vim:syntax=apparmor