How to get the app's package name and activity name

Source: Internet
Author: User


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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.