1.在init.rc中添加:
service bootsound /system/bin/bootsound
user media
group audio
disabled
oneshot
on property:init.svc.bootanim=running
start bootsound
on property:init.svc.bootanim=stopped
stop bootsound
可根据环境变量在适当的地方开始bootsound服务,如:
on property:init.svc.bootanim=running
on property:init.svc.bootanim=stopped
on property:dev.bootcomplete=1
2.在/system/bin创建bootsound,并给予权限
#!/system/bin/sh
#bootsound - plays a sound at boot
stagefright -a -o /system/media/boot.mp3
3.在/system/media中添加boot.mp3文件,并给予权限
阅读(1697) | 评论(2) | 转发(0) |