Several methods to view the Android application package name and Activity

Reprinted from: http://blog.csdn.net/jlminghui/article/details/40622103

1. There is source code

Open the AndroidManifest.xml file directly and find the activities corresponding to android.intent.action.MAIN and android.intent.category.LAUNCHER.

As shown in the figure below, the third line of the package is com.cola.ui, and the seventh line of the main Activity is com.cola.ui.ColaBox (.ColaBox is the abbreviation of Activity).

 

 

[html]  view plain copy  
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"  
  3.       package="com.cola.ui"  
  4.       android:versionCode="1"  
  5.       android:versionName="1.0.0">  
  6.     <application android:icon="@drawable/icon" android:label="@string/app_name">  
  7.         <activity android:name=".ColaBox"  
  8.                   android:label="@string/app_name">  
  9.             <intent-filter>  
  10.                 <action android:name="android.intent.action.MAIN" />  
  11.                 <category android:name="android.intent.category.LAUNCHER" />  
  12.             </intent-filter>  
  13.         </activity>  
  14.     <activity android:name="Frm_Addbills"></activity>  
  15.     <activity android:name="Frm_Editacctitem"></activity>  
  16.     <activity android:name="Grid_bills"></activity>  
  17.     <service android:name="LocalService" android:exported="true" android:enabled="true"/>   
  18.   
  19.    </application>  
  20.  <uses-permission android:name="android.permission.READ_CONTACTS" />  
  21.    
  22.    
  23. </manifest>   

 

2. Only the case of Apk

(1) aapt

Using command line aapt dump xmltree ColaBox.apk AndroidManifest.xml

 

(2) Use apktool

Use the decompilation tool apktool, open the AndroidManifest.xml file after decompilation, and search in the same way as "with source code"

 

Apt 3) aapt

Thanks to the " Zhuhai Branch Rudder of Tiandi Club " Address: http://blog.csdn.net/zhubaitian/article/details/38926679

 

3. There is no apk, the application has been installed on the mobile phone or virtual machine

1.logcat

.Clear the logcat content, use the command adb logcat -c

.Start logcat, use the command adb logcat ActivityManager:I *:s

. start the program to be viewed,

 

2.dumpsys

(1) Start the program to be viewed;

(2) Command line input: adb shell dumpsys window w |findstr \/ |findstr name=

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325308414&siteId=291194637