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. Android(安卓)抽屉导航
  2. [1] Android主要源代码组成
  3. android facebook authorize 时禁止调用facebook app
  4. Android体系结构
  5. android 胡言乱语 1 android basic
  6. 【Android】如何调节屏幕亮度,关闭屏幕
  7. ch020 Android(安卓)SQLite3(第二部分)
  8. ch013 Android(安卓)ScrollView与ListView
  9. ch010 Android(安卓)GridView

随机推荐

  1. Android(安卓)ListView一些应该知道的事
  2. android利用post方式与web服务器通信
  3. Android中通过gradle脚本做的一些小事情
  4. Facebook Buck和xctool:针对Android和iOS
  5. [Android] 为Android安装BusyBox —— 完
  6. 【Unity3d】Unity5与Android交互通信(使用
  7. Android人脸识别app——基于Face++,MVP+Re
  8. [Android] ListView (普通列表控件) 的基
  9. Android自学笔记-3-ADB的常用命令
  10. 一、android集成百度地图(android百度地