<?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のトピックChange system time &amp; write GPIO value by APP in Android JB 4.3</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Change-system-time-write-GPIO-value-by-APP-in-Android-JB-4-3/m-p/314247#M41267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think this is a general question for Android JB 4.3 which include a new security control, SELinux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Our project originally was based on imx6 &amp;amp; Android ICS 4.0.3, due to cost concern we downgrade the CPU to imx6 Sololite but upgrade the BSP to Android JB 4.3 w/o choice since it's the only available version for imx6 Sololite. But due to JB 4.3's &lt;/SPAN&gt;strict security, our below solution for "system time change &amp;amp; writing GPIO value by APP" which works in ICS 4.0.3 is failed in JB 4.3:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Add below into /device/fsl/imx6/etc/init.rc :&lt;/P&gt;&lt;P&gt;chmod 666 /dev/alarm (for system time)&lt;/P&gt;&lt;P&gt;chmod 666 /sys/class/gpio/gpio12/value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Implement &lt;SPAN style="font-size: 10pt;"&gt;OnTimeChangedListener for system time update in APP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Execute shell command in APP to control the GPIO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have surveyed and realize maybe JNI is a possibility but we'd like to know if we still can apply the same by adding the "write-in" permission as above mentioned? All suggestions and comments are more than welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-tftu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 11:05:15 GMT</pubDate>
    <dc:creator>tftu</dc:creator>
    <dc:date>2014-07-01T11:05:15Z</dc:date>
    <item>
      <title>Change system time &amp; write GPIO value by APP in Android JB 4.3</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Change-system-time-write-GPIO-value-by-APP-in-Android-JB-4-3/m-p/314247#M41267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think this is a general question for Android JB 4.3 which include a new security control, SELinux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Our project originally was based on imx6 &amp;amp; Android ICS 4.0.3, due to cost concern we downgrade the CPU to imx6 Sololite but upgrade the BSP to Android JB 4.3 w/o choice since it's the only available version for imx6 Sololite. But due to JB 4.3's &lt;/SPAN&gt;strict security, our below solution for "system time change &amp;amp; writing GPIO value by APP" which works in ICS 4.0.3 is failed in JB 4.3:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Add below into /device/fsl/imx6/etc/init.rc :&lt;/P&gt;&lt;P&gt;chmod 666 /dev/alarm (for system time)&lt;/P&gt;&lt;P&gt;chmod 666 /sys/class/gpio/gpio12/value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Implement &lt;SPAN style="font-size: 10pt;"&gt;OnTimeChangedListener for system time update in APP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Execute shell command in APP to control the GPIO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have surveyed and realize maybe JNI is a possibility but we'd like to know if we still can apply the same by adding the "write-in" permission as above mentioned? All suggestions and comments are more than welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-tftu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 11:05:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Change-system-time-write-GPIO-value-by-APP-in-Android-JB-4-3/m-p/314247#M41267</guid>
      <dc:creator>tftu</dc:creator>
      <dc:date>2014-07-01T11:05:15Z</dc:date>
    </item>
  </channel>
</rss>

