Project CASUAL
API for CASUAL
 All Classes Namespaces Functions Variables
Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CASUAL.CASUALTools Class Reference

Static Public Member Functions

static void rewriteMD5OnCASPAC (CASUALSessionData sd, File CASPAC)
 
static void sleepForOneSecond ()
 
static void sleepForOneTenthOfASecond ()
 
static void setGUIAPI () throws ClassNotFoundException, InstantiationException, IllegalAccessException
 
static void setiCASUALGUI (Class<?> cls) throws InstantiationException, IllegalAccessException
 
static boolean uidMatches (String[] expectedUIDs)
 
static String rootAccessCommand ()
 
static boolean rootAccessPossible ()
 
static int getBuildNumber ()
 
static String getBuildNumberString ()
 

Public Attributes

Runnable GUI
 

Static Public Attributes

final static boolean IDEMode = new CASUALTools().getIDEMode()
 
static Thread zipPrep
 
static Runnable updateMD5s
 

Detailed Description

Provides a set of tools used in CASUAL

Author
Adam Outler adamo.nosp@m.utle.nosp@m.r@gma.nosp@m.il.c.nosp@m.om

Member Function Documentation

static void CASUAL.CASUALTools.rewriteMD5OnCASPAC ( CASUALSessionData  sd,
File  CASPAC 
)
static

rewrites MD5s in the provided CASPAC. note: This is only used in IDE mode for development

Parameters
sdSessionData for this run
CASPACfile to be checked and have MD5s rewritten.
static String CASUAL.CASUALTools.rootAccessCommand ( )
static

Checks the device to get the command required for root access. This accounts for both adb root and rooted devices.

Returns
command used to get root, will be blank if unrooted.
static void CASUAL.CASUALTools.setGUIAPI ( ) throws ClassNotFoundException, InstantiationException, IllegalAccessException
static

sets the GUI API based on property in CASUAL/resources/CASUALApp. The GUI API can be specified by modification of Application.GUI. The API only requires that you specify a class which implements the iCASUALUI class.

Exceptions
java.lang.ClassNotFoundExceptionwhen UI cannot be found
java.lang.InstantiationExceptionwhen UI cannot be instantiated
java.lang.IllegalAccessExceptionwhen SecurityManager gets in the way
static void CASUAL.CASUALTools.sleepForOneSecond ( )
static

sleeps for 1000ms.

static void CASUAL.CASUALTools.sleepForOneTenthOfASecond ( )
static

sleeps for 100ms.

static boolean CASUAL.CASUALTools.uidMatches ( String[]  expectedUIDs)
static

compares User ID from id -u on the device to the specified User ID.

Parameters
expectedUIDsUser ID specified.
Returns
True if actua UID matches expected

Member Data Documentation

Runnable CASUAL.CASUALTools.GUI
Initial value:
= new Runnable() {
@Override
public void run() {
try {
CASUALSessionData.getGUI().setVisible(true);
} catch (ClassNotFoundException ex) {
Logger.getLogger(CASUALTools.class.getName()).log(Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
Logger.getLogger(CASUALTools.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(CASUALTools.class.getName()).log(Level.SEVERE, null, ex);
}
}
}

Starts the GUI, should be done last and only if needed.

final static boolean CASUAL.CASUALTools.IDEMode = new CASUALTools().getIDEMode()
static

true if this is running on the flat filesystem. False if in a jar.

Runnable CASUAL.CASUALTools.updateMD5s
static
Initial value:
= new Runnable() {
@Override
public void run() {
new CASUALTools().md5sumTestScripts();
}
}

provides a runnable object for updating MD5s

Thread CASUAL.CASUALTools.zipPrep
static

thread used for preparing zip file. this should never be interrupted.


The documentation for this class was generated from the following file: