1 (edited by d82k 2016-05-24 21:46:30)

Topic: Cannot format card - Reset access bits?

Dear all,
I have some issue in formatting my card in particular sector 1 is the only one I cannot empty.

Sector: 1
00000040  aa 03 aa 01 00 00 00 00 00 00 00 00 00 00 00 01
00000050  aa 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000060  a4 01 00 ff 5b fe ff 00 a4 01 00 ff 00 ff 00 ff
00000070  ee 08 fe fe 50 ea a1 e7 85 00 03 aa 30 35 14 b4

Where "a1 e7 85 00" are the access bits which should mean:

Location:  Read:   Write:   Incr.:   Dec/Tr/Rs:
Sector: 1
Block: 0   Key A   Never    Never    Never
Block: 1   Key A   Key B    Never    Never
Block: 2   Key A   Key B    Key B    Key A
Key A:     Never   Never
AC Bits:   KeyA|B  Key B
Key B:     Never   Never

Unfortunately I'm not able reset the full access bits and fully empty the card.
As I understand with Key B I should be able to reset the AC Bits to "ff 07 80 69" and than be able to format it...

How can I fix this please?
Thank you,
dk


EDIT: when I try to format using "$ nfc-mfclassic f B u empty.nfc dump.mfd" I receive the following error

Writing 64 blocks |...xxxfailed to write trailer block 7
x........................................................|
Done, 59 of 64 blocks written.

Re: Cannot format card - Reset access bits?

After a lot of trial I was able to solve in the following way using an Android mobile and Mifare Classic Tool installed:

1. Write sector 1 block 3 with KeyA + ff 07 80 69 + KeyB
2. Write sector 1 block 3 with FFFFFFFFFFFF + ff 07 80 69 + FFFFFFFFFFFF
3. Write sector 1 block 0, 1, 2 with all 0s.

I still did not understand why nfc-mfclassic was failing.
Is there a way to write a single block acting directly on the access bits and not having it to go throuh all the blocks of a sector?

Thank you,
dk