Android Developer View application package name and portal Activity name method

Source: Internet
Author: User

When launching an app using the Android automated Test tool Monkeyrunner, you need to fill in the package name and activity of the program under test, there are two ways to view the app package name and the entry activity name:
method One: Using AAPT//aapt is a tool that comes with the SDK, in the Sdk\builds-tools\ directory
1. Take the ES file browser as an example, switch to the Aapt.exe directory in the command line execution: AAPT dump badging E:\apk\es3.apk
2. The following two lines in the results of the run are the application package name and the entry activity name
Package:name= ' Com.estrongs.android.pop '
Launchable-activity:name= ' com.estrongs.android.pop.view.FileExplorerActivity '
Note: The Android SDK directory search can be found Aapt.exe if no apktool can be downloaded.

method Two: View Androidmanifest.xml
1. Use Apktool to decompile app:apktool.bat D es3.apk E:\apk\es
2. Open Androidmanifest.xml
The Package property value for the manifest node is the app's bundle name: <manifest package= "Com.estrongs.android.pop" >
Find the activity that corresponds to Android.intent.action.MAIN and Android.intent.category.LAUNCHER, the activity that corresponds to Android: The Name property is both the entry activity names, as follows:
<activity android:theme= "@*android tyle/theme.notitlebar" android:label= "@string/app_name" Android:name= " Com.estrongs.android.pop.view.FileExplorerActivity ">
<intent-filter>
<action android:name= "Android.intent.action.MAIN"/>
<category android:name= "Android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
Android.intent.action.MAIN determines the activity that the application starts first

Android.intent.category.LAUNCHER determines whether the application appears in the program list



IMF announces 2013 latest World GDP rankings, China twice times for Japan

List of China's 50 cities ' GDP rankings by 2013  

total GDP and GDP per capita in China in 2013  

2014 China's 95 companies shortlisted in the world's Top 500, ranked second  

US announces failed National index, China defeats India and Vietnam  

The Chinese were fooled by the "Qing Dynasty GDP world first"!  

2013 ranking and list of hundred counties in China  

Top 25 IT companies ranked in the highest paidranking of 50 undergraduate majors with the highest domestic employment rate 2014 China University of Engineering ranked top 100 list Latest World land area and population rankings Top 20 job rankings for girlsLatest "211" engineering university rankings and lists (total 16)


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.