I am trying to copy a file from AOSP vendor/*/hardware/interfaces/gnss/file.txt to /data/vendor/gnss/file.txt using PRODUCT_COPY_FILES in Android.mk file.
At build there is no problem and even i can see in out folder the file is copied successfully at the destination folder.
But at boot time my system is going into recovery mode.
Here is the boot logs from serial port.
[ 18.057011] init (pid 1) is setting an IV_INO_LBLK_32 encryption policy.
This should only be used if there are certain hardware limitations.
[ 18.071009] fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-ce"
[ 18.121583] type=1400 audit(1716.495:868): avc: denied { read } for comm="ls" name="vendor" dev="dm-6"
ino=22 scontext=u:r:toolbox:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=dir permissive=1
[ 18.140034] type=1400 audit(1716.495:869): avc: denied { open } for comm="ls" path="/data/vendor" dev="dm-6"
ino=22 scontext=u:r:toolbox:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=dir permissive=1
[ 18.159105] type=1400 audit(1716.495:870): avc: denied { getattr } for comm="ls" path="/data/vendor/gnss" dev="dm-6"
ino=23 scontext=u:r:toolbox:s0 tcontext=u:object_r:hal_gnss_data_file:s0 tclass=dir permissive=1
[ 18.217990] binder: 561:561 ioctl 40046210 7fe9923eb4 returned -22
[ 18.223410] binder: release 460:460 transaction 133 out, still active
[ 18.227181] binder: 561:561 ioctl 40046210 7fe9923d74 returned -22
[ 18.233098] binder: undelivered TRANSACTION_COMPLETE
[ 18.246410] binder: release 457:457 transaction 133 in, still active
[ 18.253062] binder: send failed reply for transaction 133, target dead
[ 18.254199] ais_server (388) used greatest stack depth: 10656 bytes left
[ 18.257814] rmt_storage:ERR:main: Mmap Failed for rmts (-1)...pausing execution!
[ 18.366280] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 469 IFE2 close
[ 18.372738] CAM_INFO: CAM-ISP: ais_ife_csid_force_reset: 1088 Exit (0)
[ 18.379467] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 487 IFE2 shutdown complete
[ 18.387035] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 469 IFE1 close
[ 18.393477] CAM_INFO: CAM-ISP: ais_ife_csid_force_reset: 1088 Exit (0)
[ 18.400194] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 487 IFE1 shutdown complete
[ 18.407742] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 469 IFE0 close
[ 18.414249] CAM_INFO: CAM-ISP: ais_ife_csid_force_reset: 1088 Exit (0)
[ 18.420990] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 487 IFE0 shutdown complete
[ 18.428560] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 469 IFE0 close
[ 18.435024] CAM_ERR: CAM-ISP: ais_ife_subdev_close: 473 IFE device is already closed
[ 18.442977] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 469 IFE1 close
[ 18.449431] CAM_ERR: CAM-ISP: ais_ife_subdev_close: 473 IFE device is already closed
[ 18.457389] CAM_INFO: CAM-ISP: ais_ife_subdev_close: 469 IFE2 close
[ 18.463847] CAM_ERR: CAM-ISP: ais_ife_subdev_close: 473 IFE device is already closed
[ 21.273726] init: Waiting for 21 pids to be reaped took 3038ms with 1 of them still running
[ 21.282355] init: [service-misbehaving] : service 'ais_v4l2_proxy' is still running 3000ms after receiving SIGTERM
[ 21.293013] init: Stopping 242 services by sending SIGKILL
[ 21.298681] init: Sending signal 9 to service 'ais_v4l2_proxy' (pid 467) process group...
[ 21.312689] libprocessgroup: Successfully killed process cgroup uid 1000 pid 467 in 5ms
[ 21.322026] init: Service 'ais_v4l2_proxy' (pid 467) received signal 9
[ 21.331809] init: Calling /system/bin/vdc volume abort_fuse
[ 21.361675] binder: 564:564 ioctl 40046210 7feb9b29a4 returned -22
[ 21.372695] init: Calling /system/bin/vdc volume shutdown
[ 21.401521] binder: 565:565 ioctl 40046210 7fe283f284 returned -22
[ 21.412071] init: Sending signal 9 to service 'vold' (pid 463) process group...
[ 21.425189] libprocessgroup: Successfully killed process cgroup uid 0 pid 463 in 5ms
[ 21.657274] mmc0: error -22 during shutdown
[ 21.662032] msm-dwc3 a800000.hsusb: DWC3 exited from low power mode
[ 21.670224] Calling SCM to disable SPMI PMIC arbiter
[ 21.675438] Failed to halt_spmi_pmic_arbiter=0xfffffffb
[ 21.681356] reboot: Restarting system with command 'recovery'
[ 21.687346] Going down for restart now
#Excepting: system should boot normally and stay idle. It should not reboot again into recovery mode.