SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
Talks on adb
    Day 2



            mariah@tmax.co.kr
                     2010.07
Debugger

Java Debugging

Android
Debugging Tools

adb (Day 2)
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
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
adb Commands 사용 시나리오

                   adb shell

                   #ls /data/app
                   (DDMS File Explorer)

                   adb pull

                   Extract .apk
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
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
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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Who is afraid of privileged containers ?
Who is afraid of privileged containers ?Who is afraid of privileged containers ?
Who is afraid of privileged containers ?
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
digitalSTROM Developer Day 2011: Wie Heimelektronik und digitalSTROM zusammen...
digitalSTROM Developer Day 2011: Wie Heimelektronik und digitalSTROM zusammen...digitalSTROM Developer Day 2011: Wie Heimelektronik und digitalSTROM zusammen...
digitalSTROM Developer Day 2011: Wie Heimelektronik und digitalSTROM zusammen...
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
Docker Compose Explained
Docker Compose ExplainedDocker Compose Explained
Docker Compose Explained
 
Logging system of Android
Logging system of AndroidLogging system of Android
Logging system of Android
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for Beginners
 
C make tutorial
C make tutorialC make tutorial
C make tutorial
 
How to _docker
How to _dockerHow to _docker
How to _docker
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
 
Docker practice
Docker practiceDocker practice
Docker practice
 
CMake Talk 2008
CMake Talk 2008CMake Talk 2008
CMake Talk 2008
 
Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com Docker
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 

Semelhante a Talks on adb - Day 2 (pdf version)

Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
Jaime Blasco
 
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
RootedCON
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]
RootedCON
 
Troubleshooting vm's presen
Troubleshooting vm's presenTroubleshooting vm's presen
Troubleshooting vm's presen
kiwimjg
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
Positive Hack Days
 

Semelhante a Talks on adb - Day 2 (pdf version) (20)

Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testers
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
 
Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
 
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
 
Android debug bridge android developers
Android debug bridge  android developersAndroid debug bridge  android developers
Android debug bridge android developers
 
Android debug bridge android developers
Android debug bridge  android developersAndroid debug bridge  android developers
Android debug bridge android developers
 
Troubleshooting vm's presen
Troubleshooting vm's presenTroubleshooting vm's presen
Troubleshooting vm's presen
 
Python twisted
Python twistedPython twisted
Python twisted
 
Interacting with your app through the command line
Interacting with your app through the command lineInteracting with your app through the command line
Interacting with your app through the command line
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
 
Adb instructions
Adb instructionsAdb instructions
Adb instructions
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
EclipseCon 2011: Deciphering the CDT debugger alphabet soup
EclipseCon 2011: Deciphering the CDT debugger alphabet soupEclipseCon 2011: Deciphering the CDT debugger alphabet soup
EclipseCon 2011: Deciphering the CDT debugger alphabet soup
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Talks on adb - Day 2 (pdf version)

  • 1. Talks on adb Day 2 mariah@tmax.co.kr 2010.07
  • 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. 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. adb Commands 사용 시나리오 adb shell #ls /data/app (DDMS File Explorer) adb pull Extract .apk
  • 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. 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. 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