Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/apk-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: android-apk-debug

on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
build-debug:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build debug APK
run: ./gradlew :apprts:assembleDebug --no-daemon --stacktrace

- name: Upload debug APK artifact
uses: actions/upload-artifact@v4
with:
name: rfidtools-debug-apk
path: apprts/build/outputs/apk/debug/*.apk
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath('com.github.dcendents:android-maven-gradle-plugin:1.5')
}
}
Expand All @@ -16,4 +16,4 @@ allprojects {
google()
maven { url 'https://jitpack.io' }
}
}
}
9 changes: 7 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStoreType=JKS -Djdk.internal.platform.disableContainerSupport=true -XX:-UseContainerSupport
org.gradle.java.home=/root/.local/share/mise/installs/java/17.0.2
systemProp.http.proxyHost=proxy
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=proxy
systemProp.https.proxyPort=8080
org.gradle.parallel=true
org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
Empty file modified gradlew
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions libflasher/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.4.1)
add_definitions("-D__ANDROID_NDK__")

#添加预编译宏定义参数,此次的作用是开启配置文件的引入!
add_definitions(-DANDROID -D "getlocaledecpoint()='.'")
add_definitions(-DANDROID -Dgetlocaledecpoint='.')

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O3 -fvisibility=hidden -w")

Expand Down Expand Up @@ -40,4 +40,4 @@ target_include_directories(pm3_flasher PRIVATE
${PM3_ROOT}/client/uart)

#添加动态库链接!
target_link_libraries(pm3_flasher android log z)
target_link_libraries(pm3_flasher android log z)
4 changes: 3 additions & 1 deletion libflasher/src/main/cpp/client/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <tools.h>
#include "stdbool.h"

JavaVM *g_JavaVM = NULL;

//当前线程是否添加的标志位
static bool g_IsAttach;

Expand Down Expand Up @@ -102,4 +104,4 @@ void recovery_getopt_opt() {
opterr = 1;
optopt = 0;
optarg = NULL;
}
}
4 changes: 2 additions & 2 deletions libflasher/src/main/cpp/client/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__)

//全局的环境变量定义
JavaVM *g_JavaVM;
extern JavaVM *g_JavaVM;

//线程环境指针获取函数
JNIEnv *getJniEnv();
Expand All @@ -41,4 +41,4 @@ void free_command_line(CMD *);
//重置getopt函数
void recovery_getopt_opt();

#endif //DXL_TOOLS_H
#endif //DXL_TOOLS_H
4 changes: 2 additions & 2 deletions libflasher/src/main/cpp/client/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# define FILE_PATH_SIZE 1000
#endif

uint8_t g_debugMode;
uint8_t g_printAndLog;
extern uint8_t g_debugMode;
extern uint8_t g_printAndLog;
#define PRINTANDLOG_PRINT 1
#define PRINTANDLOG_LOG 2

Expand Down
4 changes: 3 additions & 1 deletion libmfkey/src/main/cpp/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <tools.h>
#include "stdbool.h"

JavaVM *g_JavaVM = NULL;

//当前线程是否添加的标志位
static bool g_IsAttach;

Expand Down Expand Up @@ -102,4 +104,4 @@ void recovery_getopt_opt() {
opterr = 1;
optopt = 0;
optarg = NULL;
}
}
4 changes: 2 additions & 2 deletions libmfkey/src/main/cpp/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__)

//全局的环境变量定义
JavaVM *g_JavaVM;
extern JavaVM *g_JavaVM;

//线程环境指针获取函数
JNIEnv *getJniEnv();
Expand All @@ -41,4 +41,4 @@ void free_command_line(CMD *);
//重置getopt函数
void recovery_getopt_opt();

#endif //DXL_TOOLS_H
#endif //DXL_TOOLS_H
4 changes: 2 additions & 2 deletions libnfc/src/main/cpp/libnfc/include/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__)

//全局的环境变量定义
JavaVM *g_JavaVM;
extern JavaVM *g_JavaVM;

//线程环境指针获取函数
JNIEnv *getJniEnv();
Expand All @@ -41,4 +41,4 @@ void free_command_line(CMD *);
//重置getopt函数
void recovery_getopt_opt();

#endif //DXL_TOOLS_H
#endif //DXL_TOOLS_H
4 changes: 3 additions & 1 deletion libnfc/src/main/cpp/libnfc/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <tools.h>
#include "stdbool.h"

JavaVM *g_JavaVM = NULL;

//当前线程是否添加的标志位
static bool g_IsAttach;

Expand Down Expand Up @@ -102,4 +104,4 @@ void recovery_getopt_opt() {
opterr = 1;
optopt = 0;
optarg = NULL;
}
}