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