Talks on adb - Day 2 (pdf version)

2,593
-1

Published on

adb, debugging

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,593
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
119
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Talks on adb - Day 2 (pdf version)

  1. 1. Talks on adb Day 2 mariah@tmax.co.kr 2010.07
  2. 2. Debugger Java Debugging Android Debugging Tools adb (Day 2)
  3. 3. adb Architecture Development Machine Target Machine Client Device/Emulator adb.exe emulator.exe ADT plugin adbd (daemon) DDMS on 5554 (console) on 5555 (adb) Server on 5037 USB adb.exe Dev. Host
  4. 4. adb Commands Options Ports and Networking -d forward <local> <remote> -e -s <serialNumber> Scripting wait-for- wait-for-device General devices Server start- start-server Debug kill- kill-server logcat jdwp Shell shell Data install push pull
  5. 5. adb Commands 사용 시나리오 adb shell #ls /data/app (DDMS File Explorer) adb pull Extract .apk
  6. 6. adb devices Server (ADB_HOST mode) Client >adb fork-server server fork- >adb devices 1. adb_commandline() 1. adb_commandline() 2. adb_main() 2. adb_query(“host:devices”) fdevent like UDS pairs _adb_connect(“host:version” _adb_connect(“host:version”) usb_init() _adb_connect(“host:devices”) _adb_connect(“host:devices”) local client init connect to 5037 client socket thread start to 5555, 5557, ... 3 write length & service string 이미지를 표시할 수 없습니다 . 컴퓨터 메모리가 부족하여 이 미지를 열 수 없거나 이미지가 손상되었습니다 . 컴퓨터를 다 시 시작한 후 파일을 다시 여십시오 . 여전히 빨간색 x가 나타 나면 이미지를 삭제한 다음 다시 삽입해야 합니다 . install_listener() socket_loopback_server on 5037 read response code fdevent_loop() read length & response string 3. handle_host_request() handle_host_request() list_transports() list_transports() write to reply_fd
  7. 7. adb shell ls Server (ADB_HOST mode) Client >adb fork-server server fork- >adb shell ls 1. adb_commandline() 1. adb_commandline() 2. adb_main() 2. adb_connect(“shell:ls”) fdevent like UDS pairs connect to 5037 이미지를 표시할 수 없습니다 . 컴퓨터 메모리가 부족하여 이 미지를 열 수 없거나 이미지가 손상되었습니다 . 컴퓨터를 다 usb_init() write transport_type 시 시작한 후 파일을 다시 여십시오 . 여전히 빨간색 x가 나타 나면 이미지를 삭제한 다음 다시 삽입해야 합니다 . 3 local client init client socket thread start to 5555, 5557, ... write length & service string install_listener() socket_loopback_server on 5037 fdevent_loop() 3. handle_host_request() handle_host_request() acquire_one_transport() acquire_one_transport() asocket- asocket->transport is changed
  8. 8. Interaction with Emulator Console on 5554 adb on 5555 >telnet localhost 5554 1. redirect host port(5555 or 5557 or ...) to guest(10.0.2.15:5555) 1. Commands slirp_redir() event 2. ping to adb server geo, gsm, sms emulator: sent '0012host:emulator:5555' to ADB server network, power 2. adb_connect(“shell:ls”) goldfish_device_set_irq connect to 5037 ... write transport_type write length & service string 2. Play! sms send 01011111111 Hello! gsm call 01011111111 gsm accept 01011111111

×