android Make file 学习(1)- 如何添加配置文件到/system/etc/

方法一:
 
 
Android.mk:
配置如下:
 
1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_MODULE := gps.conf
5LOCAL_MODULE_TAGS := optional
6LOCAL_MODULE_CLASS := ETC
7LOCAL_MODULE_PATH  := $(TARGET_OUT_ETC)/
8LOCAL_SRC_FILES := gps.conf
9
10include $(BUILD_PREBUILT)
 
 
相关模块:
LOCAL_REQUIRED_MODULES := \
	gps.conf
 
方法二:
 
device.mk 中PRODUCT_COPY_FILES 拷贝
LOCAL_REQUIRED_MODULES := \
以下是一个示例配置审计规则的 /etc/audit/rules.d/audit.rules 文件,你可以在此基础上进行修改: # This file contains the auditctl rules that are loaded # whenever the audit daemon is started via the initscripts. # The rules are simply the parameters that would be passed # to auditctl. # First rule - delete all -D # Increase the buffers to survive stress events. # Make this bigger for busy systems -b 8192 # Set failure mode to syslog -f 1 # Audit mount and umount syscall events -a exit,always -F arch=b64 -S mount -F auid>=1000 -F auid!=unset -k mount -a exit,always -F arch=b32 -S mount -F auid>=1000 -F auid!=unset -k mount -a exit,always -F arch=b64 -S umount2 -F auid>=1000 -F auid!=unset -k umount # Audit LXC events -w /var/lib/lxc/ -p rwa -k lxc # Audit cron jobs -w /etc/cron.hourly/ -p rwa -k cron.hourly -w /etc/cron.daily/ -p rwa -k cron.daily -w /etc/cron.weekly/ -p rwa -k cron.weekly -w /etc/cron.monthly/ -p rwa -k cron.monthly # Audit user and group modifications -w /etc/group -p wa -k usergroup -w /etc/passwd -p wa -k usergroup -w /etc/gshadow -p wa -k usergroup -w /etc/shadow -p wa -k usergroup # Audit package and yum operations -w /etc/yum/ -p rwa -k yum -w /usr/bin/rpm -a exit,always -F arch=b64 -S open -F perm=x -F auid>=1000 -F auid!=unset -k rpm # Audit system calls -a exit,always -F arch=b32 -S uname -k systemcalls -a exit,always -F arch=b64 -S uname -k systemcalls -a exit,always -F arch=b32 -S sethostname -k systemcalls -a exit,always -F arch=b64 -S sethostname -k systemcalls -a exit,always -F arch=b32 -S setdomainname -k systemcalls -a exit,always -F arch=b64 -S setdomainname -k systemcalls # Audit system logins -w /var/log/lastlog -p wa -k logins -w /var/log/wtmp -p wa -k logins # Audit selinux changes -w /etc/selinux/ -p rwa -k selinux # Audit firewall changes -w /etc/firewalld/ -p rwa -k firewalld # Audit sudo operations -w /var/log/sudo.log -p wa -k sudo # Audit SSH sessions -w /var/log/secure -p wa -k ssh # Audit network socket operations -a exit,always -F arch=b32 -S socketcall -k netsockets -a exit,always -F arch=b64 -S socketcall -k netsockets -a exit,always -F arch=b32 -S sendto -k netsockets -a exit,always -F arch=b64 -S sendto -k netsockets -a exit,always -F arch=b32 -S recvfrom -k netsockets -a exit,always -F arch=b64 -S recvfrom -k netsockets
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值