1. Environment
Qualcomm 865 virtualization Android 10
2. Scenario
Added boot script and keep-alive function
3. Specific implementation
3.1 vendor/vxxxxters/vir-dev/copy.mk
#xhd
PRODUCT_COPY_FILES += vendor/vxxxters/vir-dev/bin/xhd:vendor/bin/xhd
3.2 Add the xhd.rc file to the vendor/thundersec/source/container/android/rootfs/vendor_rc/ directory
The contents of the xhd.rc file are as follows:
service xhd /vendor/bin/xhd
user root
group root
seclabel u:r:su:s0
on property:sys.boot_completed=1
start xhd
3.3 Add xhd script to vendor/vclusters/vir-dev/bin/ directory
4. Verify whether the script process exists
aaaa:/ # ps -ef | grep xhd
root 3497 1 1 15:57:40 ? 00:00:00 sh /vendor/bin/xhd
root 3515 1561 1 15:57:43 pts/0 00:00:00 grep xhd