appium擷取android app的包名和主Activity

來源:互聯網
上載者:User

標籤:sum   seda   EDA   package   pos   sdk   find   spl   man   

擷取當前啟動並執行APP包名和activity:

adb shell dumpsys window w |findstr \/ |findstr name=

方法一在appium的android setting中選擇下載到電腦上的app包,擷取Activity。

方法二在android-sdk中安裝build-tools包,進入這個目錄。

aapt dump badging *.apk(下載到電腦上的app包路徑)

方法三串連到電腦,開啟app。

adb devices(查看手機是否串連到電腦)

adb logcat | grep ActivityManager(查看當前正在啟動並執行Activity)

或:

adb logcat | grep Displayed(同上)

方法四手機串連到電腦。

adb devices(查看手機是否串連到電腦)

adb shell pm list packages:列出所有的包名,找到所查看包的包名。

adb shell dumpsys package com.android.XXX:查看某個包的具體資訊

其它:

adb devices:查看Android裝置是否串連到電腦。

adb shell dumpsys activity:查看當前啟動並執行是哪個activity,啟動並執行一些進程等

adb shell dumpsys activity activities

adb shell pm list packages:列出所有的包名。

adb shell dumpsys package:列出所有的安裝應用的資訊

adb shell dumpsys package com.android.XXX:查看某個包的具體資訊

adb shell dumpsys activity | grep mFocusedActivity:查看當前resume的是哪個activity

adb logcat | grep ActivityManager:查看當前正在啟動並執行Activity

adb logcat | grep Displayed:查看當前正在啟動並執行Activity

appium擷取android app的包名和主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.