"Android Test" "essay" Get the app's package name and start activity

Source: Internet
Author: User

Objective

Often see some just contact with Android Test Partners in the Forum or QQ group to ask such questions: How to know the package name of an app? What is the activity that it initiates?

I've been missing this piece in my blog before, and I'm going to introduce you to this section.

Package Name

The package name in the Android system is a unique identifier for an app, and different apps can have the same name, but the package name cannot be the same.

For example I can build an app myself called "", but my app's package name cannot be com.tencent.mm (the package name for this), if I specify the package name if also consistent, then my phone only allow to install one of these two apps. Speaking of which many people will have doubts, if someone maliciously made a and the content of the same app, the name and package names and the same, how to tell? Android in order to prevent this, but also do a call signature things, the signature of the general we do not, so you can sign to identify who the app is, interested in can understand the next signature, here will not repeat.

In general, it is necessary to know the source of an application's package name needs to run a monkey command, remember? Monkey usage? (Monkey article) the Monkey command is required to specify the package name. Here are a few ways to view package names:

  First, look at the source code

Generally we test the app is our own company's app, so when the source code, we can easily know its package name. Locate the "Androidmanifest.xml" file under the project directory and open it:

   We found the package, which is a view.

  Second, check the phone system settings

I introduce the Google native system, some other millet, Meizu and other custom-made system of the viewing method is similar.

Action steps: Settings, apps, running (this step requires attention), select the app you want to view. You can see it at this time (e.g.)

 Third, view the/data/data/directory

When we install an application, the system will be in the/data/data/directory to build a directory, and the file name is the current application of the package name, we look at my phone in this directory, there are some files it:

If you know one of the keywords in the app package name you're looking for, you'll find your app's package name faster, otherwise it's recommended to use another method.

Four, GT

The GT interface comes with this feature, download the GT from the app, and then choose a tested application to see. such as

Activity

"Android Test" "essay" Get the app's package name and start activity

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.