2014-01-17 2 views

답변

5

간단한 대답은 자신을 위해

adb shell dumpsys window | find "mUnrestrictedScreen" 

내가이 어쩌면 당신이 그것을 유용, 배치 도스 썼습니다.

rem Get the Screen Size, file will contain: mUnrestrictedScreen=(0,0) 2560x1600 
adb shell dumpsys window | find "mUnrestrictedScreen" > SreenSize.txt 
for /f "tokens=2" %%b in (SreenSize.txt) do set clean_string=%%b 
echo %clean_string% 
for /f "delims=x" %%W in ("%clean_string%") do echo %%W 
:striploop 
set curr_char=%clean_string:~0,1% 
set clean_string=%clean_string:~1%  
if "%curr_char%" NEQ "x" goto striploop 
echo %clean_string% 
Set H=%clean_string% 
echo %H% 

모든 자료에 유래 3 개 또는 4 개의 다른 게시물에서 발췌, 특정 기사를 인용하지 죄송합니다, 열심히 추적합니다.

+0

원본 기사 찾기 : http://stackoverflow.com/questions/7527459/android-device-screen-size –

0

나는 그것을 얻었고 답변을 게시하지 않으려 고합니다.

디바이스에 대한 adb 쉘 getevent -p/dev/input/eventX - touchscreen 이벤트를 사용하여 일련의 결과를 제공해야합니다.

0035에 대응하는 것은 maxX를 제공하고, 0036는 maxY를 제공한다. 귀하의 질문에

관련 문제