From 5eb0e4ad34d354ddc903479ba99c4272e19b1375 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 8 Oct 2012 23:33:17 -0700 Subject: Set EE wipe APDUs for NCI stack. The wipe APDUs are used to lock the Secure Element state whenever an app using the SE is deinstalled, when all userdata is removed, or on first boot of the device. This sequence is identical for both the NXP and NCI implementations. Bug: 7312675 Change-Id: I746580985bc986ac159e0d294823f0dbe6d3404f --- nci/src/com/android/nfc/dhimpl/NativeNfcManager.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'nci') diff --git a/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java b/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java index dde0c08..cc485a5 100755 --- a/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java +++ b/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java @@ -40,6 +40,18 @@ public class NativeNfcManager implements DeviceHost { static final String DRIVER_NAME = "android-nci"; + private static final byte[][] EE_WIPE_APDUS = { + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x07, (byte)0xa0, (byte)0x00, + (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x20, (byte)0x10, (byte)0x00}, + {(byte)0x80, (byte)0xe2, (byte)0x01, (byte)0x03, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x07, (byte)0xa0, (byte)0x00, + (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x30, (byte)0x30, (byte)0x00}, + {(byte)0x80, (byte)0xb4, (byte)0x00, (byte)0x00, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00}, + }; + static { System.loadLibrary("nfc_nci_jni"); } @@ -281,7 +293,7 @@ public class NativeNfcManager implements DeviceHost { @Override public byte[][] getWipeApdus() { - return null; + return EE_WIPE_APDUS; } @Override -- cgit v1.1