当前位置:网站首页>rk3399 9.0 boot and execute .sh file
rk3399 9.0 boot and execute .sh file
2022-08-07 18:04:00 【Do you want to buy groceries!】
Function: Create a folder in the /sdcard/ root directory after booting. Since the /sdcard/ mount is completed after the system is booted, it can only be achieved by executing the sh file at boot.
1.First define the service, add the service definition and start in device/rockchip/common/init.rk30board.rc
service customer_service /vendor/bin/sh /vendor/bin/customer_service.shclass late_startuser rootgroup rootdisabledoneshotseclabel u:r:customer_sevice:s0on property:sys.boot_completed=1start customer_service2. Give the corresponding permissions for the service
Add in device/rockchip/common/sepolicy/vendor/file_contexts
/vendor/bin/customer_service.sh u:object_r:customer_service_exec:s0Add customer_service.te file under device/rockchip/common/sepolicy/vendor/
type customer_service, domain;type customer_service_exec, exec_type, vendor_file_type, file_type;init_daemon_domain(customer_service)allow customer_service vendor_shell_exec:file rx_file_perms;allow customer_service system_file:file rx_file_perms;3. Add the customer_service.sh file as follows
#! /vendor/bin/shsleep 10mkdir -p /sdcard/Configuration Among them, sleep 10 is to mount /sdcard/ after the system is started. This is necessary, otherwise it cannot be created successfully.
—————————————————
Copyright statement: This article is an original article by CSDN blogger "Max.Chen", following the CC 4.0 BY-SA copyright agreement, please reprintA link to the original source and this statement are attached.
Original link: https://blog.csdn.net/chgh1306/article/details/123960547
边栏推荐
猜你喜欢
随机推荐
Why does the computer show offline when printing? What should I do if the computer shows offline when printing?
记一次内部分享——瞎扯淡
tiup cluster reload
tiup cluster patch
企鹅电竞登录鉴权系统架构与核心数据热备容灾方案
636. Exclusive time of functions: Simple stack application simulation problem
dart中int类型变量与String类型变量拼接的三种方式
Win7系统升级失败提示错误代码0X80070643如何解决
2022-8-7
What to do if there is no sound when watching TV on the computer
How can corporate culture cure corporate "internal friction"?
分布式一致性协议 之 Paxos协议
Win7 can't open the mobile hard disk what's wrong _ win7 can't open the mobile hard disk solution tutorial
Go 语言快速入门指南:指针、Map
1、一颗芯片是如何诞生的
tiup集群缩小
How to solve the problem that the U disk cannot be detected in win10_How to solve the problem that the U disk cannot be recognized by the win10 system
ResNet架构解析
05-树7 堆中的路径(最小堆)
图像坐标转像素坐标得到偏差









