diff --git a/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java b/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java index 624ead74..6f4c63fd 100644 --- a/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java +++ b/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java @@ -847,18 +847,24 @@ public static boolean hasMifareClassicSupport() { // "brcm" libs are for devices with Broadcom chips. Broadcom chips // don't support MIFARE Classic. File libsFolder = new File("/system/lib"); + if (!libsFolder.exists()) { + libsFolder = new File("/system/lib64"); + } File[] libs = libsFolder.listFiles(); - for (File lib : libs) { - if (lib.isFile() + if (libs != null) { + for (File lib : libs) { + if (lib.isFile() && lib.getName().startsWith("libnfc") && lib.getName().contains("brcm") // Add here other non NXP NFC libraries. - ) { - mHasMifareClassicSupport = -1; - return false; + ) { + mHasMifareClassicSupport = -1; + return false; + } } } + mHasMifareClassicSupport = 1; return true; }