Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Nfc-v can';我不知道如何检索与其他应用程序相同的数据_Android_Hex_Nfc - Fatal编程技术网

Android Nfc-v can';我不知道如何检索与其他应用程序相同的数据

Android Nfc-v can';我不知道如何检索与其他应用程序相同的数据,android,hex,nfc,Android,Hex,Nfc,我编写了一个从NFC-v标签读取数据的代码。 有了这些代码,我可以从卡中读取二进制数据 当我将这些数据解码为Hexa时,我得到了与Android应用程序相同的内存数据NXP Taginfo 但是我想恢复应用程序信息 下面是我从他们的应用程序中检索到的hexa的转储 -- INFO ------------------------------ # IC manufacturer: EM Microelectronic-Marin SA # IC type: EM4x3x # Applicat

我编写了一个从NFC-v标签读取数据的代码。 有了这些代码,我可以从卡中读取二进制数据

当我将这些数据解码为Hexa时,我得到了与Android应用程序相同的内存数据
NXP Taginfo

但是我想恢复
应用程序信息

下面是我从他们的应用程序中检索到的hexa的转储

-- INFO ------------------------------

# IC manufacturer:
EM Microelectronic-Marin SA

# IC type:
EM4x3x

# Application information:
SKIDATA keycard
* Key number: xx-16147133534646198558-x

-- NDEF ------------------------------

# No NFC data set storage:

-- EXTRA ------------------------------

# Memory size:
208 bytes
* 52 blocks, with 4 bytes per block

# IC detailed information:
Supported read commands:
* Single Block Read
* Multiple Block Read
* Get Multiple Block Security Status
* Get System Information
AFI supported
DSFID supported
IC reference value: 0x02
Customer ID: 0x066

-- TECH ------------------------------

# Technologies supported:
ISO/IEC 15693-3 compatible
ISO/IEC 15693-2 compatible

# Android technology information:
Tag description:
* TAG: Tech [android.nfc.tech.NfcV, android.nfc.tech.NdefFormatable]
android.nfc.tech.NdefFormatable
android.nfc.tech.NfcV
* Maximum transceive length: 253 bytes


# Detailed protocol information:
ID: E0:16:24:66:09:62:61:1E
AFI: 0x00
DSFID: 0x02

# Memory content:
You don't need it for find the number

  x:locked, .:unlocked
如何解码内存内容以检索此密钥号

回答,正如Yrtiop所说,您需要读取卡ID,以下是正确的功能:

byte[] arrayOfByte = cardNfcTag.getId();
    for (int i1 = -1 + arrayOfByte.length; i1 >= 0; i1--)
    {
      Object[] arrayOfObject = new Object[1];
      arrayOfObject[0] = Integer.valueOf(0xFF & arrayOfByte[i1]);
      localStringBuilder.append(String.format("%02X", arrayOfObject));
    }
    BigInteger localBigInteger = new BigInteger(localStringBuilder.toString(), 16);
return "xx-" + localBigInteger.toString() + "-x";

XX是卡的类型,最后一个x是验证密钥号的CRC。

从我在文档上看到的内容:


要获取密钥号,您必须读取UID,并且在读取字节时要应用一个掩码,如文档第7.2点所示。

Thx Yrtiop,您是对的,所需信息在密钥ID中。