Service to run script after boot Android 14

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Service to run script after boot Android 14

657 Views
shiva141
Contributor II

Hi,

We are trying execute script after boot

We are able to run the script with root privileges and get expected results.

but it fails when it try to execute after sys.boot_completed 

1)Script file is cp to /vendor/bin/ using device.mk
we have give executable permission to script file and then cp to target using device.mk

2 )We have added Sepolicy  and context_file 

3) We have added a service to call the script in init.imx8mp.rc

attached changes as patch for reference

the service get started getting error in dmesg permissive 0

 

[ 40.892401] type=1400 audit(1738600947.360:11): avc: denied { write } for comm="touch" name="local" dev="dm-45" ino=69 scontext=u:r:tinymix-setup-sh:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0

ANDROID-AUTO IMX8MPLUS 

0 Kudos
Reply
1 Reply

626 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You have not added the permission of the root privilegies. you need to make chmod at moment of save the file.

regards

 

0 Kudos
Reply