<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mushlih Notes]]></title><description><![CDATA[Mushlih Notes]]></description><link>https://blog.htb.my.id</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 22:42:13 GMT</lastBuildDate><atom:link href="https://blog.htb.my.id/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Connect an Android Emulator to WSL]]></title><description><![CDATA[Connecting an Android Emulator or a real Android device to WSL (Windows Subsystem for Linux) can be very useful for development purposes. This tutorial will guide you through the steps required to establish this connection over USB.
Step 1: Configure...]]></description><link>https://blog.htb.my.id/how-to-connect-an-android-emulator-to-wsl</link><guid isPermaLink="true">https://blog.htb.my.id/how-to-connect-an-android-emulator-to-wsl</guid><category><![CDATA[pentesting]]></category><category><![CDATA[WSL]]></category><category><![CDATA[adb]]></category><category><![CDATA[Mobile Development]]></category><dc:creator><![CDATA[Muhammad Mushlih]]></dc:creator><pubDate>Mon, 15 Jul 2024 08:37:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1721042125939/7feb63ee-27d5-41a8-bbc4-1aea82dc2527.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Connecting an Android Emulator or a real Android device to WSL (Windows Subsystem for Linux) can be very useful for development purposes. This tutorial will guide you through the steps required to establish this connection over USB.</p>
<h3 id="heading-step-1-configure-adb-on-the-host-os">Step 1: Configure ADB on the Host OS</h3>
<p>First, you need to configure the Android Debug Bridge (ADB) on your host operating system where the Android Emulator or the real device is connected via USB.</p>
<ol>
<li><p><strong>Kill any existing ADB server instances:</strong></p>
<p> Open a terminal and run the following command:</p>
<pre><code class="lang-sh"> adb kill-server
</code></pre>
</li>
<li><p><strong>Start the ADB server in no-daemon mode:</strong></p>
<p> Run the following command to start the ADB server in no-daemon mode:</p>
<pre><code class="lang-sh"> adb -a server nodaemon
</code></pre>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721032396266/e7775086-ffe8-470d-81cd-d8ffdf7b1a05.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h3 id="heading-step-2-configure-adb-on-wsl">Step 2: Configure ADB on WSL</h3>
<p>Next, you need to set up the ADB connection on WSL.</p>
<ol>
<li><p><strong>Export the ADB server socket:</strong></p>
<p> On your WSL terminal, export the ADB server socket with the IP address of your host machine. Replace <code>[IP_HOST]</code> with the actual IP address of your host:</p>
<pre><code class="lang-sh"> <span class="hljs-built_in">export</span> ADB_SERVER_SOCKET=tcp:[IP_HOST]:5037
</code></pre>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721032549660/a915f513-29c9-40de-a380-7b0f053278e5.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><strong>Check connected devices:</strong></p>
<p> Finally, verify the connection by listing the connected devices:</p>
<pre><code class="lang-sh"> adb devices
</code></pre>
<p> You should see your Android Emulator or real device listed.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721032598860/0f97e02c-1df9-48f7-a96a-3f404c55b973.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Following these steps will allow you to connect your Android Emulator or real device to WSL via USB, enabling you to use ADB commands from within WSL. This setup can streamline your development process by integrating the capabilities of WSL with Android development tools.</p>
]]></content:encoded></item></channel></rss>