<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Questions about Android init.rc</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Questions-about-Android-init-rc/m-p/437535#M67067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recently, I started to look into the code parsing init.rc, which is in $(android_source_root)/system/core/init/ folder. I wrote a statement for creating a folder in init.rc on the "on post-of-data" action, "mkdir /data/test_dir 0770 system system" for instance. After booting, the directory is actually created. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, when I traced the code, I realized the commands in init.rc file are actually recognized by init.c and they are parsed in parse_config function. There is an array for mapping all the commands with their functions and I noticed mkdir command is actually implemented by do_mkdir function. The tricky thing is, I wrote some codes to log the folder path do_mkdir gonna to create and found "/data/test_dir" is not logged but this folder is actually created. So which function really creates folders that we write in init.rc file? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2015 02:48:03 GMT</pubDate>
    <dc:creator>eddiehuang</dc:creator>
    <dc:date>2015-10-06T02:48:03Z</dc:date>
    <item>
      <title>Questions about Android init.rc</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Questions-about-Android-init-rc/m-p/437535#M67067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recently, I started to look into the code parsing init.rc, which is in $(android_source_root)/system/core/init/ folder. I wrote a statement for creating a folder in init.rc on the "on post-of-data" action, "mkdir /data/test_dir 0770 system system" for instance. After booting, the directory is actually created. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, when I traced the code, I realized the commands in init.rc file are actually recognized by init.c and they are parsed in parse_config function. There is an array for mapping all the commands with their functions and I noticed mkdir command is actually implemented by do_mkdir function. The tricky thing is, I wrote some codes to log the folder path do_mkdir gonna to create and found "/data/test_dir" is not logged but this folder is actually created. So which function really creates folders that we write in init.rc file? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 02:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Questions-about-Android-init-rc/m-p/437535#M67067</guid>
      <dc:creator>eddiehuang</dc:creator>
      <dc:date>2015-10-06T02:48:03Z</dc:date>
    </item>
  </channel>
</rss>

