@notaz
it seems the information that the first
word of the a string table is the length of the string is wrong. on all apks i've tried and debugged, the first
byte points to the length of the string. and the second byte is just length+1. could you please cross-check?
here are the changes for this issue:
https://github.com/crowriot/apkenv/commit/44f5fdd26c3c963ceddf0924561be276ae4a2974
thanks!
Hmm I think both your and my code is wrong. Resource strings can by of 2 types: utf16 and utf8. In utf16 case first 2 bytes are length and my code was correct, but for utf8 first byte is length and second is size in memory, as utf8 can have multibyte unicode characters in it. So you need an 'if' with separate size handling for both types of strings. There is also extension mechanism when the string length doesn't fit in those bytes, then additional ones are used.
Also I don't think app_name_index change was necessary, as on realloc only location of the array of string pointers changes, but not the string pointers themselves, so it should b fine..
Want me to fix that up or will you do it? If you do it you'll probably need to squash those "noise" commits (git rebase -i) before sending to thp.