OS Check

This check is intended to block specific devices from being used. An example use case is one where you are aware that there is a key vulnerability on the device that would compromise your application - for example, a vulnerability that would allow an attacker to obtain root access to the device and read a user's private information. You can prevent running on the device if you are able to specify the combination of device features that identifies a vulnerable device.

You can also use this check to look for emulators - which can make reverse engineering by hackers harder by preventing them from being able to run the application in 'lab' conditions.

There are the following options for configuration:

osVersionCheck(minOSVersion: Int)
notManufacturerCheck(manufacturerName: String)
bannedModelCheck(bannedModel: String)
bannedBoardCheck(bannedBoard: String)
bannedCpusCheck(cpuAbi: String)
bannedBootloaderCheck(bannedBootloader: String)
bannedDeviceCheck(device: String)
bannedHardwareCheck(hardware: String)
bannedHostCheck(host: String)

Example usage:

safeToRun(
    {
        safeToRunCombinedCheck(
        listOf(
            { bannedHardwareCheck("hardware") },
            { bannedBoardCheck("board") }
        )
      )
    }
)

Last updated