We often need to know the package name and Activiy name of the app when we are doing mobile phone automation testing, many colleagues just learn from where to find, in fact, there are many ways to get these values
The following is for the non-source of the situation, more suitable for novice colleagues
Method one with the re-signing tool, which is used more in Robotium
Another way to get it with the command side
AAPT dumpbadging xxxx.apk
The first box is a package name
The second box is the main activity name
If the package name and activity are not in the command line, you can also get the
AAPT dumpbadging xxxx.apk >c:\apk.txt
Then open C:\apk.txt
The Third Way, if you pretend Appium You can do this .
go to the Settings page, select APK path, the following shows the package name and Activity name
The fourth kind uses Hierarchyviewer View
AAPT command
AAPT dump Xmltree XXX. APK ANDROIDMANIFEST.XM. >c.txt
Then go to C.TXT to view
6th type
Adbshell Dumpsys Activity Activities >d:\log.txt
Then go to Log.txt to search the package and activity.
Seventh type
Adb LOGCAG >d:\3.txt
Then open the app on your phone
Press on the computer immediately after opening Ctrl + C
then go 3.txt Find Package and the Activity
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
How to get the app's package name and activity name