티스토리 뷰
그냥 대략 adb를 사용하면, 개발할때 편한 부분이 있을수가 있다.
대략적인 부분은 다음과 같고, 응용하여 사용하기 바랍니다.
1. Activity 실행
adb shell am start -a android.intent.action.MAIN -n 패키지명/액티비티 경로명
Ex) adb shell am start -a android.intent.action.MAIN -n com.exam.test/com.exam.test.MainActivity
2. Service 실행
adb shell am startservice -n 패키지명/서비스경로명
Ex) adb shell am startservice -n com.exam.test/com.exam.test.MainService
3. Broadcast 실행
adb shell am broadcast -a "브로드캐스트명"
Ex) adb shell am broadcast -a android.accounts.LOGIN_ACCOUNTS_CHANGED
4. adb restart
adb kill-server
adb start-server
5. adb에 연결된 device list
adb devices
6. 특정 device를 선택해서 사용
adb -d shell (device)
adb -e shell (emulator)
adb -s [device-name] shell (device serial)
7. apk 설치
adb -d install test.apk
8. 재설치
adb -d install -r test.apk
9. sign 오류로 재설치가 안될 경우
adb -d push test.apk /system/app
10. 텍스트를 입력하여줌.
adb shell input text "애국가"
11. 갤러리 실행
adb shell am start -a android.intent.action.GET_CONTENT -t image/jpeg
12. 카메라 실행
adb shell am start -a android.media.action.IMAGE_CAPTURE
13. 환경설정 실행
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings
14. Scheme로 실행
adb shell am start -a android.intent.action.VIEW customscheme://
'Mobile > Android' 카테고리의 다른 글
[Android/kotlin] Generics (0) | 2017.10.24 |
---|---|
[Android] Path 이용하기 (0) | 2017.03.08 |
[Android, Java] String to hex to byte array to Stirng. (0) | 2017.01.23 |
[Android][AndroidStudio] ignore file 설정 (0) | 2016.11.21 |
[Android] RecyclerView Sample (0) | 2016.08.05 |
- Total
- Today
- Yesterday
- Python
- ubuntu
- tomcat
- Xcode
- enum
- rxswift
- centos8
- Java
- CentOS
- android
- MySQL
- php
- Windows
- SWIFT
- ios
- docker
- windows10
- Gradle
- war
- Linux
- Spring
- Codable
- nodejs
- intellij
- github
- git
- go
- Kotlin
- golang
- cocoapods
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |