摘自:http://hi.baidu.com/supertreeman/blog/item/f96ea8119ff3b64ff919b847.html
android有時會遇到把自己制作的initlogo.rle放入 根目錄下,第一次啟動能夠看到圖檔,第2次啟動就有看不了,提示沒有 initlogo.rle?
Warning: unable to open an initial console.
init: cannot open '/initlogo.rle'
sh: can't access tty; job control turned off
# warning: `rild' uses 32-bit capabilities (legacy support in use)
request_suspend_state: wakeup (3->0) at 37524223497 (2010-10-21 05:11:00.258831729 UTC)
檢視代碼可發現,在system/core/init/init.c [load_565rle_image] --> logo.c中 ,顯示完畢initlogo.rle之後作了 unlink 操作。該操作對于android 預設的隻讀型system.img 是沒問題,, 但對于自定義的yaffs 或者 ubi形式的可讀寫型的system.img時就有問題了。會造成将initlogo.rle删除,下次啟動時讀取不到該檔案。可以通過注釋掉logo.c的load_565rle_image()中的unlink(fn)語句來規避該問題。