Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a Web Inspector with emulated android device (AVD)

I have the Android SDK downloaded (on a mac), and no access to Android hardware. I can start up AVD and emulate various android devices fine, but I have some CSS I'd like to inspect in the Android browser on said emulated devices. I just can't figure out how to do this.

For iOS you can hook up Safari to the xcode emulator super easy, but I can't seem to figure out the equivalent for Android and Chrome. All of the tutorials I find on the topic tell you to use a meatspace device connected through USB! Doesn't even need to be chrome - any web inspector-like service at this point, that lets me see and change CSS on the fly, will do. Help!

like image 501
agentem Avatar asked Jun 17 '15 20:06

agentem


People also ask

How do you inspect an emulator on Android?

To open the Layout Inspector, run your app on a connected device or emulator, and then select Tools > Layout Inspector.


1 Answers

Easy Peasy:

  1. Start the Android Emulator (e.g. by running your project in Android Studio)
  2. Start Google Chrome and visit chrome://inspect
  3. Click the Inspect-link below the detected Emulator, and off you go!
like image 171
Fredrik Johansson Avatar answered Oct 31 '22 19:10

Fredrik Johansson