简体   繁体   English

使用android init脚本创建空文件

[英]Create empty file with android init script

Is it possible to create empty file in android source code with init rc script like we create folder. 是否可以使用init rc脚本在android源代码中创建空文件,就像我们创建文件夹一样。 mkdir /tmp creates folder but touch /tmp/test doesn't do anything. mkdir / tmp创建文件夹,但触摸/ tmp / test不执行任何操作。

pls help 请帮助

the 'write' or 'copy' command works. 'write'或'copy'命令有效。

but please make ensure the commands are added after the filesystems are mounted, for example, at the end of "on post-fs-data" 但请确保在安装文件系统后添加命令,例如,在“post-fs-data”结尾处

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM