1### 2### Domain for all zygote spawned apps 3### 4### This file is the base policy for all zygote spawned apps. 5### Other policy files, such as isolated_app.te, untrusted_app.te, etc 6### extend from this policy. Only policies which should apply to ALL 7### zygote spawned apps should be added here. 8### 9type appdomain_tmpfs, file_type; 10 11# WebView and other application-specific JIT compilers 12allow appdomain self:process execmem; 13 14allow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute; 15 16# Receive and use open file descriptors inherited from zygote. 17allow appdomain zygote:fd use; 18 19# Receive and use open file descriptors inherited from app zygote. 20allow appdomain app_zygote:fd use; 21 22# gdbserver for ndk-gdb reads the zygote. 23# valgrind needs mmap exec for zygote 24allow appdomain zygote_exec:file rx_file_perms; 25 26# Notify zygote of death; 27allow appdomain zygote:process sigchld; 28 29# Read /data/dalvik-cache. 30allow appdomain dalvikcache_data_file:dir { search getattr }; 31allow appdomain dalvikcache_data_file:file r_file_perms; 32 33# Read the /sdcard and /mnt/sdcard symlinks 34allow { appdomain -isolated_app } rootfs:lnk_file r_file_perms; 35allow { appdomain -isolated_app } tmpfs:lnk_file r_file_perms; 36 37# Search /storage/emulated tmpfs mount. 38allow appdomain tmpfs:dir r_dir_perms; 39 40# Notify zygote of the wrapped process PID when using --invoke-with. 41allow appdomain zygote:fifo_file write; 42 43userdebug_or_eng(` 44 # Allow apps to create and write method traces in /data/misc/trace. 45 allow appdomain method_trace_data_file:dir w_dir_perms; 46 allow appdomain method_trace_data_file:file { create w_file_perms }; 47') 48 49# Notify shell and adbd of death when spawned via runas for ndk-gdb. 50allow appdomain shell:process sigchld; 51allow appdomain adbd:process sigchld; 52 53# child shell or gdbserver pty access for runas. 54allow appdomain devpts:chr_file { getattr read write ioctl }; 55 56# Use pipes and sockets provided by system_server via binder or local socket. 57allow appdomain system_server:fd use; 58allow appdomain system_server:fifo_file rw_file_perms; 59allow appdomain system_server:unix_stream_socket { read write setopt getattr getopt shutdown }; 60allow appdomain system_server:tcp_socket { read write getattr getopt shutdown }; 61 62# For AppFuse. 63allow appdomain vold:fd use; 64 65# Communication with other apps via fifos 66allow appdomain appdomain:fifo_file rw_file_perms; 67 68# Communicate with surfaceflinger. 69allow appdomain surfaceflinger:unix_stream_socket { read write setopt getattr getopt shutdown }; 70 71# App sandbox file accesses. 72allow { appdomain -isolated_app -mlstrustedsubject } { app_data_file privapp_data_file }:dir create_dir_perms; 73allow { appdomain -isolated_app -mlstrustedsubject } { app_data_file privapp_data_file }:file create_file_perms; 74 75# Access via already open fds is ok even for mlstrustedsubject. 76allow { appdomain -isolated_app } { app_data_file privapp_data_file system_app_data_file }:file { getattr map read write }; 77 78# Traverse into expanded storage 79allow appdomain mnt_expand_file:dir r_dir_perms; 80 81# Keychain and user-trusted credentials 82r_dir_file(appdomain, keychain_data_file) 83allow appdomain misc_user_data_file:dir r_dir_perms; 84allow appdomain misc_user_data_file:file r_file_perms; 85 86# TextClassifier 87r_dir_file({ appdomain -isolated_app }, textclassifier_data_file) 88 89# Access to OEM provided data and apps 90allow appdomain oemfs:dir r_dir_perms; 91allow appdomain oemfs:file rx_file_perms; 92 93# Execute the shell or other system executables. 94allow { appdomain -ephemeral_app } shell_exec:file rx_file_perms; 95allow { appdomain -ephemeral_app } toolbox_exec:file rx_file_perms; 96allow appdomain system_file:file x_file_perms; 97not_full_treble(`allow { appdomain -ephemeral_app } vendor_file:file x_file_perms;') 98 99# Renderscript needs the ability to read directories on /system 100allow appdomain system_file:dir r_dir_perms; 101allow appdomain system_file:lnk_file { getattr open read }; 102# Renderscript specific permissions to open /system/vendor/lib64. 103not_full_treble(` 104 allow appdomain vendor_file_type:dir r_dir_perms; 105 allow appdomain vendor_file_type:lnk_file { getattr open read }; 106') 107 108full_treble_only(` 109 # For looking up Renderscript vendor drivers 110 allow { appdomain -isolated_app } vendor_file:dir { open read }; 111') 112 113# Allow apps access to /vendor/app except for privileged 114# apps which cannot be in /vendor. 115r_dir_file({ appdomain -ephemeral_app }, vendor_app_file) 116allow { appdomain -ephemeral_app } vendor_app_file:file execute; 117 118# Allow apps access to /vendor/overlay 119r_dir_file(appdomain, vendor_overlay_file) 120 121# Allow apps access to /vendor/framework 122# for vendor provided libraries. 123r_dir_file(appdomain, vendor_framework_file) 124 125# Allow apps read / execute access to vendor public libraries. 126allow appdomain {vendor_public_framework_file vendor_public_lib_file}:dir r_dir_perms; 127allow appdomain {vendor_public_framework_file vendor_public_lib_file}:file { execute read open getattr map }; 128 129# Read/write wallpaper file (opened by system). 130allow appdomain wallpaper_file:file { getattr read write map }; 131 132# Read/write cached ringtones (opened by system). 133allow appdomain ringtone_file:file { getattr read write map }; 134 135# Read ShortcutManager icon files (opened by system). 136allow appdomain shortcut_manager_icons:file { getattr read map }; 137 138# Read icon file (opened by system). 139allow appdomain icon_file:file { getattr read map }; 140 141# Old stack dumping scheme : append to a global trace file (/data/anr/traces.txt). 142# 143# TODO: All of these permissions except for anr_data_file:file append can be 144# withdrawn once we've switched to the new stack dumping mechanism, see b/32064548 145# and the rules below. 146allow appdomain anr_data_file:dir search; 147allow appdomain anr_data_file:file { open append }; 148 149# New stack dumping scheme : request an output FD from tombstoned via a unix 150# domain socket. 151# 152# Allow apps to connect and write to the tombstoned java trace socket in 153# order to dump their traces. Also allow them to append traces to pipes 154# created by dumptrace. (Also see the rules below where they are given 155# additional permissions to dumpstate pipes for other aspects of bug report 156# creation). 157unix_socket_connect(appdomain, tombstoned_java_trace, tombstoned) 158allow appdomain tombstoned:fd use; 159allow appdomain dumpstate:fifo_file append; 160allow appdomain incidentd:fifo_file append; 161 162# Allow apps to send dump information to dumpstate 163allow appdomain dumpstate:fd use; 164allow appdomain dumpstate:unix_stream_socket { read write getopt getattr shutdown }; 165allow appdomain dumpstate:fifo_file { write getattr }; 166allow appdomain shell_data_file:file { write getattr }; 167 168# Allow apps to send dump information to incidentd 169allow appdomain incidentd:fd use; 170allow appdomain incidentd:fifo_file { write getattr }; 171 172# Allow apps to send information to statsd socket. 173unix_socket_send(appdomain, statsdw, statsd) 174 175# Write profiles /data/misc/profiles 176allow appdomain user_profile_root_file:dir search; 177allow appdomain user_profile_data_file:dir { search write add_name }; 178allow appdomain user_profile_data_file:file create_file_perms; 179 180# Send heap dumps to system_server via an already open file descriptor 181# % adb shell am set-watch-heap com.android.systemui 1048576 182# % adb shell dumpsys procstats --start-testing 183# debuggable builds only. 184userdebug_or_eng(` 185 allow appdomain heapdump_data_file:file append; 186') 187 188# /proc/net access. 189# TODO(b/9496886) Audit access for removal. 190# proc_net access for the negated domains below is granted (or not) in their 191# individual .te files. 192r_dir_file({ 193 appdomain 194 -ephemeral_app 195 -isolated_app 196 -platform_app 197 -priv_app 198 -shell 199 -system_app 200 -untrusted_app_all 201}, proc_net_type) 202# audit access for all these non-core app domains. 203userdebug_or_eng(` 204 auditallow { 205 appdomain 206 -ephemeral_app 207 -isolated_app 208 -platform_app 209 -priv_app 210 -shell 211 -su 212 -system_app 213 -untrusted_app_all 214 } proc_net_type:{ dir file lnk_file } { getattr open read }; 215') 216 217# Grant GPU access to all processes started by Zygote. 218# They need that to render the standard UI. 219allow { appdomain -isolated_app } gpu_device:chr_file rw_file_perms; 220 221# Use the Binder. 222binder_use(appdomain) 223# Perform binder IPC to binder services. 224binder_call(appdomain, binderservicedomain) 225# Perform binder IPC to other apps. 226binder_call(appdomain, appdomain) 227# Perform binder IPC to ephemeral apps. 228binder_call(appdomain, ephemeral_app) 229# Perform binder IPC to gpuservice. 230binder_call({ appdomain -isolated_app }, gpuservice) 231 232# Talk with graphics composer fences 233allow appdomain hal_graphics_composer:fd use; 234 235# Already connected, unnamed sockets being passed over some other IPC 236# hence no sock_file or connectto permission. This appears to be how 237# Chrome works, may need to be updated as more apps using isolated services 238# are examined. 239allow appdomain appdomain:unix_stream_socket { getopt getattr read write shutdown }; 240 241# Backup ability for every app. BMS opens and passes the fd 242# to any app that has backup ability. Hence, no open permissions here. 243allow appdomain backup_data_file:file { read write getattr map }; 244allow appdomain cache_backup_file:file { read write getattr map }; 245allow appdomain cache_backup_file:dir getattr; 246# Backup ability using 'adb backup' 247allow appdomain system_data_file:lnk_file r_file_perms; 248allow appdomain system_data_file:file { getattr read map }; 249 250# Allow read/stat of /data/media files passed by Binder or local socket IPC. 251allow { appdomain -isolated_app } media_rw_data_file:file { read getattr }; 252 253# Read and write /data/data/com.android.providers.telephony files passed over Binder. 254allow { appdomain -isolated_app } radio_data_file:file { read write getattr }; 255 256# Allow access to external storage; we have several visible mount points under /storage 257# and symlinks to primary storage at places like /storage/sdcard0 and /mnt/user/0/primary 258allow { appdomain -isolated_app -ephemeral_app } storage_file:dir r_dir_perms; 259allow { appdomain -isolated_app -ephemeral_app } storage_file:lnk_file r_file_perms; 260allow { appdomain -isolated_app -ephemeral_app } mnt_user_file:dir r_dir_perms; 261allow { appdomain -isolated_app -ephemeral_app } mnt_user_file:lnk_file r_file_perms; 262 263# Read/write visible storage 264allow { appdomain -isolated_app -ephemeral_app } sdcard_type:dir create_dir_perms; 265allow { appdomain -isolated_app -ephemeral_app } sdcard_type:file create_file_perms; 266# This should be removed if sdcardfs is modified to alter the secontext for its 267# accesses to the underlying FS. 268allow { appdomain -isolated_app -ephemeral_app } media_rw_data_file:dir create_dir_perms; 269allow { appdomain -isolated_app -ephemeral_app } media_rw_data_file:file create_file_perms; 270 271# Allow apps to use the USB Accessory interface. 272# http://developer.android.com/guide/topics/connectivity/usb/accessory.html 273# 274# USB devices are first opened by the system server (USBDeviceManagerService) 275# and the file descriptor is passed to the right Activity via binder. 276allow { appdomain -isolated_app -ephemeral_app } usb_device:chr_file { read write getattr ioctl }; 277allow { appdomain -isolated_app -ephemeral_app } usbaccessory_device:chr_file { read write getattr }; 278 279# For art. 280allow appdomain dalvikcache_data_file:file execute; 281allow appdomain dalvikcache_data_file:lnk_file r_file_perms; 282 283# Allow any app to read shared RELRO files. 284allow appdomain shared_relro_file:dir search; 285allow appdomain shared_relro_file:file r_file_perms; 286 287# Allow apps to read/execute installed binaries 288allow appdomain apk_data_file:dir r_dir_perms; 289allow appdomain apk_data_file:file rx_file_perms; 290 291# /data/resource-cache 292allow appdomain resourcecache_data_file:file r_file_perms; 293allow appdomain resourcecache_data_file:dir r_dir_perms; 294 295# logd access 296read_logd(appdomain) 297control_logd({ appdomain -ephemeral_app }) 298# application inherit logd write socket (urge is to deprecate this long term) 299allow appdomain zygote:unix_dgram_socket write; 300 301allow { appdomain -isolated_app -ephemeral_app } keystore:keystore_key { get_state get insert delete exist list sign verify }; 302allow { appdomain -isolated_app -ephemeral_app } keystore:keystore2_key { delete use get_info rebind update }; 303 304allow { appdomain -isolated_app -ephemeral_app } keystore_maintenance_service:service_manager find; 305allow { appdomain -isolated_app -ephemeral_app } keystore:keystore2 get_state; 306 307use_keystore({ appdomain -isolated_app -ephemeral_app }) 308 309use_credstore({ appdomain -isolated_app -ephemeral_app }) 310 311allow appdomain console_device:chr_file { read write }; 312 313# only allow unprivileged socket ioctl commands 314allowxperm { appdomain -bluetooth } self:{ rawip_socket tcp_socket udp_socket } 315 ioctl { unpriv_sock_ioctls unpriv_tty_ioctls }; 316 317allow { appdomain -isolated_app } ion_device:chr_file r_file_perms; 318allow { appdomain -isolated_app } dmabuf_system_heap_device:chr_file r_file_perms; 319allow { appdomain -isolated_app } dmabuf_system_secure_heap_device:chr_file r_file_perms; 320 321# Allow AAudio apps to use shared memory file descriptors from the HAL 322allow { appdomain -isolated_app } hal_audio:fd use; 323 324# Allow app to access shared memory created by camera HAL1 325allow { appdomain -isolated_app } hal_camera:fd use; 326 327# Allow apps to access shared memory file descriptor from the tuner HAL 328allow {appdomain -isolated_app} hal_tv_tuner_server:fd use; 329 330# RenderScript always-passthrough HAL 331allow { appdomain -isolated_app } hal_renderscript_hwservice:hwservice_manager find; 332allow appdomain same_process_hal_file:file { execute read open getattr map }; 333 334# TODO: switch to meminfo service 335allow appdomain proc_meminfo:file r_file_perms; 336 337# For app fuse. 338allow appdomain app_fuse_file:file { getattr read append write map }; 339 340pdx_client({ appdomain -isolated_app -ephemeral_app }, display_client) 341pdx_client({ appdomain -isolated_app -ephemeral_app }, display_manager) 342pdx_client({ appdomain -isolated_app -ephemeral_app }, display_vsync) 343pdx_client({ appdomain -isolated_app -ephemeral_app }, performance_client) 344# Apps do not directly open the IPC socket for bufferhubd. 345pdx_use({ appdomain -isolated_app -ephemeral_app }, bufferhub_client) 346 347### 348### CTS-specific rules 349### 350 351# For cts/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java. 352# testRunAsHasCorrectCapabilities 353allow appdomain runas_exec:file getattr; 354# Others are either allowed elsewhere or not desired. 355 356# Apps receive an open tun fd from the framework for 357# device traffic. Do not allow untrusted app to directly open tun_device 358allow { appdomain -isolated_app -ephemeral_app } tun_device:chr_file { read write getattr append ioctl }; 359allowxperm { appdomain -isolated_app -ephemeral_app } tun_device:chr_file ioctl TUNGETIFF; 360 361# Connect to adbd and use a socket transferred from it. 362# This is used for e.g. adb backup/restore. 363allow appdomain adbd:unix_stream_socket connectto; 364allow appdomain adbd:fd use; 365allow appdomain adbd:unix_stream_socket { getattr getopt ioctl read write shutdown }; 366 367allow appdomain cache_file:dir getattr; 368 369# Allow apps to run with asanwrapper. 370with_asan(`allow appdomain asanwrapper_exec:file rx_file_perms;') 371 372# Read access to FDs from the DropboxManagerService. 373allow appdomain dropbox_data_file:file { getattr read }; 374 375# Read tmpfs types from these processes. 376allow appdomain audioserver_tmpfs:file { getattr map read write }; 377allow appdomain system_server_tmpfs:file { getattr map read write }; 378allow appdomain zygote_tmpfs:file { map read }; 379 380### 381### Neverallow rules 382### 383### These are things that Android apps should NEVER be able to do 384### 385 386# Superuser capabilities. 387# bluetooth requires net_admin and wake_alarm. network stack app requires net_admin. 388neverallow { appdomain -bluetooth -network_stack } self:capability_class_set *; 389 390# Block device access. 391neverallow appdomain dev_type:blk_file { read write }; 392 393# Access to any of the following character devices. 394neverallow appdomain { 395 audio_device 396 camera_device 397 dm_device 398 radio_device 399 rpmsg_device 400 video_device 401}:chr_file { read write }; 402 403# Note: Try expanding list of app domains in the future. 404neverallow { untrusted_app isolated_app shell } graphics_device:chr_file { read write }; 405 406neverallow { appdomain -nfc } nfc_device:chr_file 407 { read write }; 408neverallow { appdomain -bluetooth } hci_attach_dev:chr_file 409 { read write }; 410neverallow appdomain tee_device:chr_file { read write }; 411 412# Privileged netlink socket interfaces. 413neverallow { appdomain -network_stack } 414 domain:{ 415 netlink_tcpdiag_socket 416 netlink_nflog_socket 417 netlink_xfrm_socket 418 netlink_audit_socket 419 netlink_dnrt_socket 420 } *; 421 422# These messages are broadcast messages from the kernel to userspace. 423# Do not allow the writing of netlink messages, which has been a source 424# of rooting vulns in the past. 425neverallow appdomain domain:netlink_kobject_uevent_socket { write append }; 426 427# Sockets under /dev/socket that are not specifically typed. 428neverallow appdomain socket_device:sock_file write; 429 430# Unix domain sockets. 431neverallow appdomain adbd_socket:sock_file write; 432neverallow { appdomain -radio } rild_socket:sock_file write; 433 434# ptrace access to non-app domains. 435neverallow appdomain { domain -appdomain }:process ptrace; 436 437# The Android security model guarantees the confidentiality and integrity 438# of application data and execution state. Ptrace bypasses those 439# confidentiality guarantees. Disallow ptrace access from system components 440# to apps. Crash_dump is excluded, as it needs ptrace access to 441# produce stack traces. llkd is excluded, as it needs ptrace access to 442# inspect stack traces for live lock conditions. 443 444neverallow { 445 domain 446 -appdomain 447 -crash_dump 448 userdebug_or_eng(`-llkd') 449} appdomain:process ptrace; 450 451# Read or write access to /proc/pid entries for any non-app domain. 452# A different form of hidepid=2 like protections 453neverallow appdomain { domain -appdomain }:file no_w_file_perms; 454neverallow { appdomain -shell } { domain -appdomain }:file no_rw_file_perms; 455 456# signal access to non-app domains. 457# sigchld allowed for parent death notification. 458# signull allowed for kill(pid, 0) existence test. 459# All others prohibited. 460# -perfetto is to allow shell (which is an appdomain) to kill perfetto 461# (see private/shell.te). 462neverallow appdomain { domain -appdomain -perfetto }:process 463 { sigkill sigstop signal }; 464 465# Write to rootfs. 466neverallow appdomain rootfs:dir_file_class_set 467 { create write setattr relabelfrom relabelto append unlink link rename }; 468 469# Write to /system. 470neverallow appdomain system_file:dir_file_class_set 471 { create write setattr relabelfrom relabelto append unlink link rename }; 472 473# Write to entrypoint executables. 474neverallow appdomain exec_type:file 475 { create write setattr relabelfrom relabelto append unlink link rename }; 476 477# Write to system-owned parts of /data. 478# This is the default type for anything under /data not otherwise 479# specified in file_contexts. Define a different type for portions 480# that should be writable by apps. 481neverallow appdomain system_data_file:dir_file_class_set 482 { create write setattr relabelfrom relabelto append unlink link rename }; 483 484# Write to various other parts of /data. 485neverallow appdomain drm_data_file:dir_file_class_set 486 { create write setattr relabelfrom relabelto append unlink link rename }; 487neverallow { appdomain -platform_app } 488 apk_data_file:dir_file_class_set 489 { create write setattr relabelfrom relabelto append unlink link rename }; 490neverallow { appdomain -platform_app } 491 apk_tmp_file:dir_file_class_set 492 { create write setattr relabelfrom relabelto append unlink link rename }; 493neverallow { appdomain -platform_app } 494 apk_private_data_file:dir_file_class_set 495 { create write setattr relabelfrom relabelto append unlink link rename }; 496neverallow { appdomain -platform_app } 497 apk_private_tmp_file:dir_file_class_set 498 { create write setattr relabelfrom relabelto append unlink link rename }; 499neverallow { appdomain -shell } 500 shell_data_file:dir_file_class_set 501 { create setattr relabelfrom relabelto append unlink link rename }; 502neverallow { appdomain -bluetooth } 503 bluetooth_data_file:dir_file_class_set 504 { create write setattr relabelfrom relabelto append unlink link rename }; 505neverallow { domain -credstore -init } credstore_data_file:dir_file_class_set *; 506neverallow appdomain 507 keystore_data_file:dir_file_class_set 508 { create write setattr relabelfrom relabelto append unlink link rename }; 509neverallow appdomain 510 systemkeys_data_file:dir_file_class_set 511 { create write setattr relabelfrom relabelto append unlink link rename }; 512neverallow appdomain 513 wifi_data_file:dir_file_class_set 514 { create write setattr relabelfrom relabelto append unlink link rename }; 515neverallow appdomain 516 dhcp_data_file:dir_file_class_set 517 { create write setattr relabelfrom relabelto append unlink link rename }; 518 519# access tmp apk files 520neverallow { appdomain -untrusted_app_all -platform_app -priv_app } 521 { apk_tmp_file apk_private_tmp_file }:dir_file_class_set *; 522 523neverallow untrusted_app_all { apk_tmp_file apk_private_tmp_file }:{ devfile_class_set dir fifo_file lnk_file sock_file } *; 524neverallow untrusted_app_all { apk_tmp_file apk_private_tmp_file }:file ~{ getattr read }; 525 526# Access to factory files. 527neverallow appdomain efs_file:dir_file_class_set write; 528neverallow { appdomain -shell } efs_file:dir_file_class_set read; 529 530# Write to various pseudo file systems. 531neverallow { appdomain -bluetooth -nfc } 532 sysfs:dir_file_class_set write; 533neverallow appdomain 534 proc:dir_file_class_set write; 535 536# Access to syslog(2) or /proc/kmsg. 537neverallow appdomain kernel:system { syslog_read syslog_mod syslog_console }; 538 539# SELinux is not an API for apps to use 540neverallow { appdomain -shell } *:security { compute_av check_context }; 541neverallow { appdomain -shell } *:netlink_selinux_socket *; 542 543# Ability to perform any filesystem operation other than statfs(2). 544# i.e. no mount(2), unmount(2), etc. 545neverallow appdomain fs_type:filesystem ~getattr; 546 547# prevent creation/manipulation of globally readable symlinks 548neverallow appdomain { 549 apk_data_file 550 cache_file 551 cache_recovery_file 552 dev_type 553 rootfs 554 system_file 555 tmpfs 556}:lnk_file no_w_file_perms; 557 558# Applications should use the activity model for receiving events 559neverallow { 560 appdomain 561 -shell # bugreport 562} input_device:chr_file ~getattr; 563 564# Do not allow access to Bluetooth-related system properties except for a few allowed domains. 565# neverallow rules for access to Bluetooth-related data files are above. 566neverallow { 567 appdomain 568 -bluetooth 569 -system_app 570} { bluetooth_audio_hal_prop bluetooth_a2dp_offload_prop bluetooth_prop exported_bluetooth_prop }:file create_file_perms; 571 572# Apps cannot access proc_uid_time_in_state 573neverallow appdomain proc_uid_time_in_state:file *; 574 575# Apps cannot access proc_uid_concurrent_active_time 576neverallow appdomain proc_uid_concurrent_active_time:file *; 577 578# Apps cannot access proc_uid_concurrent_policy_time 579neverallow appdomain proc_uid_concurrent_policy_time:file *; 580 581# Apps cannot access proc_uid_cpupower 582neverallow appdomain proc_uid_cpupower:file *; 583 584# Apps may not read /proc/net/{tcp,tcp6,udp,udp6}. These files leak information across the 585# application boundary. VPN apps may use the ConnectivityManager.getConnectionOwnerUid() API to 586# perform UID lookups. 587neverallow { appdomain -shell } proc_net_tcp_udp:file *; 588 589# Apps cannot access bootstrap files. The bootstrap files are only for 590# extremely early processes (like init, etc.) which are started before 591# the runtime APEX is activated and Bionic libs are provided from there. 592# If app process accesses (or even load/execute) the bootstrap files, 593# it might cause problems such as ODR violation, etc. 594neverallow appdomain system_bootstrap_lib_file:file 595 { open read write append execute execute_no_trans map }; 596neverallow appdomain system_bootstrap_lib_file:dir 597 { open read getattr search }; 598 599# Allow to read ro.vendor.camera.extensions.enabled 600get_prop(appdomain, camera2_extensions_prop) 601 602# Allow to ro.camerax.extensions.enabled 603get_prop(appdomain, camerax_extensions_prop) 604