Discussion:
[Bitpim-devel] Image index fix... I think I have it...
Mike
2003-03-12 01:51:10 UTC
Permalink
Hello all,

I just wanted to drop in and see if I could offer some help with this
image index problem your having... I've only started with bitpim today,
happily modifying my vx4400, and tried to delete an image off the
phone. After looking into it a bit more, I've come to a solution for
the index to get back in sync...

In the map file (brewImageIndex.map) the files are layed out like so:

03 00 03 00 xx xx xx xx xx xx xx .... 00 02 00 xx xx xx ... 00 01 00 xx
xx xx xx

The first byte being the number of images stored, the third byte
starting the index... what I found was that all of the image files that
I had a number in front of them... such as 03, 02, 01 for the three
images that I had... the problem is that it is supposed to count from
0, not 1, so I was missing a 00 index... I changed the 03 in byte 3 to
be 00 and all my indexes on the phone worked fine (even though they're
not in line with any file order that I can think of)... the images now
match up with the names and they stay that way...

I hope this helps your dilemma, if there's any questions just hollar.

Mike
Mike
2003-03-12 02:03:56 UTC
Permalink
Whoops, found the archives and noticed I was way behind the curve... :)

Sorry about that.

Mike
Post by Mike
Hello all,
I just wanted to drop in and see if I could offer some help with this
image index problem your having... I've only started with bitpim
today, happily modifying my vx4400, and tried to delete an image off
the phone. After looking into it a bit more, I've come to a solution
for the index to get back in sync...
03 00 03 00 xx xx xx xx xx xx xx .... 00 02 00 xx xx xx ... 00 01 00
xx xx xx xx
The first byte being the number of images stored, the third byte
starting the index... what I found was that all of the image files
that I had a number in front of them... such as 03, 02, 01 for the
three images that I had... the problem is that it is supposed to count
from 0, not 1, so I was missing a 00 index... I changed the 03 in byte
3 to be 00 and all my indexes on the phone worked fine (even though
they're not in line with any file order that I can think of)... the
images now match up with the names and they stay that way...
I hope this helps your dilemma, if there's any questions just hollar.
Mike
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get
cracking and register here for some mind boggling fun and the chance
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
http://www.parrotlaw.us -- The Professional Law Student's forums
Roger Binns
2003-03-12 03:44:06 UTC
Permalink
Post by Mike
03 00 03 00 xx xx xx xx xx xx xx .... 00 02 00 xx xx xx ... 00 01 00 xx
xx xx xx
The integer fields are two bytes in lsb order.

The first field is the total number of entries.

Each entry is a serial number and then the filename in a fixed length
field.

There is space for 30 entries in the mapfile. Unused entries
have a serial of 0xffff (or -1 if you prefer) with the name blanked
out.

When you delete an entry from the phone, it deletes the file on
the filesystem, and marks the entry with the 0xffff serial. It
also decrements the count (first field of file). This means that
you can have "holes" in the index.

Just like you, I initially thought that ordering would make a
difference ....

Roger

Loading...