1 # android debug logging, logpersist domains 2 type logpersist, domain; 3 4 ### 5 ### Neverallow rules 6 ### 7 ### logpersist should NEVER do any of this 8 9 # Block device access. 10 neverallow logpersist dev_type:blk_file { read write }; 11 12 # ptrace any other app 13 neverallow logpersist domain:process ptrace; 14 15 # Write to files in /data/data or system files on /data except misc_logd_file 16 neverallow logpersist { app_data_file system_data_file }:dir_file_class_set write; 17 18 # Only init should be allowed to enter the logpersist domain via exec() 19 # Following is a list of debug domains we know that transition to logpersist 20 # neverallow_with_undefined_domains { 21 # domain 22 # -init # goldfish, logcatd, raft 23 # -mmi # bat, mtp8996, msmcobalt 24 # -system_app # Smith.apk 25 # } logpersist:process transition; 26 neverallow * logpersist:process dyntransition; 27