uiautomatorviewer on widows

5,530 views
Skip to first unread message

Tomáš Procházka

unread,
Nov 16, 2012, 6:53:29 AM11/16/12
to adt...@googlegroups.com
Use anyone uiautomatorviewer on windows?

I see only empty window. When I click to the Device Screenshot I get only  "Unable to connect to adb..."
But ADB works correctly for me. I'm able run logcat, etc.

I thinked that it require Android 4.2. Sou I tested it with emulator, but nothing, now I have 4.2 on my GN (developer mode enabled) and it still do nothing.
What I miss?

Tomáš Procházka

unread,
Nov 16, 2012, 6:54:08 AM11/16/12
to adt...@googlegroups.com
I have windows 7 64bit, but only 32bit Java 1.7 SDK

Dne pátek, 16. listopadu 2012 12:53:29 UTC+1 Tomáš Procházka napsal(a):

Tor Norbye

unread,
Nov 20, 2012, 4:23:54 PM11/20/12
to adt...@googlegroups.com
Do you have Tools 21 installed? If so, "uiautomatorviewer" should be a command in the tools/ folder where Tools 21 is installed. On Windows it's probably called uiautomatorviewer.bat.

-- Tor


On Tue, Nov 20, 2012 at 8:14 AM, Pavel Kulagin <kuwi...@gmail.com> wrote:
I tried to use uiautomatorviewer, I have Win7 x64, 64bit Java 1.7 SDK and it doesn't works for me too with same symptoms. I couldn't find out why does it happen :(

Tester T

unread,
Nov 20, 2012, 4:48:32 PM11/20/12
to adt...@googlegroups.com
Yes i do have Revision 21 and i run the command in the shell from tools/ directory. Its the same result with uiautomatorviewer.bat also.
Says "Unable to connect to adb.. Check the adb installation."

Any way out?

Siva Velusamy

unread,
Nov 20, 2012, 4:53:12 PM11/20/12
to adt...@googlegroups.com
If you are new to Android tools, I'd suggest you do:

1. Download the ADT bundle from here:
http://developer.android.com/sdk/index.html
2. Open Eclipse inside.
3. Switch to DDMS perspective.
4. Click on dump UI hierarchy.

The uiautomatorviewer is also embedded into Eclipse, so you don't have
to use the standalone viewer.

Tester T

unread,
Nov 20, 2012, 4:56:36 PM11/20/12
to adt...@googlegroups.com
But can we get the ids of the related android app using DDMS?
Because i could not find any required id in DDMS.

Siva Velusamy

unread,
Nov 20, 2012, 5:34:22 PM11/20/12
to adt...@googlegroups.com
Please stop responding on multiple threads for the same issue. If your
issue is not the same as what the thread is about, then start a new
thread, don't respond on the existing one.

Regarding your issue about not being able to take screenshots, it
looks like an installation problem, most likely you haven't installed
platform tools in SDK Manager. That is why I suggested that you use
the ADT bundle. I'm not sure what you mean by "ids of related android
app", but everything you can do using uiautomatorviewer, you can do
within Eclipse/ADT. The DDMS perspective will automatically open the
result in the UI Automator Viewer view.

Tor Norbye

unread,
Nov 27, 2012, 10:13:43 AM11/27/12
to adt...@googlegroups.com, Raphaël Moll
Hmm, it looks like the uiautomatorviewer.bat file is pretty broken. Instead of having individual .bat files for each of our command line tools, with subtle differences in each, we should make a prototypical .bat file (and corresponding unix launcher script), and generate these at build time from the prototype script instead.


On Tue, Nov 27, 2012 at 2:16 AM, Yulia Mittova <kostyukh...@gmail.com> wrote:
Just see https://plus.google.com/u/0/108487870030743970488/posts/2TrMqs1ZGQv
It is great article! And it works to me!! =)

вторник, 20 ноября 2012 г., 23:14:21 UTC+7 пользователь Pavel Kulagin написал:
I tried to use uiautomatorviewer, I have Win7 x64, 64bit Java 1.7 SDK and it doesn't works for me too with same symptoms. I couldn't find out why does it happen :(

Tester T

unread,
Nov 29, 2012, 4:30:16 AM11/29/12
to adt...@googlegroups.com
Hi Julia,

Thanks Julia, the link was great help. It works for me.. Thanks a ton !
But I had one more question.. Were you able to locate the id's for buttons or textboxes in uiautomatorviewer?

Thanks
Jazz

On Tue, Nov 27, 2012 at 11:16 AM, Yulia Mittova <kostyukh...@gmail.com> wrote:
It is great article! And it works to me!! =)

вторник, 20 ноября 2012 г., 23:14:21 UTC+7 пользователь Pavel Kulagin написал:
I tried to use uiautomatorviewer, I have Win7 x64, 64bit Java 1.7 SDK and it doesn't works for me too with same symptoms. I couldn't find out why does it happen :(

Raphaël Moll

unread,
Nov 30, 2012, 10:50:22 PM11/30/12
to adt...@googlegroups.com
FYI we pushed "Tools 21.0.1 preview 1" to the SDK repository. This should have the fix for the uiautomator.bat on Windows.
If any of you get a chance to try it, let us know how it works for you.

If you don't know how to get the preview, see http://tools.android.com/preview-channel

R/
Reply all
Reply to author
Forward
0 new messages