|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectPatches.FwPatch
| Field Summary | |
|---|---|
java.lang.String |
author
Your nick. |
java.lang.String |
author_email
Your email. |
boolean |
debugMode
Set this to true to enable debug mode. |
java.lang.String |
description
Patch description shown in window when user clicks on your patch. |
java.lang.String |
group
Patch group on tree, if group not exists on tree it will be automatic added to tree. |
boolean |
hidden
Used only for special patches, your patch should be always not hidden. |
java.lang.String |
name
Patch name show on tree. |
java.util.Collection |
testedFirmwares
Tested firmwares. |
java.lang.String |
version
Patch version. |
java.lang.String |
website
Your website, or link to topic about this patch on forum. |
| Constructor Summary | |
|---|---|
FwPatch()
|
|
| Method Summary | |
|---|---|
void |
addToLog(java.lang.String text)
Adds text to log, and updates main window with your text. |
static int |
arrayToInt(byte[] value)
Convert array of 4 bytes to integer value. |
static int |
arrayToInt(byte[] value,
int address)
Convert array to integer value, getting 4 bytes from position specified by address. |
static java.lang.String |
arrayToStr(byte[] array)
Converts byte array to hexadecimal string. |
static java.lang.String |
arrayToStr(byte[] array,
int startPos,
int length)
Converts part of byte array to hexadecimal string. |
static byte[] |
calcThumbBranchWithLink(int jumpAddress,
int destAddress)
Calculates OPCODE for branch with link (BL dest) in Thumb code. |
static int |
calcThumbLDRAdress(byte[] code,
int OPCODE_Adress_in_code)
Returns address what reads LDR instruction. |
void |
clearLog()
Log of all patches are cleared on opening firmware automaticly. |
static void |
codeReplaceJump(byte[] code,
byte[] jumpId,
byte[] jumpDest)
Replaces JMP instructions in code what will be injected to firmware. |
java.lang.String |
getLog()
|
static byte[] |
intToArray(int value)
Converts integer value to 4 bytes array. |
void |
patch(Firmware soft)
Main method of your patch. |
static byte[] |
strToArray(java.lang.String data)
Converts hexadecimal string to byte array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String author
public java.lang.String author_email
public boolean debugMode
public java.lang.String description
public java.lang.String group
public boolean hidden
public java.lang.String name
public java.util.Collection testedFirmwares
public java.lang.String version
public java.lang.String website
| Constructor Detail |
|---|
public FwPatch()
| Method Detail |
|---|
public void addToLog(java.lang.String text)
text - Text what you will show on main window.public static int arrayToInt(byte[] value)
value - Array of 4 bytes.
public static int arrayToInt(byte[] value,
int address)
value - Array of n bytes.address - Adress on array where are bytes to convert.
public static java.lang.String arrayToStr(byte[] array)
array - Byte array.
public static java.lang.String arrayToStr(byte[] array,
int startPos,
int length)
array - Byte array.startPos - Start position.length - How many bytes will be converted.
public static byte[] calcThumbBranchWithLink(int jumpAddress,
int destAddress)
jumpAddress - Address in code where this OPCODE will be placed.destAddress - Destination address.
public static int calcThumbLDRAdress(byte[] code,
int OPCODE_Adress_in_code)
code - Code where is LDR OPCODE.OPCODE_Adress_in_code - Address to OPCODE.
public void clearLog()
public static void codeReplaceJump(byte[] code,
byte[] jumpId,
byte[] jumpDest)
code - Code what you want inject to firmware.jumpId - Jump ID (abstract adress given to procedure when you compiling your code).jumpDest - Destination (real address to procedure what you found on code).public java.lang.String getLog()
public static byte[] intToArray(int value)
value - Integer value to be converted.
public void patch(Firmware soft)
soft - Open firmware reference.public static byte[] strToArray(java.lang.String data)
data - Hexadecimal string.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||