How to successfully execute a script from init.rc

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to successfully execute a script from init.rc

594件の閲覧回数
Shanga
Contributor III

We are using the i.MX8MP EVK and are trying to add a script to run after boot or after file system.we tried the below on  init.rc:

on property:sys.boot_completed=1
    start initAsic

service initAsic /system/xbin/script.sh
    seclabel u:r:init:s0
    user root
    group root
    oneshot
    disabled

The script's contents are,

 

echo "hello" > /data/local/tmp/file.test
iptables -P FORWARD DROP

 

However, we are not seeing the expected output after boot.The string "hello" is not seen in file.test
We have also run setenforce 0, but it hasn’t made any difference.

 

please share step for running script after boot or after file system is up

 #ANDROID14

ラベル(2)
0 件の賞賛
返信
1 返信

522件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Your init.rc seems correct, did you give your script the needed permission to write a file?
Which init.rc file are you modifying?
Also, did you rebuild your android image after the modifications?

Best regards/Saludos,
Aldo.

0 件の賞賛
返信