init.target.rc文件中文件夹一直创建不成功

最近改了一个bug,是device/*/*/init.target.rc(6.0.1)文件中创建的文件夹,一直没有被创建成功。

on early-boot

mkdir /data/min 0755 root root

这句命令在之前的版本的手机上是一直成功的,然后这一期的平板突然不对了。

修改成以下的命令,就对了。

on post-fs-data

mkdir /data/min 0755 root root

究其原因,是因为google在这方面做了以下修改。

https://source.android.com/security/encryption/

【3.Mount /data 】

vold then mounts the decrypted real /data partition and then prepares the new partition.

It sets the property vold.post_fs_data_done to 0 and then sets vold.decrypt to trigger_post_fs_data.

This causes init.rc to run its post-fs-data commands.

They will create any necessary directories or links and then set vold.post_fs_data_done to 1.

所以想在/data/目录下创建文件夹的话,要在on post-fs-data的时候进行。

下面是init.rc执行的顺序。

  1. on early-init
  2. on init
  3. on early-fs
  4. on fs
  5. on post-fs
  6. on post-fs-data
  7. on early-boot
  8. on boot

转载于:https://www.cnblogs.com/minminjy123/p/5345410.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值