This utility is a tool for analyzing and decrypting packets used for communication with Xiaomi smart bands. Purpose of this utility is to assist in the development of Gadgetbridge. It uses Android BTSnoop log files to analyze packets transmitted between the smart band and the phone.
- Compile the protobuf file
protoc --python_out=. xiaomi.proto
- Create and active virtual environment using venv
- Install dependencies from requirements.txt
pip3 install -r requirements.txt
- Run the extractor.py script using the command:
python3 extractor.py -k auth_key btsnoop_hci.log output.log
Where:
auth_key
- the authentication key, which can be obtained by following the instructions from Gadgetbridge Wikibtsnoop_hci.log
- the Android BTSnoop log file, which also can be obtained by followwing the instrctions from Gadgetbridge Development Wikioutput.log
- the output file where the decrypted packets will be written
- Only XiaomiSppV2 supported for now
- Tested only with Xiaomi Smart Band
- xiaomi.proto was taken from Gadgetbridge sources