본문 바로가기

adb

ADB 명령어 관리자 권한으로 실행하기. cmd 창에서 adb shell "su root ls /abc/def"하면 /adb/def 폴더아래 내용을 ls 관리자 명령어로 볼 수 있습니다. ex) adb shell "su root chmod -Rf 777 /abc/def"하면 /def 폴더와 그 하위 파일의 rw 권한이 모두 허가됩니다. (chmod 777 명령어) 더보기
adb 명령어 주로 사용하는 adb 명령어 정리 매번 검색해서 보곤 또 까먹어서 찾으로 다녀서 이곳에 정리 adb devices 연결된 장비의 이름과 상태를 알려준다. $ adb devicesList of devices attached[device_name1] device[device_name2] connecting 한번에 2개 이상의 장비를 연결한 경우 adb 뒤에 -s (select)옵션으로 adb 명령어를 날릴 수 있다. $ adb -s [device_name1] shell root@어쩌구저쩌구 : / # 가 나오지만 $ adb -s [device_name2] shell하면 안나옵니다. -wait for device- 이런거 떳던기억이... 상태가 connecting 이기 때문입니다. 이경우 장비를 reboot하.. 더보기
안드로이드 드래그? 이벤트 (adb shell input swipe) adb shell input swipe 500 500 100 1000 100 command: adb shell input swipe xSource, ySource, xDestination, yDestination, Duration ex) adb shell input swipe 500 500 100 1000 100-> (500, 500) 좌표에서 (100,1000)로 100ms동안 터치를 해서 움직인다. 응용 :Source x,y 와 Destination x,y를 같게 설정하고 Duration만 길게하면 길게터치 (Long Press)가 된다. 더보기
안드로이드 터치 이벤트 (adb shell input tap) adb shell input tap 500 500 Command: adb shell input tap xPosition YPosition (xPosition, yPosition은 tap하고자 하는 위치를 의미) 설명: xPosition, yPosition 위치에 짧게 터치. xPosition, yPosition을 쉽게 찾는 방법은 Developer Options에서 “Show Pointer Location”을 On 하면 단말 화면 위에 터치하는 부분의 X, Y Position 값을 확인 할 수 있다. 더보기