View Single Post
Old 03-25-2013, 03:43 AM   #118
Awak
Wuxia Novels Fan
Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.Awak can program the VCR without an owner's manual.
 
Posts: 64
Karma: 173552
Join Date: Feb 2013
Location: Earth
Device: Kindle PW
Quote:
Originally Posted by vanhoavn View Post
Yes, the answers for 2nd,3rd and 4th question is in ixtab's link
And for 1st, they're *.vh files.
They are *.vh files inside the source code project only, but we just copy the ".azw2" file to the kindle - So it must has all the necessary data (all the chess puzzles and all the SecureStorage contents) inside this ".azw2" file.

My guess is when you run this ".azw2" file the VERY first time on the kindle, it will auto-create the file in "/mnt/us/developer/<AZW2 Title>/metadata/.secure_store" by itself.

I suspect the ALL Chess Puzzles will also store somewhere (not in the RAM, but the /mnt/us directory) as part of initialization when you run the ".azw2" file.

The troubled routine:

Quote:
private boolean localIsSolved(int name, int id)
{
char l[] = context.getSecureStorage().getChars("pos:".concat( itemName[name].concat(String.valueOf(id))));

return l != null && l.length == 4 && l[0] == solved[0] && l[1] == solved[1] && l[2] == solved[2] && l[3] == solved[3]; }
has a "secret" key of

char solved[] = { 'v', 'h', 's', 'v' };

to compare with.

I suspect this secure store has been corrupted and the application (Chess Program) should able to generate it again somehow (I don't know how yet...).

From the link given by ixtab:

Quote:
In the remote case that corruption happens outside of the application's life cycle the store will simply respond as if it is empty. (This can also happen if the device is restored to factory settings.) For most use cases, the application should be built to deal gracefully with this.
================================================== ======

I presume the *.vh files have their own format or encrypted and you just cannot edit or add another one without a special software tool to do it, right?


WOW! I have learnt a lot of things here - Thanks a lot Guy!
Awak is offline   Reply With Quote