add a9lh stage2 payload removal to the uninstall hax script #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code will check if the hash of NAND sector 0x5BFFF matches the hash of NAND sector 0x5C000, and fill 0x89C00 bytes starting at sector 0x5BFFF with the byte at the beginning of sector 0x5BFFF if the hash does not match. Under unmodified circumstances, both of these sectors will be filled with 0xFF or 0x00. Sector 0x5C000 is where the stage2 payload gets written when installing a9lh, with a maximum size of 0x89A00 bytes. If this payload is not removed when uninstalling CFW, then attempting to reinstall it later using any method which involves b9stool will cause a false positive a9lh warning to be given.
I also changed a couple minor things to be consistent between the uninstall code for new models and old models.