How do you adb to bluestacks 4? : <p>I'd like to connect to android emulator on bluestacks 4 with adb. 
but I've got an error with <code>adb.exe -s emulator-5554 shell</code></p>

<p>checking devices. </p>

<pre><code>$ adb.exe devices
List of devices attached
BH901...      device
CB512...      unauthorized





emulator-5554   device
</code></pre>

<p>once I shutdown bluestacks window, the <code>emulator-5554</code> will be hidden from above command's result. thus I think <code>emulator-5554</code> means bluestacks.</p>

<p>then commnad as below to use adb.</p>

<pre><code>$ adb.exe -s emulator-5554 shell
error: closed
</code></pre>

<p>but as you know, an error occured.</p>
