BillingProtector is a robust and tiny Kotlin library, aiming to check the end-user device state & to secure purchases. Its main purpose is to block a transition process if the application has been modified or patched, if the device environment is corrupted or if other suspicious condition is detected; it can also be used to prevent applications from being executed on an unprotected/insecure operative system, like Snapchat does for rooted devices.
Hacking android applications is way easier than how it is thought to be. Softwares like Lucky Patcher are phenomenally written to bypass all your first-line defenses and to edit your app executable code, redirecting your purchases to the pirate app and not to the Google Play Store. That's a violation of the Developer's product and business, since it won't just make you lose money but also users and credibility. I've been implmenting by myself on every app of mine a complex and different security scheme each time. Then I decided to put everything together and to realize this project of crucial importance for someone's business, in parallel with CryptoPrefs. Remember that a skilled hacker will always find a way to crack your code. This library is a barrier that will stop the 99% of the other kiddies.
BillingProtector uses jitpack as packages repository. To use it you need to add the repository to your project build.gradle file:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
And the dependency to your module build.gradle file:
dependencies {
implementation 'com.github.AndreaCioccarelli:BillingProtector:1.0.0'
}
BillingProtector has different functionalities and can be used for different purposes.
- Check for pirate applications on the end-user device
- List the found threads on the end-user device
- Determine if the device has root access without requesting it
- Determine root binary path in the operative system
Create an instance of the BillingProtector class passing as argument the context of your current application/activity
val bp = BillingProtector(context)
if (bp.isRootInstalled()) {
finish();
}
if (bp.arePirateAppsInstalled()) {
for (app in bp.getPirateAppsList()) {
toast(app.packageName)
}
finish()
}
toast(bp.getRootBinatyPath())