<?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 Re: Unable to run su from Android app on Android Pie in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-su-from-Android-app-on-Android-Pie/m-p/1361129#M182092</link>
    <description>&lt;P&gt;The answer is always on&amp;nbsp;stackoverflow&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk" target="_blank"&gt;https://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/5436084/how-to-create-android-apps-with-root-access" target="_blank"&gt;https://stackoverflow.com/questions/5436084/how-to-create-android-apps-with-root-access&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 01:45:34 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2021-10-26T01:45:34Z</dc:date>
    <item>
      <title>Unable to run su from Android app on Android Pie</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-su-from-Android-app-on-Android-Pie/m-p/1361046#M182080</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I'm seeing this error :&lt;/P&gt;&lt;PRE&gt;    Caused &lt;SPAN class=""&gt;by&lt;/SPAN&gt;: android.view.InflateException: &lt;SPAN class=""&gt;Binary&lt;/SPAN&gt; XML file line #&lt;SPAN class=""&gt;23&lt;/SPAN&gt;: &lt;SPAN class=""&gt;Binary&lt;/SPAN&gt; XML file line #&lt;SPAN class=""&gt;21&lt;/SPAN&gt;: &lt;SPAN class=""&gt;Error&lt;/SPAN&gt; inflating &lt;SPAN class=""&gt;class&lt;/SPAN&gt; fragment
     Caused &lt;SPAN class=""&gt;by&lt;/SPAN&gt;: android.view.InflateException: &lt;SPAN class=""&gt;Binary&lt;/SPAN&gt; XML file line #&lt;SPAN class=""&gt;21&lt;/SPAN&gt;: &lt;SPAN class=""&gt;Error&lt;/SPAN&gt; inflating &lt;SPAN class=""&gt;class&lt;/SPAN&gt; fragment
     Caused &lt;SPAN class=""&gt;by&lt;/SPAN&gt;: java.io.IOException: Cannot run program &lt;SPAN class=""&gt;"/system/xbin/su"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;error&lt;/SPAN&gt;=&lt;SPAN class=""&gt;13&lt;/SPAN&gt;, Permission denied&lt;/PRE&gt;&lt;P&gt;for code:&lt;/P&gt;&lt;PRE&gt;    &lt;SPAN class=""&gt;override&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;fun&lt;/SPAN&gt; &lt;SPAN class=""&gt;onCreateView&lt;/SPAN&gt;&lt;SPAN class=""&gt;(
        inflater: &lt;SPAN class=""&gt;LayoutInflater&lt;/SPAN&gt;, container: &lt;SPAN class=""&gt;ViewGroup&lt;/SPAN&gt;?,
        savedInstanceState: &lt;SPAN class=""&gt;Bundle&lt;/SPAN&gt;?
    )&lt;/SPAN&gt;&lt;/SPAN&gt;: View? {

        _binding = FragmentFirstBinding.inflate(inflater, container, &lt;SPAN class=""&gt;false&lt;/SPAN&gt;)
         Runtime.getRuntime().exec(&lt;SPAN class=""&gt;"/system/xbin/su"&lt;/SPAN&gt;)
         Runtime.getRuntime().exec(&lt;SPAN class=""&gt;"/system/bin/ifconfig eth0 up"&lt;/SPAN&gt;)
        &lt;SPAN class=""&gt;return&lt;/SPAN&gt; binding.root

    }&lt;/PRE&gt;&lt;P&gt;despite providing:&lt;/P&gt;&lt;PRE&gt;    &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;uses-permission&lt;/SPAN&gt; &lt;SPAN class=""&gt;android:name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"android.permission.ACCESS_SUPERUSER"&lt;/SPAN&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;uses-permission&lt;/SPAN&gt; &lt;SPAN class=""&gt;android:name&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"android.permission.FACTORY_TEST"&lt;/SPAN&gt;
&lt;SPAN class=""&gt;AND&lt;/SPAN&gt; &lt;SPAN class=""&gt;running:&lt;/SPAN&gt;

&lt;SPAN class=""&gt;adb&lt;/SPAN&gt; &lt;SPAN class=""&gt;shell&lt;/SPAN&gt; &lt;SPAN class=""&gt;setenforce&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;What else can I try to get "su" working from within the app? I need that to disable/enable Ethernet interface. On the rooted device, I'm able to run su from the shell without any problem.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Oct 2021 21:48:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-su-from-Android-app-on-Android-Pie/m-p/1361046#M182080</guid>
      <dc:creator>nxpsri</dc:creator>
      <dc:date>2021-10-25T21:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run su from Android app on Android Pie</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-su-from-Android-app-on-Android-Pie/m-p/1361129#M182092</link>
      <description>&lt;P&gt;The answer is always on&amp;nbsp;stackoverflow&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk" target="_blank"&gt;https://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/5436084/how-to-create-android-apps-with-root-access" target="_blank"&gt;https://stackoverflow.com/questions/5436084/how-to-create-android-apps-with-root-access&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 01:45:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-su-from-Android-app-on-Android-Pie/m-p/1361129#M182092</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2021-10-26T01:45:34Z</dc:date>
    </item>
  </channel>
</rss>

