【问题标题】:Create empty file with android init script使用 android init 脚本创建空文件
【发布时间】:2014-06-19 17:38:12
【问题描述】:

是否可以像我们创建文件夹一样使用 init rc 脚本在 android 源代码中创建空文件。 mkdir /tmp 创建文件夹但 touch /tmp/test 什么都不做。

请帮忙

【问题讨论】:

标签: android android-source init


【解决方案1】:

“写入”或“复制”命令有效。

但请确保在挂载文件系统后添加命令,例如在“on post-fs-data”的末尾

    on post-fs-data
        ...
        write /data/non-empty-file 0
        ...
        copy /dev/null /data/empty-file

【讨论】:

    猜你喜欢
    • 2012-09-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-03
    相关资源
    最近更新 更多