简体   繁体   English

“运行命令”文件编辑(即“*.rc”文件):像Linux一样回声到终端?

[英]"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.mdhttps://github.com/aosp-mirror/platform_system_core/blob/master/init/README.md

暂无
暂无

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

相关问题 如何将我的活动显示在Android联系人菜单中,例如facebook app? - How can I have my activity display in android contact menu, like i.e. facebook app? 如何在 Android Studio 的所有页面上保存功能(即 SFX 或音乐等设置)? - How to save a feature (i.e. setting like SFX or Music) across all pages in Android Studio? 当我单击按钮时重新转换(例如,从当前活动到自己的活动,如“意图”) - Re-Transition when I click on button (e.g./i.e. Like Intent from current Activity to self Activity) 使用自定义添加的视图(例如对于空列表)时的Android DiffUtil不一致异常 - Android DiffUtil inconsistency exceptions when using custom added views like i.e. for empty lists 每当单击按钮时,都不会在布局屏幕中以新的方式(例如0、1、2、3、4 ..)更新新的String,而是以一种模式(例如0、1、2、3、4 ..) - Updating the new String in the layout screen not randomly, but in a pattern(i.e. like 0,1,2,3,4..) whenever the button is clicked Android 模拟器:编辑 init.rc 文件 - Android emulator: editing init.rc file 在设备本身上运行 adb,即好像它是发出命令的 PC - Run adb on the device itself, i.e. as if it were the PC issuing the commands 如何在非活动文件中调用 SupportMapFragment,即 RecyclerView Adapter - How to call SupportMapFragment in non activity files i.e. RecyclerView Adapter 无法读取其他应用程序(即 Whatsapp)共享的文件 Uri - Unable to read files Uri shared by other app i.e. Whatsapp Android 2.1(Eclair)的.dex文件格式,即API级别7 - Format of .dex files for Android 2.1 (Eclair), i.e. API level 7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM