Android adb獲取屏幕分辨率

Android adb獲取屏幕分辨率

1.

C:\Users\sheng>adb shell dumpsys window displays

WINDOW MANAGER DISPLAY CONTENTS (dumpsys window displays)

? Display: mDisplayId=0

? ? init=720x1440 320dpi cur=720x1440 app=720x1344 rng=720x672-1344x1296

? ? deferred=false mLayoutNeeded=false mTouchExcludeRegion=SkRegion((0,0,720,1440))

? Application tokens in top down Z order:

? ? mStackId=0

? ? mDeferRemoval=false

? ? mFillsParent=true

? ? mBounds=[0,0][720,1440]

? ? ? taskId=5

? ? ? ? mFillsParent=true

? ? ? ? mBounds=[0,0][720,1440]

? ? ? ? mdr=false

? ? ? ? appTokens=[AppWindowToken{c65d283 token=Token{38cf532 ActivityRecord{54b493d u0 com.android.launcher3/.Launcher t5}}}]

? ? ? ? mTempInsetBounds=[0,0][0,0]

? ? ? ? ? Activity #0 AppWindowToken{c65d283 token=Token{38cf532 ActivityRecord{54b493d u0 com.android.launcher3/.Launcher t5}}}

? ? ? ? ? windows=[Window{811af88 u0 com.android.launcher3/com.android.launcher3.Launcher}]

? ? ? ? ? windowType=2 hidden=false hasVisible=true

? ? ? ? ? app=true mVoiceInteraction=false

? ? ? ? ? task={taskId=5 appTokens=[AppWindowToken{c65d283 token=Token{38cf532 ActivityRecord{54b493d u0 com.android.launcher3/.Launcher t5}}}] mdr=false}

? ? ? ? ? mFillsParent=true mOrientation=-1

? ? ? ? ? hiddenRequested=false mClientHidden=false reportedDrawn=true reportedVisible=true

? ? ? ? ? mNumInterestingWindows=1 mNumDrawnWindows=1 inPendingTransaction=false allDrawn=true (animator=true)

? ? ? ? ? startingData=null removed=false firstWindowDrawn=true mIsExiting=false

? ? ? ? ? controller=AppWindowContainerController{ token=Token{38cf532 ActivityRecord{54b493d u0 com.android.launcher3/.Launcher t5}} mContainer=AppWindowToken{c65d283 token=Token{38cf532 ActivityRecord{54b493d u0 com.android.launcher3/.Launcher t5}}} mListener=ActivityRecord{54b493d u0 com.android.launcher3/.Launcher t5}}

? ? mStackId=1

? ? mDeferRemoval=false

? ? mFillsParent=true

? ? mBounds=[0,0][720,1440]

? ? ? taskId=8

? ? ? ? mFillsParent=true

? ? ? ? mBounds=[0,0][720,1440]

? ? ? ? mdr=false

? ? ? ? appTokens=[AppWindowToken{59db3c4 token=Token{8587ed7 ActivityRecord{f300e56 u0 com.android.launcher3/.SettingsActivity t8}}}]

? ? ? ? mTempInsetBounds=[0,0][0,0]

? ? ? ? ? Activity #0 AppWindowToken{59db3c4 token=Token{8587ed7 ActivityRecord{f300e56 u0 com.android.launcher3/.SettingsActivity t8}}}

? ? ? ? ? windows=[Window{f89f219 u0 com.android.launcher3/com.android.launcher3.SettingsActivity}]

? ? ? ? ? windowType=2 hidden=true hasVisible=true

? ? ? ? ? app=true mVoiceInteraction=false

? ? ? ? ? task={taskId=8 appTokens=[AppWindowToken{59db3c4 token=Token{8587ed7 ActivityRecord{f300e56 u0 com.android.launcher3/.SettingsActivity t8}}}] mdr=false}

? ? ? ? ? mFillsParent=true mOrientation=-1

? ? ? ? ? hiddenRequested=true mClientHidden=true reportedDrawn=false reportedVisible=false

? ? ? ? ? mAppStopped=true

? ? ? ? ? mNumInterestingWindows=1 mNumDrawnWindows=1 inPendingTransaction=false allDrawn=true (animator=true)

? ? ? ? ? startingData=null removed=false firstWindowDrawn=true mIsExiting=false

? ? ? ? ? controller=AppWindowContainerController{ token=Token{8587ed7 ActivityRecord{f300e56 u0 com.android.launcher3/.SettingsActivity t8}} mContainer=AppWindowToken{59db3c4 token=Token{8587ed7 ActivityRecord{f300e56 u0 com.android.launcher3/.SettingsActivity t8}}} mListener=ActivityRecord{f300e56 u0 com.android.launcher3/.SettingsActivity t8}}

? ? ? taskId=7

? ? ? ? mFillsParent=true

? ? ? ? mBounds=[0,0][720,1440]

? ? ? ? mdr=false

? ? ? ? appTokens=[AppWindowToken{99f5b0 token=Token{9ee24f3 ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}}}, AppWindowToken{86a682a token=Token{e6b4d15 ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}}}]

? ? ? ? mTempInsetBounds=[0,0][0,0]

? ? ? ? ? Activity #1 AppWindowToken{86a682a token=Token{e6b4d15 ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}}}

? ? ? ? ? windows=[Window{7e06d93 u0 com.android.settings/com.android.settings.Settings$DisplaySettingsActivity}]

? ? ? ? ? windowType=2 hidden=true hasVisible=true

? ? ? ? ? app=true mVoiceInteraction=false

? ? ? ? ? task={taskId=7 appTokens=[AppWindowToken{99f5b0 token=Token{9ee24f3 ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}}}, AppWindowToken{86a682a token=Token{e6b4d15 ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}}}] mdr=false}

? ? ? ? ? mFillsParent=true mOrientation=-1

? ? ? ? ? hiddenRequested=true mClientHidden=true reportedDrawn=false reportedVisible=false

? ? ? ? ? mAppStopped=true

? ? ? ? ? mNumInterestingWindows=1 mNumDrawnWindows=1 inPendingTransaction=false allDrawn=true (animator=true)

? ? ? ? ? startingData=null removed=false firstWindowDrawn=true mIsExiting=false

? ? ? ? ? controller=AppWindowContainerController{ token=Token{e6b4d15 ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}} mContainer=AppWindowToken{86a682a token=Token{e6b4d15 ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}}} mListener=ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}}

? ? ? ? ? Activity #0 AppWindowToken{99f5b0 token=Token{9ee24f3 ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}}}

? ? ? ? ? windows=[Window{4c30d2f u0 com.android.settings/com.android.settings.Settings}]

? ? ? ? ? windowType=2 hidden=true hasVisible=true

? ? ? ? ? app=true mVoiceInteraction=false

? ? ? ? ? task={taskId=7 appTokens=[AppWindowToken{99f5b0 token=Token{9ee24f3 ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}}}, AppWindowToken{86a682a token=Token{e6b4d15 ActivityRecord{6bc56cc u0 com.android.settings/.Settings$DisplaySettingsActivity t7}}}] mdr=false}

? ? ? ? ? mFillsParent=true mOrientation=-1

? ? ? ? ? hiddenRequested=true mClientHidden=true reportedDrawn=false reportedVisible=false

? ? ? ? ? mAppStopped=true

? ? ? ? ? mNumInterestingWindows=1 mNumDrawnWindows=1 inPendingTransaction=false allDrawn=true (animator=true)

? ? ? ? ? startingData=null removed=false firstWindowDrawn=true mIsExiting=false

? ? ? ? ? controller=AppWindowContainerController{ token=Token{9ee24f3 ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}} mContainer=AppWindowToken{99f5b0 token=Token{9ee24f3 ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}}} mListener=ActivityRecord{f24b62 u0 com.android.settings/.Settings t7}}

