adb命令查看報名和查看手機分辨率
打開所要查看的應用包名:
$ adb shell dumpsys activity top | head -n 10
TASK com.ss.android.article.news id=5ACTIVITY com.ss.android.article.news/com.ss.android.article.base.activity.DetailActivity 4407b468 pid=2714Local FragmentActivity 42df3028 State:mCreated=truemResumed=true mStopped=false mReallyStopped=falsemLoadersStarted=trueFragmentManager misc state:mActivity=com.ss.android.article.base.activity.DetailActivity@42df3028mContainer=android.support.v4.app.FragmentActivity$2@4231e9a0mCurState=5 mStateSaved=false mDestroyed=falseView Hierarchy:
這里拿今日頭條做樣例能夠看到它的包是com.ss.android.article.news,就無需反編譯去看manifast.xml來找到其相應的包名了。 查看分辨率:
$adb shell dumpsys window | grep "ShownFrame" | head -n 1
mHasSurface=true mShowFrame=[0.0,0.0] [720.0,1280.0]
能夠看到這里顯示的分辨率為720x1280,這里也能夠通過程序來獲取。
posted on 2017-06-30 21:00 mthoutai 閱讀(...) 評論(...) 編輯 收藏