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

Incorrect data length when stripping OOB #2

Open
swappart opened this issue Aug 12, 2024 · 1 comment
Open

Incorrect data length when stripping OOB #2

swappart opened this issue Aug 12, 2024 · 1 comment

Comments

@swappart
Copy link

Not sure what's happening here, but if I strip the OOB, I get an incorrect data length. Is this a bug, or am I doing something wrong?

python3 ubift.py fls ../OriginalNand.bin -o 0 --pagesize 4096 --blocksize 524288 --oob 224 -n data --verbose
INFO ubift.framework.mtd: [!] Stripping OOB with size 224 from every page.
ERROR ubift.framework.mtd: [-] Invalid block_size (data_len: 4392578240 not divisible by block_size 524288)
INFO ubift.framework.mtd: [!] Initialized Image (block_size:524288, page_size:4096, oob_size:224, data_len:4392578240)

If I don't strip the OOB, I get the correct data length, but it doesn't find the UBI because of the OOB.
python3 ubift.py fls ../OriginalNand.bin -o 0 --pagesize 4096 --blocksize 524288 --oob 0 -n data --verbose
INFO ubift.framework.mtd: [!] Initialized Image (block_size:524288, page_size:4096, oob_size:-1, data_len:2264924160)

@matthias-deu
Copy link
Owner

Hello swappart,

sorry for the late answer. It's very hard to answer your question without having access to the nand dump you are referring to. It could be some random bit flips or errors in your dump. Under normal circumstances such errors should not occur, but in my experience every dump has its own little problems :) What you can try if nothing works out for you is using the --scan parameter, which ignores all structure of UBIFS and just tries to find as much data as possible

If you want i could take a closer look at it, let me know

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

2 participants