연결

장치 목록 보기

연결을 위해 현재 장치 목록 보기

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

 

Direct command

-s 옵션으로 장치에 바로 명령 전송. 

 

Debug

logcat

Prints log data to the screen.

adb -s emulator-5554 logcat 
CODE

bugreport

Prints dumpsys, dumpstate, and logcat data to the screen, for the purposes of bug reporting.
CODE

 

Data

Ref

install <path-to-apk>

Pushes an Android application (specified as a full path to an .apk file) to an emulator/device.

adb -s emulator-5554 install <path-to-apk>
CODE

 

pull <remote> <local>

Copies a specified file from an emulator/device instance to your development computer.

adb -s emulator-5554 pull <path-to-apk>
CODE

파일 가져오기 예제

adb -s emulator-5554 pull /data/user/0/com.sgitest.apps.sgitestandroidapp/files/reg-deligate1.sig.sig.sig .
CODE


push <local> <remote>

Copies a specified file from your development computer to an emulator/device instance.

adb -s emulator-5554 push a.pdf /sdcard
CODE

 

* 이 안 먹으므로 개별 파일을 적어주어야 함.

adb -s emulator-5554 push abcd.sig /data/user/0/com.sgitest.apps.sgitestandroidapp/files
CODE
adb -s emulator-5554 push user-cert.der /data/user/0/com.certipro.pkixutilstest.test/files
CODE

 

Shell

a

shell

Starts a remote shell in the target emulator/device instance. See ADB Shell Commands for more information.

adb -s emulator-5554 shell 
CODE

 

shell [shellCommand]

Issues a shell command in the target emulator/device instance and then exits the remote shell.

adb -s emulator-5554 shell ls /data/user/0/com.sgitest.apps.sgitestandroidapp/files
CODE