Home » Android » Unable to inspect Android device via Chrome://inspect

Unable to inspect Android device via Chrome://inspect

Posted by: admin June 15, 2020 Leave a comment

Questions:

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.

How to&Answers:

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.

Answer:

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

Answer:

In the virtual Device Manager I selected Wipe Data from the Actions.
Then I started the virtual device.
Then I ran the app and it worked in the emulator.