Test mode works
How to get the test mode to work.
This took some working out to get the required components in the right place but here goes.
Create the directory Sony Reader/software
Create the file autorun.xml (No cap A the manual is wrong)
In the autorun.xml put the following
"<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://www.kinoma.com/fskin/1">
<code>
<function id="modelChanged">
//this.trace("[autorun] modelChanged enter\n");
arguments.callee.grammar.call(this);
var state = this.getVariable("STATE");
var target;
//this.trace("[autorun] state="+state+"\n");
if (this.state != state) {
this.focus(true)
this.AUTORUN_GROUP.show(false)
switch(state) {
case "AUTORUN":
this.AUTORUN_GROUP.show(true);
target = this.AUTORUN_GROUP.AUTORUN
break;
}
this.state = state;
if (target.isEnabled())
target.focus(true)
}
//this.trace("[autorun] modelChanged exit\n");
</function>
</code>
<clock/>
<group id="AUTORUN_GROUP" left="0" right="0" top="0" bottom="0" visible="false">
<group id="AUTORUN" width="480" height="440">
<code>
<function id="doDigit" params="part"><![CDATA[
var keyCode = part.key.charCodeAt(0);
if (keyCode == 53) /* 5 */
{
try {
var stream = new Stream.File("b:/screen.jpg", 1);
this.getWindow().getBitmap().writeJPEG(stream);
stream.close();
this.MSGTEXT.setValue("Done\npress MENU to exit");
}
catch(e)
{
}
}
else
this.getModel().doDigit(part);
]]></function>
<function id="doMenu">
kbook.autoRunRoot.exitIf(kbook.model);
</function>
</code>
<sprite skin="diskSprite" id="DANGER" width="140" top="0" height="140" u="-2" active="false" canFocus="true"/>
<text active="false" id="MSGTEXT" left="0" right="0" top="140" height="300" value=""/>
</group>
</group>
</document>"
Hold the Home and Vol + keys and insert the card and hey presto you have the diag menu.
Hope someone finds this of help, I think it should be easy to execute arbitary code let me know how it goes.
Regards Auger
|