<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Troubeshooting | Swaroop Joshi</title><link>https://swaroopjoshi.in/tags/troubeshooting/</link><atom:link href="https://swaroopjoshi.in/tags/troubeshooting/index.xml" rel="self" type="application/rss+xml"/><description>Troubeshooting</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sat, 29 Aug 2020 23:19:50 -0600</lastBuildDate><image><url>https://swaroopjoshi.in/media/icon_hu_4af439994a67251.png</url><title>Troubeshooting</title><link>https://swaroopjoshi.in/tags/troubeshooting/</link></image><item><title>Troubleshooting the Android Device Not Found Issue</title><link>https://swaroopjoshi.in/blog/android-usb/</link><pubDate>Sat, 29 Aug 2020 23:19:50 -0600</pubDate><guid>https://swaroopjoshi.in/blog/android-usb/</guid><description>&lt;p&gt;When I started preparing for my CS 4530 Mobile App Programming course, I found an old Android device, an LG Nexus 4 I had used a few years back. I plugged it in to use it as my physical device for development. Android Studio immediately detected it and I hit the green play button (to run the app). Whoa! It hit me back with this message:&lt;/p&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;Installation failed due to: &amp;lsquo;device &amp;lsquo;018aa11a1ccf6e45&amp;rsquo; not found&amp;rsquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Dejected, I opened the Connection Assistant in the Android Studio via Tools &amp;gt; Troubleshoot Device Connections. Again, it had no issues detecting the phone:&lt;/p&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;Found 1 Android device(s) ready for debugging:&lt;/p&gt;
&lt;p&gt;lge-nexus_4-018aa11a1ccf6e45&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Even on the command line, I could find it via &lt;code&gt;adb&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; adb devices -l
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;List of devices attached
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;018aa11a1ccf6e45 device usb:20:6 product:occam model:Nexus_4 device:mako transport_id:1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Puzzled, I looked for solutions online. The most common advice was:&lt;/p&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;disconnect and reconnect your device, or try using a different USB cable&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Needless to say, it didn&amp;rsquo;t work&amp;mdash;otherwise I wouldn&amp;rsquo;t be writing this blog! Thankfully, I found a solution
, which I am repeating below so I find it easily if I ever have to do this again. In a nutshell, this solution suggests resetting the USB debug privileges.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On your phone, under &amp;lsquo;Developer Options&amp;rsquo;, stop USB debugging and revoke USB debugging authorization. (The post next suggests restarting your phone, but it worked for me without a restart.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next, reset the adb server on the laptop:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; adb kill-server
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; adb start-server
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;Unplug and replug the device. At this point, the device asked me to allow USB debugging. The device was again recognized by &lt;code&gt;adb&lt;/code&gt;, but I realized the &lt;code&gt;usb:&lt;/code&gt; information was different this time:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; adb devices -l
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;List of devices attached
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;018aa11a1ccf6e45 device usb:341835776X product:occam model:Nexus_4 device:mako transport_id:1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Perhaps that was the glitch?&lt;/p&gt;</description></item></channel></rss>