查看Android應用程式套件名、Activity的幾個方法

來源:互聯網
上載者:User

標籤:mis   http   UNC   直接   local   bsp   tar   package   nta   

一、沒有apk,應用已經安裝到手機或虛擬機器中

1.logcat

.清除logcat內容,使用命令adb logcat -c

.啟動logcat,使用命令adb logcat ActivityManager:I *:s

.啟動要查看的程式,

 

2.dumpsys

(1)啟動要查看的程式;

(2)命令列輸入:adb shell dumpsys window w |findstr \/ |findstr name=

 

補充:使用adb shell dumpsys window | findstr mCurrentFocus  命令查看當前啟動並執行包名和Activity更清晰一些。

 



二、只有Apk的情況

(1)aapt

使用命令列aapt dump xmltree ColaBox.apk AndroidManifest.xml

 

(2)使用apktool

使用反編譯工具apktool,反編譯後開啟AndroidManifest.xml檔案,尋找方式同“有源碼情況”

 

(3)aapt

感謝“天地會珠海分舵”地址:http://blog.csdn.net/zhubaitian/article/details/38926679

 

 

三、有源碼情況

直接開啟AndroidManifest.xml檔案,找到包含android.intent.action.MAIN和android.intent.category.LAUNCHER對應的activity。

如中第三行package為com.cola.ui,第七行主Activity為com.cola.ui.ColaBox(.ColaBox為Activity簡寫方式)。

<?xml version="1.0" encoding="utf-8"?>  <manifest xmlns:android="http://schemas.android.com/apk/res/android"        package="com.cola.ui"        android:versionCode="1"        android:versionName="1.0.0">      <application android:icon="@drawable/icon" android:label="@string/app_name">          <activity android:name=".ColaBox"                    android:label="@string/app_name">              <intent-filter>                  <action android:name="android.intent.action.MAIN" />                  <category android:name="android.intent.category.LAUNCHER" />              </intent-filter>          </activity>      <activity android:name="Frm_Addbills"></activity>      <activity android:name="Frm_Editacctitem"></activity>      <activity android:name="Grid_bills"></activity>      <service android:name="LocalService" android:exported="true" android:enabled="true"/>        </application>   <uses-permission android:name="android.permission.READ_CONTACTS" />        </manifest> 

 

 

查看Android應用程式套件名、Activity的幾個方法

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.