When we implement app automation, we need to know the launch activity and page element information of the app to launch the app and locate the page elements, so how can we find them without the source code? Of course there are good tools, with the Android SDK comes with the tool can be very good to help us solve this problem.
1. Get the Startup class
The AAPT command (the tool location: C:\Users\...\AppData\Local\android\Sdk\build-tools\24.0.1) can be opened at the cmd command line after the environment variable is configured.
CD into the APK download directory
Use command: AAPT dump badging xxx.apk
This command can obtain in-package information. Name after the startup class is launchable-activity
2. Screenshot Capture Page element
Uiautomatorviewer.bat Tool (the tool location: ... \sdk\tools)
Computer connected to the real machine or using the simulator, open the app
Click the Uiautomatorviewer.bat Pop-up dialog, click the Second button in the first row to take a screenshot, and you can see the truncated graph and page element information.
Transferred from: http://blog.csdn.net/a735465047/article/details/52679372
How to find Android App launch activity and page element information