<?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>topic How to access Linux kernel layer from System Apps in Android for imx8m mini in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1287969#M175098</link>
    <description>&lt;P&gt;How to access Linux kernel layer from System Apps in Android for imx8m mini.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 05:56:49 GMT</pubDate>
    <dc:creator>Ruban1</dc:creator>
    <dc:date>2021-06-07T05:56:49Z</dc:date>
    <item>
      <title>How to access Linux kernel layer from System Apps in Android for imx8m mini</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1287969#M175098</link>
      <description>&lt;P&gt;How to access Linux kernel layer from System Apps in Android for imx8m mini.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 05:56:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1287969#M175098</guid>
      <dc:creator>Ruban1</dc:creator>
      <dc:date>2021-06-07T05:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Linux kernel layer from System Apps in Android for imx8m mini</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1290768#M175354</link>
      <description>&lt;P&gt;Hello Ruban1,&lt;/P&gt;
&lt;DIV class="s-prose js-post-body"&gt;
&lt;P&gt;Actually, words you used here have meaning which differs from your requirement. What I think you need to implement set of libraries.&lt;/P&gt;
&lt;P&gt;For that you first need to understand the working of Linux OS, and then how android utilize it for its purpose.&lt;/P&gt;
&lt;P&gt;Here i'll try to make some brief description for your requirement.&lt;/P&gt;
&lt;P&gt;Linux Kernel have two layers - User space and kernel space, user space is responsible for interaction with users and kernel is responsible for interacting with hardware. And how both interact with each other is by procedure called System Call.&lt;/P&gt;
&lt;P&gt;Core concept is also same here. Top three layers as shown are the part of user space. Bottom layer is kernel layer.&lt;/P&gt;
&lt;DIV id="tinyMceEditorBio_TICFSL_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;See attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here also mode of communication between user space and kernel space is system call. But usually only layers of library plays the role to make communication between the above layers and the kernel.&lt;/P&gt;
&lt;P&gt;You also have to do the same, you can add a new library, in which using system calls interface you can talk to kernel.&lt;/P&gt;
&lt;P&gt;Also In order to access the methods of the shared library from java code, you need to bring in &lt;CODE&gt;JNI wrappers&lt;/CODE&gt; around the methods exposed from your shared lib.&lt;/P&gt;
&lt;P&gt;That's all, as per your requirement you can also develop your library.&lt;/P&gt;
&lt;P&gt;Then you need to push that file into &lt;CODE&gt;/system/lib&lt;/CODE&gt; using &lt;CODE&gt;adb push&lt;/CODE&gt; command. Their can be a case push may not work, then try to mount /system&lt;/P&gt;
&lt;PRE class="default s-code-block hljs perl"&gt;&lt;CODE&gt;adb shell mount -o remount,rw /&lt;SPAN class="hljs-keyword"&gt;system&lt;/SPAN&gt; //&lt;SPAN class="hljs-keyword"&gt;and&lt;/SPAN&gt; then again try to &lt;SPAN class="hljs-keyword"&gt;push&lt;/SPAN&gt;
adb &lt;SPAN class="hljs-keyword"&gt;push&lt;/SPAN&gt; mylibrary.so /&lt;SPAN class="hljs-keyword"&gt;system&lt;/SPAN&gt;/lib/mylibrary.so
adb shell &lt;SPAN class="hljs-keyword"&gt;chmod&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;644&lt;/SPAN&gt; /&lt;SPAN class="hljs-keyword"&gt;system&lt;/SPAN&gt;/lib/mylibrary.so // set the permission
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If sometime, you still can't able to push that file, try to root that device.&lt;/P&gt;
&lt;P&gt;After you'll reboot the device that library will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 13:48:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1290768#M175354</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2021-06-10T13:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Linux kernel layer from System Apps in Android for imx8m mini</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1291058#M175380</link>
      <description>&lt;P&gt;i have used .sh file for shell script.All the system calls i have used in .sh file. You want me write script and push through ADB . May i know in which path i have to push the script to RUN.&lt;/P&gt;&lt;P&gt;Can you brief me more on&amp;nbsp;&lt;SPAN&gt;JNI wrappers and share related documents.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;May i know what all set of libraries is needed to be implement .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I use 'su' command for root user . or its there any other method to root the device. if so provide me related documents.&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ruban&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 03:56:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-Linux-kernel-layer-from-System-Apps-in-Android-for/m-p/1291058#M175380</guid>
      <dc:creator>Ruban1</dc:creator>
      <dc:date>2021-06-11T03:56:18Z</dc:date>
    </item>
  </channel>
</rss>

