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

The read failed because the sector is encrypted. #80

Open
rlaphoenix opened this issue Jan 12, 2022 · 0 comments
Open

The read failed because the sector is encrypted. #80

rlaphoenix opened this issue Jan 12, 2022 · 0 comments

Comments

@rlaphoenix
Copy link
Contributor

I've discovered a bit of a problem with accessing Raw windows devices. A read in a Copy-protected sector may result in a pywintypes exception stating Copy Protection Error - The read failed because the sector is encrypted. while trying to read general data, possibly data used as headers or anchors and such, the data for general structure parsing.

For me, this error occurred on a CSS-protected DVD9 when reading 2048 bytes from offset 0x8157108224 (Sector 3,982,963/3,983,220), which is basically at the end of the disc. This isn't a problem specific to any of the code within pycdlib, as all programs or methods to try to read from that sector results in the same problem.

However, I believe this error would still have happened before the addition of the Windows Raw Device handler, so at least there's that.

As for a possible fix, it seems to be related to some kind of operation needing to be done specifically relating to DVD CSS protection. After a quick google, it seems you essentially need to "unlock the drive". It seems it then re-locks itself after a short while unless you tell it to unlock again before it locks.

I know of a few programs that can in fact unlock the drive for you. PowerDVD (lasts only a very short while unless you are actively playing content from it that reads within those sectors), and AnyDVD HD which will seemingly keep it open for a lot longer.

The problem is both software is closed source so we cannot see how it's doing it.

This could very well be boiled down to an issue not directly related to pycdlib, nor something pycdlib necessarily needs to look into, but I thought I would mention it in case anyone else is confused about this error.

I will keep you updated with any new information I get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant