<?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のトピックRe: Configuring CAN Interface at boot up for Android 10</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1578520#M199683</link>
    <description>&lt;P&gt;Hello tony,&lt;/P&gt;&lt;P&gt;I have refer your post and I tried the same script with below content.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#!/system/bin/sh&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ip link set can0 up type can bitrate 100000&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if i run same command with adb (&lt;STRONG&gt;ip link set can0 up type can bitrate 100000&lt;/STRONG&gt;) it works.&lt;/P&gt;&lt;P&gt;But not work inside the script and&lt;STRONG&gt;&amp;nbsp;init.cancfg.sh &lt;/STRONG&gt;throw the error as below.&lt;/P&gt;&lt;P&gt;bitrate not found.&lt;/P&gt;&lt;P&gt;why the same command working on debugg terminal not working inside the sh file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 10:24:22 GMT</pubDate>
    <dc:creator>Adi99</dc:creator>
    <dc:date>2023-01-06T10:24:22Z</dc:date>
    <item>
      <title>Configuring CAN Interface at boot up for Android 10</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1163632#M162996</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My aim is to configure the CAN interface at boot up on a iMX8M device running the Android 10 release. I know that this is normally defined in /etc/network/interfaces for Linux devices and I couldn't find a similar interface file in the Android build. I've attempted to create a service in my init.imx8mq_rc file and wrote a script that executes the CAN interface through the command line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In my init.imx8mq.rc I have&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on property:sys.boot_completed=1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; start init-cancfg-sh&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;service init-cancfg-sh /vendor/bin/init.cancfg.sh&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; class main&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; user root&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; group root system.&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; oneshot&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My script init.cancfg.sh contains&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#!/system/bin/sh&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ip link set can0 up type can bitrate 250000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Note: I have also set SELinux at boot up time in permissive mode.&lt;/P&gt;&lt;P&gt;The service isn't started and I'm not sure what I'm missing with this approach. I am relatively new to customizing AOSP ROMs and any input would be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 17:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1163632#M162996</guid>
      <dc:creator>tpe</dc:creator>
      <dc:date>2020-10-07T17:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring CAN Interface at boot up for Android 10</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1164146#M163065</link>
      <description>&lt;P&gt;I solved this issue.&lt;/P&gt;&lt;P&gt;In addition to the setup I had in my description, I had to do the following to get my script to work:&lt;/P&gt;&lt;P&gt;- In &lt;STRONG&gt;device/myvendor/mydevice/sepolicy/file_contexts&lt;/STRONG&gt; I added:&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; &amp;nbsp; /vendor/bin/init\.cancfg\.sh u:object_r:init-cancfg-sh_exec:s0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;- In&amp;nbsp;&lt;STRONG&gt;device/myvendor/mydevice/sepolicy/init-cancfg-sh.te&lt;/STRONG&gt; I added a new domain:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; type init-cancfg-sh, domain;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; type init-cancfg-sh_exec, exec_type, vendor_file_type, file_type;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; init_daemon_domain(init-cancfg-sh)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; allow init-cancfg-sh vendor_shell_exec:file rx_file_perms;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; allow init-cancfg-sh vendor_toolbox_exec:file rx_file_perms;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Copy the script in the device.mk file:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; PRODUCT_COPY_FILES += \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(IMX_DEVICE_PATH)/init.cancfg.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.cancfg.sh&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 21:22:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1164146#M163065</guid>
      <dc:creator>tpe</dc:creator>
      <dc:date>2020-10-07T21:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring CAN Interface at boot up for Android 10</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1578520#M199683</link>
      <description>&lt;P&gt;Hello tony,&lt;/P&gt;&lt;P&gt;I have refer your post and I tried the same script with below content.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#!/system/bin/sh&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ip link set can0 up type can bitrate 100000&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if i run same command with adb (&lt;STRONG&gt;ip link set can0 up type can bitrate 100000&lt;/STRONG&gt;) it works.&lt;/P&gt;&lt;P&gt;But not work inside the script and&lt;STRONG&gt;&amp;nbsp;init.cancfg.sh &lt;/STRONG&gt;throw the error as below.&lt;/P&gt;&lt;P&gt;bitrate not found.&lt;/P&gt;&lt;P&gt;why the same command working on debugg terminal not working inside the sh file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 10:24:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-CAN-Interface-at-boot-up-for-Android-10/m-p/1578520#M199683</guid>
      <dc:creator>Adi99</dc:creator>
      <dc:date>2023-01-06T10:24:22Z</dc:date>
    </item>
  </channel>
</rss>

