How to open adb shell and execute commands inside shell using python
<p>I am trying to execute adb shell commands in python using subprocess.Popen</p>

<p>Example: Need to execute 'command' in adb shell. While executing manually, I open the command window and execute as below and it works.</p>

<pre><code>&gt;adb shell
#&lt;command&gt;
</code></pre>

<p>In Python I am using as below but the process is stuck and doesn't give output</p>

<pre><code>subprocess.Popen('adb shell &lt;command&gt;)
</code></pre>

<p>Tried executing manually in command window, same result as python code,stuck and doesn't give output</p>

<pre><code>&gt;adb shell &lt;command&gt;
</code></pre>

<p>I am trying to execute a binary file in background(using binary file name followed by &amp;) in the command. </p>