[英]"Run Command" file editing (i.e. " *.rc " files): Echoing to the terminal like Linux?
I am editing the Android phone file "init.tuna.rc" so that it prints to me some basic debugging checkpoint messages so I can analyze how far the phone gets in the boot process.我正在编辑 Android 手机文件“init.tuna.rc”,以便它向我打印一些基本的调试检查点消息,以便我可以分析手机在启动过程中的进展情况。
Does anyone know if you can simply insert the shell scripting syntax for console printing into a "run command" file (.rc)?有谁知道您是否可以简单地将用于控制台打印的 shell 脚本语法插入到“运行命令”文件 (.rc) 中?
(I need to know this if someone can help me before I rebuild all of my code for the Android tree to test this debugging code, given the process can a while) (如果有人可以在我为 Android 树重建所有代码以测试此调试代码之前,如果有人可以帮助我,我需要知道这一点,因为该过程可能需要一段时间)
Will the following work?以下会起作用吗? I want to insert in the following code snippet into the "init.tuna.rc" file:
我想将以下代码片段插入到“init.tuna.rc”文件中:
# Boot debugging Checkpoint #2
echo "Check #2: Successfully wrote the file system data, including the wifi directories!"
If this does not work, what can I do to get the "rc" file to print messages to the actual terminal as it executes?如果这不起作用,我该怎么做才能让“rc”文件在执行时将消息打印到实际终端?
Android Boot Language is documented in a readme.txt
file in the source tree under <android>/system/core/init
. Android 启动语言记录在
<android>/system/core/init
下源树中的readme.txt
文件中。 No echo
is mentioned, but you can try.没有提到
echo
,但你可以试试。 Also remember that you should write to a file because stderr and stdout are redirected to /dev/null
.还要记住,您应该写入文件,因为 stderr 和 stdout 被重定向到
/dev/null
。
See https://github.com/aosp-mirror/platform_system_core/blob/master/init/README.md见https://github.com/aosp-mirror/platform_system_core/blob/master/init/README.md
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.