Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to inspect Android device via Chrome://inspect

I am developing an app for a new Android device (on all other I've never had this issue).

It's running 4.2.2 I have enabled developer mode and allowed usb debugging (I receive the status notification that usb debugging enabled)

However, in chrome://inspect the screen keeps alternating between the below two messages, seems it can't make up it's mind!

  1. ratech72_wet_rlk_lca #0123456789ABCDEF
  2. Offline #00180123456789ABCDEF Pending authentication: please accept debugging session on the device.

I've tried unplugging and restarting everything to no avail

When I plug in the device I see the following status messages on the device systray, in this order

  1. Connected as USB Storage
  2. USB Debugging Connected
  3. USB Connected

How can I access chrome inspect on this device? I am using logcat for now but it's far less powerful than chrome dev tools.

like image 777
Joshua Ohana Avatar asked Sep 14 '15 21:09

Joshua Ohana


4 Answers

I know this is an old question, but nonetheless, this is what helped me:

  • while in Chrome chrome://inspect/#devices page is opened
  • turn off USB Debugging,
  • turn on USB Debugging again

The phone will ask me if I trust the connection...

like image 115
gordan.sikic Avatar answered Oct 10 '22 07:10

gordan.sikic


This is what I did in Android 10 (Oneplus 7t pro), to make it to work(in addition to @gordan.sikic answer).

  1. While in Chrome, keep chrome://inspect/#devices page opened
  2. Click and accept, Android Phone -> Settings -> Developer Options -> Revoke USB debugging authorizations
  3. Turn off USB debugging
  4. Turn on USB debugging, accept Allow USB debugging.

Then you 'll see Always allow from this computer Notification

like image 40
rayen Avatar answered Oct 10 '22 09:10

rayen


This is a known issue.

The answer in the link (changing USB mode from MTP to PTP) did work for me for some time, however others have had less success, and my setup has now regressed to the erratic connection you are seeing.

Personally, I just try to play quick draw and click on the device when it's listed before it disconnects again, which after a bit of practice doesn't take too long, and once you've done that, the actual inspect tools don't have the same erratic connect/disconnect problem so you should be fine until you physically disconnect the device.

This should be resolved in a future version of Chrome.

like image 31
Kane O'Riley Avatar answered Oct 10 '22 07:10

Kane O'Riley


You will need to check out the Facebook Stetho debugging tool:

http://facebook.github.io/stetho/

It is pretty easy to get up and running. And it works well if you are using OkHttp developed by square to debug networking tools.

add to gradle:

dependencies { 
  implementation 'com.facebook.stetho:stetho:1.5.0' 
} 

then in your application class:

  Stetho.initializeWithDefaults(this);

and then go to chrome://inspect in your browser and you should see your device

like image 5
kandroidj Avatar answered Oct 10 '22 08:10

kandroidj