So let's connect Vince cope with the emulator.
So how open the wind scoped out XHTML page in Chrome so when you open it you will get a screen like
this.
And as we already seen, we have the ADB connecting the left side and open files in the right side.
So in order for window scope to connect to the emulator or a device, you need to run a proxy first.
So it's basically a Python script, so you need to first execute this in the command line.
So in case if you don't have an AOSP downloaded, you can still download this separately from the Aosp
repository by clicking on this link.
So I have already downloaded it.
So now in the command line.
So basically I have to run the wind scope proxy dot by using Python, you simply need to execute this.
And now this proxy is running and we get a scope token here.
Just copy this and come back to win scope and here press retry.
So in this case I didn't have to give the token.
It automatically recognized that the proxy is running and it connected to the emulator already.
So but in some cases, like for the first time, it will ask you to input the proxy which we have copied
from here.
So now it's already connected.
So now here you have options.
You have multiple options to trace the current state or dump the current state or trace the state of
the emulator.
So at the moment I have opened one app, the gallery app, right?
So if I simply click Dump State, it will basically dump the current state.
So here you can see the hierarchy of the windows and here there is a representation of the window.
So here you can see the layout which is displayed on top.
So it's gallery 3D, gallery activity, right?
And here you can see the layer.
So we have these two display areas and within this display area you can see the navigation bar at the
bottom as part of the system UI and the status bar at the top is again part of this system UI and all
the apps will come under this default task display area.
Okay.
So here we have one task which is gallery three D app this one.
Okay.
So now let's try one more thing.
So now let's come here and let's open the camera app as well.
Now come back, clear this and dump the state once again.
Okay, so now we can see the camera app is the one shown on top, right?
And here I have checked only the visible ones.
So just uncheck this, then you can see all the windows being displayed.
So under the default task display area, you can see all these tasks.
There are seven tasks and the topmost task is the camera and the next task is the kick step.
And below that we have the gallery.
So if you come here, you can see the gallery also running.
Right there is gallery.
This is gallery.
So this is also running.
That's why we still have the task opened here and here.
The Dialer app is also there you can see Dialer app.
So the dialer app is also behind and then there are some more tasks, but these are not.
So mainly we have the three tasks and the kick launcher and in the right side.
So here we can see the different properties of this window.
And here under hierarchy you have multiple options.
You can simplify the name.
So if you just simplify, it will not show the complete package name.
But I prefer this one.
And then you can also click on flat, which gives you a flat hierarchy and only visible shows you only
the visible tasks.
Okay, so to summarize, we have the visualization of the current state of the emulator in the left
side.
And then here we have all the windows being displayed and in the right side we have the properties and
now click on the clear button.
So here there is one more option to start the trade.
So let's see what it does.
So what you can do is just click on Start Trace.
So this will start the tracing and then you can come here.
So now I have first opened the dial wrap, right?
And now let's open some new app, clock app.
So I open the clock app and now I will just go ahead and trace.
So now it has generated the window manager trace I have also selected the surface finger trace so it
has generated two traces.
So the difference here is that in the earlier case we only dump the current state of the emulator.
Right?
But here we have recorded the state of the emulator when we performed different operations.
So this is really helpful when we are able to simulate some of the defects and if you record these traces,
it will be really helpful from a development point of view to sort out the bug.
So here at the bottom there is a timeline now, right?
So here you can see this is the initial state and then click here, you can see this getting changed.
So now you can see here is the dialer app opened here.
All right then.
So this is dialer up again.
Dialer.
Hey, here, this again, the launcher.
Now here you can see that the clock was opened and here similarly we have the complete hierarchy and
the property.
So when I recorded the traces, I have also selected the surface for finger trace.
So that's why we have the surface finger trace at the bottom.
So here also we have a similar view, a visualization of the current state.
And then here you can see the different layers.
So it's under layers.
You can see all the different and different layers and the task coming within that.
So if you select this, you can see the disk clock here and on top we have the splash screen thingy
and then here we have the task.
So everything is coming under task.
And also here we have all the properties of the task.
And at the bottom, as I said already here we have the timeline.
So when you click on this timeline, you can see the state of the emulator at different time during
the test.
Here you have some options to select a global focused custom.
You can only select the window manager, trace or early surface blinker.
So there are multiple options.
So you can even record the screen and you can trace the catalog, the input method, manager service.
You can drag input method service input method clients and the surface finger cone fix can be set here.