? DimLayerController

? ? Task=5

? ? ? dimLayer=shared, animator=null, continueDimming=false

? ? ? mDimSurface=Surface(name=DimLayerController/Stack=0) mLayer=110999 mAlpha=0.0

? ? ? mLastBounds=[-180,-360][900,1800] mBounds=[-180,-360][900,1800]

? ? ? Last animation:? mDuration=200 mStartTime=9358231 curTime=13484603

? ? ? mStartAlpha=0.6 mTargetAlpha=0.0

? ? Stack=1

? ? ? dimLayer=shared, animator=null, continueDimming=false

? ? ? mDimSurface=Surface(name=DimLayerController/Stack=0) mLayer=110999 mAlpha=0.0

? ? ? mLastBounds=[-180,-360][900,1800] mBounds=[-180,-360][900,1800]

? ? ? Last animation:? mDuration=200 mStartTime=9358231 curTime=13484603

? ? ? mStartAlpha=0.6 mTargetAlpha=0.0

? ? Task=8

? ? ? dimLayer=shared, animator=null, continueDimming=false

? ? ? mDimSurface=Surface(name=DimLayerController/Stack=0) mLayer=110999 mAlpha=0.0

? ? ? mLastBounds=[-180,-360][900,1800] mBounds=[-180,-360][900,1800]

? ? ? Last animation:? mDuration=200 mStartTime=9358231 curTime=13484604

? ? ? mStartAlpha=0.6 mTargetAlpha=0.0

? ? Task=7

? ? ? dimLayer=shared, animator=null, continueDimming=false

? ? ? mDimSurface=Surface(name=DimLayerController/Stack=0) mLayer=110999 mAlpha=0.0

? ? ? mLastBounds=[-180,-360][900,1800] mBounds=[-180,-360][900,1800]

? ? ? Last animation:? mDuration=200 mStartTime=9358231 curTime=13484604

? ? ? mStartAlpha=0.6 mTargetAlpha=0.0

? ? Stack=0

? ? ? dimLayer=shared, animator=null, continueDimming=false

? ? ? mDimSurface=Surface(name=DimLayerController/Stack=0) mLayer=110999 mAlpha=0.0

? ? ? mLastBounds=[-180,-360][900,1800] mBounds=[-180,-360][900,1800]

? ? ? Last animation:? mDuration=200 mStartTime=9358231 curTime=13484604

? ? ? mStartAlpha=0.6 mTargetAlpha=0.0

? DockedStackDividerController

? ? mLastVisibility=false

? ? mMinimizedDock=false

? ? mAdjustedForIme=false

? ? mAdjustedForDivider=false

? PinnedStackController

? ? defaultBounds=[304,1096][688,1312]

? ? movementBounds=[32,80][688,1312]

? ? mIsImeShowing=false

? ? mIsMinimized=false

? ? mActions=[]

C:\Users\wangxiaosheng>

2:adb shell wm size

Physical size: 720x1440

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 打印詳細(xì)方式:adb shell dumpsys window displays執(zhí)行結(jié)果: 打印簡單方式:adb ...
    crystaltiger閱讀 4,406評論 0 0
  • 對比1:出bug情況 先hite 然后再 show,產(chǎn)生黑屏01-01 14:45:48.121 2143 2...
    我在等你回復(fù)可你沒回閱讀 1,205評論 1 0
  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom閱讀 3,184評論 0 3
  • 姓名:張漢超 公司:東莞耀升機(jī)電有限公司 組別:4月25-27日六項精進(jìn)245期學(xué)員 【日精進(jìn)打卡第239天】 【...
    張漢超閱讀 150評論 0 1
  • 個人簡介 李偉華,號五一居士,生于1965年。1985年開始從教從藝,擅詩書畫印。民進(jìn)會員、書法教授、國家一級美術(shù)...
    書畫天才閱讀 1,308評論 0 0

友情鏈接更多精彩內(nèi)容