-
Install setuptools (sudo apt-get install python3-setuptools)
-
Get btsnoop_hci.log by turning on Android developer option
Use wireshark to extract RFCOMM payload
Rip protobuf from payload binary by ripping transport header (See AMA protocol
spec for transport header details). I wrote a little python3 program called rippproto.py to do that
Parsing protobuf message. I wrote a little python3 program called listctl.py to do that
xclip requires x-server. VcXsrv (open source) or Xming (donation based) are two possible choices. VcXsrv is what I use.
subprocess package can run xclip (or any shell command) in Python3 and redirect input/output
thomwang@SJC-5CG7193RWZ:~/AMA_ProtoFiles$ ./onestep.py -x 100006085a4a020803
Version: 1
Stream Id: 0 - control stream
Payload Bytes: 6
command: GETFIRMWAREINFORMATION
response {
error_code: UNSUPPORTED
}
thomwang@SJC-5CG7193RWZ:~/AMA_ProtoFiles$ ./onestep.py -x 10003c08144a381a360a113037373036315a38313431313036334145120c426f736520514333352049491a03000102220e413259303451504643414e4c5051
Version: 1
Stream Id: 0 - control stream
Payload Bytes: 60
command: GET_DEVICE_INFORMATION
response {
device_information {
serial_number: "077061Z81411063AE"
name: "Bose QC35 II"
supported_transports: BLUETOOTH_LOW_ENERGY
supported_transports: BLUETOOTH_RFCOMM
supported_transports: BLUETOOTH_IAP
device_type: "A2Y04QPFCANLPQ"
}
}
thomwang@SJC-5CG7193RWZ:~/AMA_ProtoFiles$ ./onestep.py -x 10000608154a025200
Version: 1
Stream Id: 0 - control stream
Payload Bytes: 6
command: GET_DEVICE_CONFIGURATION
response {
device_configuration {
}
}
thomwang@SJC-5CG7193RWZ:~/AMA_ProtoFiles$ ./onestep.py -x 10000608324a020803
Version: 1
Stream Id: 0 - control stream
Payload Bytes: 6
command: SYNCHRONIZE_SETTINGS
response {
error_code: UNSUPPORTED
}