amazfitbip / tools

GNU General Public License v2.0
126 stars 57 forks source link

Memory Error with latest resource file #62

Open ghost opened 5 years ago

ghost commented 5 years ago

Using the latest firware, v1.1.5.56, the resource file contains possibly too many resources? I'm not very familiar with python so maybe I'm missing something.

After making a change to allow the newer header NERES mentioned in #52, I get the following output when trying to run res2img.py -d -u -i chaohu_v69.res:

file is a Haumi resource file
version 69
number of resources: 4294967295
Traceback (most recent call last):
  File "./tools/res2img.py", line 387, in <module>
    extract_list = range(max_rsrc)
MemoryError

Python version is 2.7.15+ and linux 64bit.

Any ideas?

ghost commented 5 years ago

I'm guessing there isn't enough memory for this much larger number of resources and we might need to break up the list into chunks.

Or perhaps I need to do more than just check for both header strings as in #60.