Emulator Check and Response
PreEmptive Protection™ DashO™ for Android & Java can inject checks into Android applications or libraries to detect if they are being run on an emulator. The Emulator Checks and Responses are configured on the Checks - Emulator screen or by adding code annotations.
Emulator Check
To detect if an application is being run on an emulator, place an EmulatorCheck on one or more methods in your application. DashO adds code that performs several runtime checks that determine if it is being run on an emulator. This Check can be configured as described in the Overview.
An application can contain multiple uses of EmulatorCheck
with various configurations.
Using more than one Check or mixing the Responses will hamper attackers.
private static boolean emulatorFlag;
@EmulatorCheck(action="@emulatorFlag")
public void onCreate(Bundle check){
}
@EmulatorCheck(response=ResponseType.Hang)
private int computeResult(){
}
Emulator Response
The EmulatorResponse annotation interacts with the EmulatorCheck. This Response can be configured as described in the Overview.
private static boolean emulatorFlag;
@EmulatorCheck(action="@emulatorFlag")
public void onCreate(Bundle state){
}
@EmulatorResponse(source="@emulatorFlag", response=ResponseType.Exit, probability=0.05f)
private int computeResult(){
}
@EmulatorResponse(source="@emulatorFlag", response=ResponseType.Error, probability=0.1f)
private FileInputStream readInput(){
}