I use command
adb shell uiautomator dump view.xml
to dump the UI hierarchy of current Android screen. Then, I try to see the view.xml, I tried command:
adb shell cat view.xml
but get error:
/system/bin/sh: cat: view.xml: No such file or directory
How/Where can I see the dumped view.xml file?
Why don't you do the following:
adb shell uiautomator dump
adb pull /sdcard/window_dump.xml
If you directly want to read out from shell you can execute following command from adb shell after dumping the XML
adb shell cat /sdcard/window_dump.xml
Being on your developer machine you can dump the "UI hierarchy of current Android screen" to /sdcard/window_dump.xml
on the smartphone with command:
adb shell uiautomator dump
the response is:
UI hierchary dumped to: /sdcard/window_dump.xml
then you can cat
the xml to your developer machine's filesystem with command:
adb shell cat /sdcard/window_dump.xml > ~/duuuuuuuuuuuump.xml
the you can view it with favorite xml viewer, for example nano
:
nano ~/duuuuuuuuuuuump1.xml
Either use absolute path or just use adb shell uiautomator dump
without filename parameter at all - it will use the default location. In your case you are trying to create the /view.xml
file and you have no writing permission for the /
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With