ADB (Android Debug Bridge)

[언어] Android 2015. 2. 20. 13:29

사용자가 명령을 안드로이드 기기나 에뮬레이터를 직접조작하는 도구

  • 연결된 기기 목록
    > adb devices

  • 명령어 전송
    > adb -s <일련번호> <명령>

    연결된 단말기가 하나일경우 -s <일련번호> 를 생략, 단말기한대 -d 인자 , 에뮬한대 -e 인자

  • 에뮬레이터 시작 종료 
    > adb -s <일련번호> [kill-server|start-server] 

  • 에뮬과 로컬간 파일전송
    기기로 복사
    > adb push <로컬경로> <기기경로>  
    로컬로 복사
    > adb pull <기기경로> <로컬경로>

  • 에뮬에 소프웨어 설치 및 제거
    > adb install <안드로이드 파일경로 *.apk >
    ex)
    > adb -d install c:\*.apk
    소프트웨어 재설치
    > adb -d install -r c:\*.apk
    소프트웨어 제거
    > adb uninstall <패키지 이름>

  • 로그
    > adb -e logcat <옵션> <필터>

    로그 레벨
    - V : verbose
    - D : debug
    - I : info
    - W : warning
    - E : error
    - F : fatal
    - S : silent

  • 로그 한글
>cmd 창 빠른편집모드 체크(Win + R / cmd)
>cmd /u
>chcp 65001
>속성창에서 글꼴 탭 Lucida Console로 변경
>abc logcat


http://developer.android.com/guide/developing/tools/adb.html

adb [-d|-e|-s <serialNumber>] <command> 

$ adb devices
List of devices attached 
emulator-5554  device
emulator-5556  device
emulator-5558  device

adb -s <serialNumber> <command> 

V — Verbose (lowest priority)
D — Debug
I — Info
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)

adb logcat TAGNAME:V *:S
(tagname에 V이상레벨 출력 *:S 는 다른건보이지 않게함.)




>adb -s emulator-5556 logcat



'[언어] Android' 카테고리의 다른 글

Listview 에서 자동 추가 기능 구현 하기  (0) 2015.02.20
Android 잡다한 TIP  (0) 2015.02.20
Activity 생명주기 Test  (0) 2015.02.20
AVD (Android Virtual Devices)  (0) 2015.02.20
Android SDK API Level  (0) 2015.02.20
: