1. wpa_supplicant

During the process of EAP-SIM Authentication, wpa_supplicant will send APDU-Command:"SELECT" to ApduService.

  1. The "SELECT" Command means to select one file from the file system of SIM Card

  2. The right APDU-Response is 0x61, or 0x6c, or 0x9f, which means the APDU-Command executed successfully;

  3. The wrong APDU-Response is 0x6a82, which means "Selected file not found", according to the protocol: ETSI GSM 11.11

    scard_get_imsi()         |-->scard_select_file()               |-->_scard_select_file()                    |-->scard_transmit()                         |-->SCardTransmit()                              |-->(1)socket_local_client()-->open socket and connect                              |      |-->socket()                              |      |-->socket_local_client_connect()                              |           |-->connect()                              |-->(2)send()                              |-->(3)select()                              |-->(4)recv()

2. ApduService

The ApduService is responsible for setting up a Unix socket when Wifi starts and listening for incoming connections.
Data read from the socket will be parsed and transmitted as a APDU Command to Telephony.
The response will be sent back over the socket. The socket's name is sent to the wpa supplicant.

frameworks/opt/net/wifi/service/java/com/android/server/wifi/ApduService.java 
    runService()     |-->(1)waitForConnection()     |        |-->ServerSocket.accept()     |-->(2)communicationWithClient()              |-->ConnectionSocket.getInputStream()              |-->ConnectionSocket.getOutputStream()              |-->phone.iccTransmitApduBasicChannel()

3. PhoneInterfaceManager 

/packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java

(1) important events:EVENT_TRANSMIT_APDU_LOGIC_CHANNEL_DONE   EVENT_TRANSMIT_APDU_BASIC_CHANNEL_DONE   (2) important commands:   CMD_TRANSMIT_APDU_LOGIC_CHANNEL   CMD_TRANSMIT_APDU_BASIC_CHANNEL   (3) important methods:   iccTransmitApduLogicalChannel()   iccTransmitApduBasicChannel()   (4) related System Property:   [gsm.sim.operator.numeric] 

更多相关文章

  1. Catalog Service - 解析微软微服务架构实例代码
  2. 介绍一个微软开源项目网站--CodePlex
  3. 具体分析微软的xml解析器
  4. 继 GitHub 后微软又收购了 npm
  5. 想来微软实习吗?
  6. 尝鲜!微软首个AI量化投资开源平台Qlib上手体验!
  7. 10% + 10% = 0.11 ?是 bug 还是 feature ?微软开源的计算器项目告
  8. 大新闻!Python 之父重新出山,加入微软开发部
  9. GitHub 热门:微软新开源的 Python 静态类型检查器

随机推荐

  1. afinal - afinal 是一个android的 orm 和
  2. android Intents和Intent Filters - 开发
  3. Android(安卓)Jni代码示例讲解
  4. Android(安卓)imageView图片按比例缩放
  5. 【转】Android(安卓)技术-- 图形系统详解
  6. Android(安卓)Studio按钮响应事件(三)
  7. Android(安卓)内存泄漏
  8. Android(安卓)中webview与原生Java的 交
  9. Android开发平台简介
  10. CAMERA(12)---[Android相机]光线传感器识