Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch to yubioauth-android (8fbb3b1) for Canokey Pigeon.
diff --git a/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java b/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java
index 1e5ed82..060b32f 100644
--- a/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java
+++ b/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbDeviceManager.java
@@ -29,7 +29,7 @@ public final class UsbDeviceManager {
private transient UsbDevicePredicate deviceFiler = new UsbDevicePredicate() {
@Override
public boolean test(UsbDevice usbDevice) {
- return usbDevice.getVendorId() == 0x1050;
+ return usbDevice.getVendorId() == 0x1050 || usbDevice.getVendorId() == 0x20A0;
}
};
diff --git a/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbTransport.java b/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbTransport.java
index 73856f9..5da5274 100644
--- a/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbTransport.java
+++ b/app/src/main/java/com/yubico/yubikitold/transport/usb/UsbTransport.java
@@ -11,9 +11,9 @@ import java.util.HashSet;
import java.util.Set;
public class UsbTransport implements YubiKeyTransport {
- private static final Set<Integer> PRODUCT_IDS_CCID = new HashSet<>(Arrays.asList(0x0111, 0x0112, 0x0115, 0x0116, 0x0404, 0x0405, 0x0406, 0x0407));
- private static final Set<Integer> PRODUCT_IDS_OTP = new HashSet<>(Arrays.asList(0x0010, 0x00110, 0x0111, 0x0114, 0x0116, 0x0401, 0x0403, 0x0405, 0x0407, 0x0410));
- private static final Set<Integer> PRODUCT_IDS_FIDO = new HashSet<>(Arrays.asList(0x0113, 0x0114, 0x0115, 0x0116, 0x0120, 0x0402, 0x0403, 0x0406, 0x0407, 0x0410));
+ private static final Set<Integer> PRODUCT_IDS_CCID = new HashSet<>(Arrays.asList(0x0111, 0x0112, 0x0115, 0x0116, 0x0404, 0x0405, 0x0406, 0x0407, 0x42D4));
+ private static final Set<Integer> PRODUCT_IDS_OTP = new HashSet<>(Arrays.asList(0x0010, 0x00110, 0x0111, 0x0114, 0x0116, 0x0401, 0x0403, 0x0405, 0x0407, 0x0410, 0x42D4));
+ private static final Set<Integer> PRODUCT_IDS_FIDO = new HashSet<>(Arrays.asList(0x0113, 0x0114, 0x0115, 0x0116, 0x0120, 0x0402, 0x0403, 0x0406, 0x0407, 0x0410, 0x42D4));
private final UsbManager usbManager;
private final UsbDevice usbDevice;
diff --git a/app/src/main/kotlin/com/yubico/yubioath/ui/BaseActivity.kt b/app/src/main/kotlin/com/yubico/yubioath/ui/BaseActivity.kt
index 84a0707..090381a 100644
--- a/app/src/main/kotlin/com/yubico/yubioath/ui/BaseActivity.kt
+++ b/app/src/main/kotlin/com/yubico/yubioath/ui/BaseActivity.kt
@@ -86,7 +86,7 @@ abstract class BaseActivity<T : BaseViewModel>(private var modelClass: Class<T>)
yubiKitManager.usbDeviceManager.setUsbDeviceFilter {
val hasCcid = 0.until(it.interfaceCount).any { i -> it.getInterface(i).interfaceClass == UsbConstants.USB_CLASS_CSCID }
when {
- it.vendorId != 0x1050 -> false //Not a Yubico device, ignore it
+ //it.vendorId != 0x1050 -> false //Not a Yubico device, ignore it
it.productId == 0x421 -> false
!hasCcid-> { //YubiKey with no CCID, display error
launch(Dispatchers.Main) {
@sorz
Copy link
Author

sorz commented Jan 3, 2022

APK built by Sparrow
https://t.me/canokeys/50953
(only use if you know/trust Sparrow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment