I am trying to automate some UI of my Android application(I do not have source code so I am using the APK file) .
I have gone through tutorial provided here and also
To use espresso you need to know something about the UI elements themselves (like id and type). When you don't have the source code you can use the "uiautomatorviewer" tool which is part of the Android SDK.
http://developer.android.com/tools/testing-support-library/index.html#uia-viewer