title: Can't connect to Android device
body: <p>I've got a problem with my phone. I've got HTC One M7 with GPE ROM, that I installed some days ago (ROM of course). When I'm trying to connect to computer and debug my app, in ADB my phone is shown as a offline. </p>
  
  <p><a href="https://i.stack.imgur.com/rs6nB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rs6nB.jpg" alt="enter image description here"></a>
  Also when I'm trying to display connected devices (with <code>adb devices</code> command) there is information that my phone is offline.</p>
  
  <p><a href="https://i.stack.imgur.com/sW4Rg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sW4Rg.jpg" alt="enter image description here"></a></p>
  
  <p>I've propably tried everything. </p>
  
  <ul>
  <li>I restarted server with <code>adb kill-server</code> and <code>adb start-server</code>. </li>
  <li>I tried to restart phone and PC. </li>
  <li>I also tried toggle on/off debugging options several times. </li>
  <li>I even tried to factory reset my phone and nothing helped. What is wired, I noticed that after factory reset, when I was trying to connect phone to PC for the first time, there was no "RSA key dialog" that should pop-up on my phone. I remember that before I installed GPE ROM, I had Stock ROM and back then debugging was wroking properly. What is more interesting every time when I plugging in my phone to PC, in <code>C:\Users\*username*\.android</code> are being created 2 files: adbkey and adbkey.pub and I don't know where is it coming from because there is no <code>adb_key</code> file in <code>data/misc/adb</code> folder in my HTC device. </li>
  </ul>
  
  <p>I completly don't know what
     to do, because I literally did everyting I read in the Internet and
     nothing works. I have feeling that my problem could be with RSA key,
     maybe somewhere in memory is old file that was used to authorize when
     I had old ROM installed, but I don't know how to remove it, because
     as I said before there is no adb_key file in phone memory.</p>
  
  <ul>
  <li>I also downloaded "WiFI ADB" app from Play Store and I tried to
  connect with <code>adb connect IP_ADDRESS:PORT</code> but I get this response:
  unable to connect to IP_ADDRESS:PORT   </li>
  <li>Also I'd like to add that I
  can see my phone as a mass storage. </li>
  <li>Also I updated HTC USB drivers.</li>
  </ul>