Skip to content

Commit

Permalink
Merge pull request #11 from jahirfiquitiva/master
Browse files Browse the repository at this point in the history
Libraries updates and minor code changes
  • Loading branch information
javiersantos committed Jan 25, 2017
2 parents d908b93 + 6066d2f commit a5ed996
Show file tree
Hide file tree
Showing 47 changed files with 1,317 additions and 1,641 deletions.
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
### Android ###
# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
# Files for the ART/Dalvik VM
*.dex

# Java class files
Expand All @@ -12,11 +10,11 @@
# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/
/*/build/

# Local configuration file (sdk path, etc)
local.properties
Expand All @@ -27,10 +25,17 @@ proguard/
# Log Files
*.log

### Android Patch ###
gen-external-apklibs
# Android Studio Navigation editor temp files
.navigation/

## Directory-based project format:
# Android Studio captures folder
captures/

# Directory-based project format
.idea/
*.db

# Intellij
*.iml

# Keystore files
*.jks
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
language: android
jdk: oraclejdk7
jdk: oraclejdk8

android:
components:
- build-tools-23.0.2
- android-23
- build-tools-25.0.2
- android-25
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
licenses:
- '.+'


before_install:
- chmod +x gradlew

before_script:
- echo yes | android update sdk --no-ui --all --filter platform-tools,tools
- echo yes | android update sdk --no-ui --all --filter build-tools-23.0.2
- echo yes | android update sdk --no-ui --all --filter android-23
- echo yes | android update sdk --no-ui --all --filter build-tools-25.0.2
- echo yes | android update sdk --no-ui --all --filter android-25

script:
- ./gradlew clean test
19 changes: 0 additions & 19 deletions PiracyChecker.iml

This file was deleted.

21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p align="center">An Android library that prevents your app from being pirated / cracked using Google Play Licensing (LVL), APK signature protection and more.</p>

## Disclaimer
This library applies some techniques to help protect your app's users and attempt to thwart reverse engineers and attackers. BUT, this isn't guaranteed stop your app from getting pirated. There is no such thing as 100% security, and a determined and skilled attacker with enougth time could remove these checks from the code. The real objective here is to raise the bar out of reach of opportunist and automatic attackers.
This library applies some techniques to help protect your app's users and attempt to thwart reverse engineers and attackers. BUT, this isn't guaranteed to stop your app from getting pirated. There is no such thing as 100% security, and a determined and skilled attacker with enough time, could remove these checks from the code. The real objective here is to raise the bar out of reach of opportunist and automatic attackers.

Some of the techniques included in this library can be found [here](https://www.airpair.com/android/posts/adding-tampering-detection-to-your-android-app).

Expand All @@ -36,6 +36,11 @@ dependencies {
```

## Usage
Add **CHECK_LICENSE** permission to your app's Manifest:
```xml
<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
```

### Verify Google Play Licensing (LVL)
Google Play offers a licensing service that lets you enforce licensing policies for applications that you publish on Google Play. With Google Play Licensing, your application can query Google Play to obtain the licensing status for the current user.

Expand Down Expand Up @@ -94,14 +99,20 @@ Use the builder and add following:
@Override
public void allow() {
// Do something when the user is allowed to use the app

}

@Override
public void dontAllow() {
// Do something when the user is not allowed to use the app

public void dontAllow(PiracyCheckerError error) {
// You can either do something specific when the user is not allowed to use the app
// Or manage the error, using the 'error' parameter, yourself (Check errors at {@link PiracyCheckerError}).
}

@Override
public void onError(PiracyCheckerError error) {
// This method is not required to be implemented/overriden but...
// You can either do something specific when an error occurs while checking the license,
// Or manage the error, using the 'error' parameter, yourself (Check errors at {@link PiracyCheckerError}).
}
```

## ProGuard
Expand Down
134 changes: 0 additions & 134 deletions app/app.iml

This file was deleted.

19 changes: 9 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileSdkVersion 25
buildToolsVersion "25.0.2"

defaultConfig {
applicationId "com.github.javiersantos.piracychecker.demo"
minSdkVersion 11
targetSdkVersion 23
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -21,10 +21,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.mikepenz:iconics-core:2.5.11@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
compile('com.mikepenz:aboutlibraries:5.6.6@aar') { transitive = true }
compile 'com.android.support:design:25.1.0'
compile 'com.mikepenz:iconics-core:2.8.2@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.2@aar'
compile('com.mikepenz:aboutlibraries:5.9.1@aar') { transitive = true }
compile project(':library')
}
}
33 changes: 19 additions & 14 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.javiersantos.piracychecker.demo">
xmlns:tools="http://schemas.android.com/tools"
package="com.github.javiersantos.piracychecker.demo">

<uses-permission android:name="com.android.vending.CHECK_LICENSE"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<activity
android:name=".AboutActivity"
android:label="@string/action_about" />
</application>
android:name=".AboutActivity"
android:label="@string/action_about"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

}
}
Loading

0 comments on commit a5ed996

Please sign in to comment.