Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed card save from slot #403

Merged
merged 5 commits into from
Dec 23, 2023

Conversation

VarChar42
Copy link
Contributor

According to https://github.com/RfidResearchGroup/ChameleonUltra/blob/main/docs/protocol.md the command MF1_READ_EMU_BLOCK_DATA accepts 2 arguments: block_start and block_count

@VarChar42
Copy link
Contributor Author

VarChar42 commented Dec 22, 2023

Also I noticed, the function mfClassicGetBlockCount has a parameter isEV1 which is currently not set.
So only 64 blocks get read from a 1K EV1 card with 72 blocks.

@VarChar42 VarChar42 marked this pull request as draft December 22, 2023 14:37
@VarChar42 VarChar42 force-pushed the fix-rebuildCardSaveFromSlot branch from c6a50e1 to 207395a Compare December 22, 2023 14:41
@VarChar42
Copy link
Contributor Author

image
the export from the "Read Card" page seem also broke. There each sector only contains 16 bytes.

@Foxushka
Copy link
Collaborator

So only 64 blocks get read from a 1K EV1 card with 72 blocks.

When you load 1k EV1 save into Chameleon, it becomes Mifare Classic 2k, as firmware doesn't support signatures with 1k

@Foxushka
Copy link
Collaborator

I've pushed fix to write-card branch with commit (cc7e2a2). As your fix will lose speed that is critical on mobile. Can you retest it on write-card branch?

@Foxushka Foxushka closed this Dec 23, 2023
@VarChar42
Copy link
Contributor Author

I've pushed fix to write-card branch with commit (cc7e2a2). As your fix will lose speed that is critical on mobile. Can you retest it on write-card branch?

Your implementation still has the same problem.
Can you please reopen this PR I will look into speeding it up.

@GameTec-live GameTec-live reopened this Dec 23, 2023
@Foxushka
Copy link
Collaborator

Are you sure there is issue on last changes in write-card branch?

@Foxushka
Copy link
Collaborator

Some fixes are in next commit, so only this commit won't work

@VarChar42
Copy link
Contributor Author

Some fixes are in next commit, so only this commit won't work

yeah including the fixes in the next commit it works.

@VarChar42
Copy link
Contributor Author

my version now checks for block counts not power of 32 .. for example mifare mini with 20 blocks

@VarChar42
Copy link
Contributor Author

Why do you want to copy these changes into your PR? The PR should only contain changes regarding its scope... (my opinion)

@Foxushka
Copy link
Collaborator

Forgot about Mifare Mini actually

@Foxushka
Copy link
Collaborator

Can you move down count of blocks back to 16, not 32?

@VarChar42
Copy link
Contributor Author

Can you move down count of blocks back to 16, not 32?

sure. any specific reason for this?

@Foxushka
Copy link
Collaborator

I don't remember, but I had problems with that, probably unstable via BLE

@Foxushka Foxushka marked this pull request as ready for review December 23, 2023 22:27
@Foxushka Foxushka linked an issue Dec 23, 2023 that may be closed by this pull request
3 tasks
@Foxushka Foxushka merged commit 2adbe7e into GameTec-live:main Dec 23, 2023
8 checks passed
@Foxushka
Copy link
Collaborator

Thank you for fixing this

@VarChar42 VarChar42 deleted the fix-rebuildCardSaveFromSlot branch December 24, 2023 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cards downloaded from chameleon not saved correctly
3 participants