Skip to content

Commit

Permalink
Merge pull request #466 from edusperoni/feat/s24-support
Browse files Browse the repository at this point in the history
feat: add S24 support and handle missing lib folder
  • Loading branch information
ikarus23 committed Jan 27, 2024
2 parents 097338f + b4ddc7f commit 7e7f70a
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e7f70a

Please sign in to comment.