Several ways to get the APK package name from Android

Source: Internet
Author: User

Android Gets the APK package name in several ways:
1, adb shell pm List package-f | findstr keyword #只能获取到包名, the main activity name cannot be obtained

2. Using AAPT--AAPT is a tool that comes with the SDK,Sdk\builds-tools\Directory under
The following two lines in the result of the run are the app package name and the entry activity name
Package:name= ' Com.estrongs.android.pop '
Launchable-activity:name= ' com.estrongs.android.pop.view.FileExplorerActivity '

3, according to Androidmanifest.xml View:
A. Using Apkide or Apktool to decompile the APK package
B. Open Androidmanifest.xml
Package attribute value is the app's bundle name: <package= "Com.estrongs.android.pop" >
Find the activity that corresponds to Android.intent.action.MAIN or 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>

Several ways to get the APK package name from Android

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.