imx6q android 添加开机启动脚本

1.在xx/out/target/product/sabresd_6dq/root/init.rc中添加以下内容
==========================================
service android-user /system/etc/android-user.sh
class main
user root
group root
oneshot
========================================
2.重新编译boot.img //把init.rc文件编译到boot.img
cd xxx/out/target/product/sabresd_6dq
rm -rf boot*.img && rm recovery -rf && rm recovery*.img
cd xxx/
make bootimage BUILD_TARGET_DEVICE=sd
make recoveryimage BUILD_TARGET_DEVICE=sd
cd xxx/out/target/product/sabresd_6dq
simg2img system.img system_raw.img


3.挂载system_raw.img, 并编辑脚步文件
sudo bash
mount system_raw.img tmp/
touch tmp/etc/android-user.sh
chmod 777 tmp/etc/android-user.sh

posted on 2019-02-26 18:05  绿色star  阅读(496)  评论(0编辑  收藏  举报

导航