adb 명령어

 adb 명령어 정리

1. adb devices
- Device  & emulator의 목록을 보여줌
- 특정 디바이스를 지정하려명 '-s' 옵션 사용
2. .adb shell
- Shell command를 실행할 수 있는 간단한 쉘을 제공한다.
3. adb logcat [filter_spec]
- logcat 로그 출력
- adb logcat AndroidRuntime:E &
- adb -b radio &
- adb -b events &
4. adb install [-l][-r] file_spec
- 패키지 설치/재설치
-l : 다른 장치로 복사돼 넘어가는 것을 막는다.
-r: 이미 존재하는 app 데이터를 지우지 않은 채 어플리케이션을 재설치 한다. 
file_spec: 설치할 app의 .apk 파일
5. adb uninstall [-k] package
패키지 제거
-k : app의 데이터를 보존한다.
package: 패키지의 전체 경로, .apk 확장자는 빼야 한다.
6. adb push local remote
- 파일을 디바이스로  전송
7. adb pull remote local
- 디바이스의 파일을 로컬 호스트로 복사
8. adb shell dumpstate > state.txt
- state 덤프
9. adb shell dumpsys > sys.txt
- state 덤프
10. adb shell dumpsys meminfo
- 각의 process가 사용하는 메모리 내역 출력
11. adb shell procrank 
- 전체 process의 메모리 사용량 출력
12. adb shell “top –m 10 –s rss –d 2” 
- 메모리 leak이 발생(??)하는지 모니터링하는 명령
13. adb shell dumpsys meminfo pid 
- pid를 갖는 process의 memory 사용정보 출력

댓글

이 블로그의 인기 게시물

SSH 연결 Delay 해결

[ELK] search guard를 이용한 보안 설정 (사용자 권한)

공공데이터(openapi) 사용법 (특정 정류소, 버스의 남은 좌석 확인 하기)