PM3 RDV4 RRG module use resumed.

This commit is contained in:
dxl
2020-07-03 16:42:36 +08:00
parent ecf3651772
commit 901daa77fb
8 changed files with 190 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Cmake gen
.cxx/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/
# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
+51
View File
@@ -0,0 +1,51 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_static'
abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
}
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
externalNativeBuild {
cmake {
version '3.10.2'
path 'src/main/cpp/CMakeLists.txt'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.github.xianglin1998:nfctag:1.0'
implementation 'com.github.xianglin1998:nfc_console:1.0'
implementation 'com.github.xianglin1998:ComBridge:1.0.7'
// implementation project(path: ':iobridges')
implementation project(':communication')
implementation project(path: ':utils')
implementation 'androidx.appcompat:appcompat:1.1.0'
}
View File
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
+2
View File
@@ -0,0 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cn.rrg.pm3rdv4rrg" />
@@ -0,0 +1,31 @@
package cn.rrg.devices;
import com.iobridges.com.Communication;
import com.iobridges.com.DeviceChecker;
import java.io.IOException;
public class Proxmark3RRGRdv4 extends DeviceChecker {
static {
System.loadLibrary("pm3rrg_rdv4");
}
public Proxmark3RRGRdv4(Communication communication) {
super(communication);
}
@Override
public boolean checkDevice() throws IOException {
return testPm3();
}
@Override
public void close() throws IOException {
closePm3();
}
private native boolean testPm3() throws IOException;
private native void closePm3();
}
@@ -0,0 +1,20 @@
package cn.rrg.natives;
import cn.rrg.console.define.ICommandTools;
public class Proxmark3RRGRdv4Tools implements ICommandTools {
//加载so文件!
static {
System.loadLibrary("pm3rrg_rdv4");
}
@Override
public native int startExecute(String cmd);
@Override
public native boolean isExecuting();
@Override
public native void stopExecute();
}
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">pm3rdv4rrg</string>
</resources>