Commit 01805e97 authored by y0no's avatar y0no
Browse files

Woops forget file for latest commit

parent f64cfb8f
......@@ -3,6 +3,7 @@ package fr.y0no.newbtle;
import android.util.Log;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
......@@ -84,15 +85,133 @@ public class FingerprintMgr {
for (ADParser.Record record: signature) {
for (ADParser.Record devRecord: records) {
if (record.getType() == devRecord.getType()) {
type_found = true;
if (Arrays.equals(record.getData(),
Arrays.copyOfRange(devRecord.getData(), 0, record.getData().length)
)) {
return true;
}
}
}
}
return type_found;
return false;
}
public static void loadInitSignature() {
/* Fitbit */
addSignature(
"06:ba5689a6fabfa2bd01467d6e00fbabad,09:436861726765204852,0a:fa,16:0a1812",
new DeviceSignature(DEVICE_TYPE.FITBIT, "Fitbit Charge HR")
);
addSignature(
"06:ba5689a6fabfa2bd01467d6e00fbabad,09:436861726765,0A:fa,16:0a1808",
new DeviceSignature(DEVICE_TYPE.FITBIT, "Fitbit Charge")
);
addSignature(
"09:4f6e65,0A:fa,16:0a180504",
new DeviceSignature(DEVICE_TYPE.FITBIT, "Fitbit One")
);
addSignature(
"01:06,06:ba5689a6fabfa2bd01467d6ea753abad,09:466c6578,0A:fa,16:0a180704",
new DeviceSignature(DEVICE_TYPE.FITBIT, "Fitbit Flex")
);
addSignature(
"01:06,06:ba5689a6fabfa2bd01467d6e00fbabad,09:5375726765,16:0a1810",
new DeviceSignature(DEVICE_TYPE.FITBIT, "Fitbit Surge")
);
/* Trackers */
addSignature(
"01:06,07:45fa56c1fb1bc02896a867180228174f,09:4741424c5953204c495445,19:0000",
new DeviceSignature(DEVICE_TYPE.KEYFOB, "Gablys Lite")
);
addSignature(
"01:04,09:57697374696b692d,0A:00",
new DeviceSignature(DEVICE_TYPE.KEYFOB, "Wistiki")
);
addSignature(
"01:06,02:0f18,09:4769676173657420472d746167,FF:800102151234",
new DeviceSignature(DEVICE_TYPE.KEYFOB, "G-tag")
);
addSignature(
"01:06,06:d54e8938944fd483774f33f8d6851045,09:436869706f6c6f",
new DeviceSignature(DEVICE_TYPE.KEYFOB, "Chipolo")
);
/* Smartwatch */
addSignature(
"07:669a0c2000089a94e3117b66103e4e6a,09:66656e6978203300,16:103e001200",
new DeviceSignature(DEVICE_TYPE.SMARTWATCH, "Garmin Fenix 3")
);
addSignature(
"07:669a0c2000089a94e3117b66103e4e6a,09:466f726572756e6e6572,16:103e000200",
new DeviceSignature(DEVICE_TYPE.SMARTWATCH, "Garmin Forerunner 920")
);
addSignature(
"01:1a,FF:4c000c0e005c",
new DeviceSignature(DEVICE_TYPE.SMARTWATCH, "Apple Watch")
);
addSignature(
"01:06,09:57204163746976697465,0A:00,FF:0024e436",
new DeviceSignature(DEVICE_TYPE.SMARTWATCH, "Withings Activite")
);
/* Wristbands */
addSignature(
"01:06,07:669a0c200008c181e211dd3110c4cd83",
new DeviceSignature(DEVICE_TYPE.WRISTBAND, "Nike+ FuelBand SE")
);
addSignature(
"01:06,06:bc4f45f35650a19c1141804500101c15,09:555032,16:0a1802",
new DeviceSignature(DEVICE_TYPE.WRISTBAND, "Jawbone UP2")
);
addSignature(
"01:06,06:bc4f45f35650a19c1141804500101c15,09:555033,16:0a1803",
new DeviceSignature(DEVICE_TYPE.WRISTBAND, "Jawbone UP3")
);
addSignature(
"01:06,07:669a0c2000089a94e3117b66103e4e6a,16:103e001200",
new DeviceSignature(DEVICE_TYPE.WRISTBAND, "vivosmart/vivoactive")
);
addSignature(
"01:06,02:f0ff,09:4a5354594c45",
new DeviceSignature(DEVICE_TYPE.WRISTBAND, "JStyle Wristband")
);
/* Audio */
addSignature(
"01:1a,03:0d180f180a18,03:0d180f180a18,09:4a61627261",
new DeviceSignature(DEVICE_TYPE.SOUND, "Jabra Pulse")
);
addSignature(
"01:12,03:befe,09:426f73652041453220536f756e644c696e6b,FF:0033400a",
new DeviceSignature(DEVICE_TYPE.SOUND, "Bose AE2 Soundlink")
);
/* MyFox */
addSignature(
"01:05,07:1bc5d5a502003c98e41188880100a1e4,09:4d79666f78",
new DeviceSignature(DEVICE_TYPE.KEYFOB, "Myfox Alarm remote")
);
/* iPhone */
addSignature(
"01:1a,FF:4c000c0e",
new DeviceSignature(DEVICE_TYPE.PHONE, "iPhone")
);
/* Wiko */
addSignature(
"01:02,09:43494e4b20504541582032,09:43494e4b20504541582032",
new DeviceSignature(DEVICE_TYPE.PHONE, "Wiko Cink Peax 2")
);
}
public static void loadSignatures() {
ArrayList<String> lines = FileLog.read("signature.txt", NewBtLE.getContext());
if (lines.isEmpty()) {
loadInitSignature();
}
for (String line: lines) {
String[] splitted = line.split(";");
m_oSignatures.put(splitted[0], new DeviceSignature(DEVICE_TYPE.valueOf(splitted[1]), splitted[2]));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment