Skip to content

Security Utils is a lightweight Android library that provides easy and efficient methods to determine whether the device is rooted, an emulator, using a proxy, or is debuggable.

License

Notifications You must be signed in to change notification settings

broscr/security-utils

Repository files navigation

Security Utils


What is Security Utils?

Security Utils is a lightweight Android library that provides easy and efficient methods to determine whether the device is rooted, an emulator, using a proxy, or is debuggable. This library is useful for developers who want to improve the security and performance of their applications by preventing them from running on rooted devices, emulators, devices using a proxy, or debuggable devices.

Features

Security Utils provides the following features:

  • Root Detection: This feature allows you to detect whether the device is rooted or not. If the device is rooted, your application can take appropriate actions to enhance security.

  • Emulator Detection: This feature allows you to detect whether the application is running on an emulator or not. If the application is running on an emulator, it can take appropriate actions to prevent malicious activities.

  • Proxy Detection: This feature allows you to detect whether the device is using a proxy or not. If the device is using a proxy, your application can take appropriate actions to prevent unauthorized access.

  • Debuggable Detection: This feature allows you to detect whether the application is debuggable or not. If the application is debuggable, it can take appropriate actions to prevent malicious activities.

  • ADB(Android Debug Bridge) Detection: This feature checks whether ADB is enabled on the device. ADB allows developers to communicate with their Android devices for debugging and other purposes. Enabling ADB on a device that isn't in your control can pose security risks, hence this detection.

  • Developer Options Detection: This feature detects whether Developer Options are enabled on the device. Developer Options provide settings for debugging and application development, and having them enabled on a device that is not meant for development can pose security risks.

  • Screen Capture Detection: This feature checks whether screen capture is enabled on the device. Disabling screen capture can prevent sensitive information from being captured and potentially misused.

Why should I use this library?

There are several reasons why you might consider using Security Utils:

  • Ease of use: Security Utils provides easy and lightweight methods to determine device status, making it easy to integrate into your application.

  • Security: Rooted devices, emulators, devices using a proxy, or debuggable devices can pose a potential security risk for applications. Security Utils enhances security by preventing applications from running on such devices.

  • Compatibility: Security Utils is compatible with various Android versions and devices, ensuring that your application works across different devices and versions. -- Android 5.0 (API level 21) and above. -- Java 8 and above.

  • Performance: Security Utils can improve the performance of your application. For example, if your application does not work on a rooted device or a device using a proxy, it prevents unnecessary code from executing, thus improving performance.

How to Install?

You can easily install Security Utils by adding the following dependency to your settings.gradle file:

// dependencyResolutionManagement {
//   repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
//   repositories {
//     mavenCentral()
    maven { url 'https://jitpack.io' }
//   }
// }

You can easily install Security Utils by adding the following dependency to your app-level build.gradle file:

implementation 'com.github.broscr:security-utils:Tag'

How to usage ?

Using Security Utils in your application is simple. You can call the following methods to determine device status:

// If the device is rooted, it returns true. 
SecurityUtils.isRooted()

// If the device is an emulator, it returns true. 
SecurityUtils.isEmulator()

// If the device using proxy, it returns true.
SecurityUtils.isUsingProxy()

// If the application is debuggable, it returns true.
SecurityUtils.isDebuggable(this)

// If the ADB enabled, it returns true.
SecurityUtils.isADBEnabled(this)

// If the developer options is enabled, it returns true.
SecurityUtils.isDeveloperOptionsEnabled(this)

// If the screen capture enabled, it returns true.
SecurityUtils.isScreenCaptureEnabled(this)

LICENSE

SecurityUtils is released under the MIT License. This means that you can use, modify, and distribute the library as long as you comply with the terms of the license.

Issues and Contributions

If you encounter any issues while using Security Utils, please report them on the GitHub issues page. We welcome feedback, bug reports, and feature requests to make this library better. If you want to contribute to the project, please feel free to submit pull requests on GitHub. We appreciate your help in making Security Utils better.

About

Security Utils is a lightweight Android library that provides easy and efficient methods to determine whether the device is rooted, an emulator, using a proxy, or is debuggable.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages