mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 23:36:31 +08:00
Merge pull request #1159 from ca1e/master
android target client compability
This commit is contained in:
commit
6eca721c4b
|
@ -126,9 +126,11 @@ add_library(pm3rrg_rdv4 SHARED
|
|||
${PM3_ROOT}/client/src/cmdlfawid.c
|
||||
${PM3_ROOT}/client/src/cmdlfcotag.c
|
||||
${PM3_ROOT}/client/src/cmdlfdestron.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x.c
|
||||
${PM3_ROOT}/client/src/cmdlfem.c
|
||||
${PM3_ROOT}/client/src/cmdlfem410x.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x05.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x50.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x70.c
|
||||
${PM3_ROOT}/client/src/cmdlffdxb.c
|
||||
${PM3_ROOT}/client/src/cmdlfgallagher.c
|
||||
${PM3_ROOT}/client/src/cmdlfguard.c
|
||||
|
|
|
@ -74,13 +74,13 @@ static bool OpenPm3(void) {
|
|||
jint Console(JNIEnv *env, jobject instance, jstring cmd_) {
|
||||
|
||||
if (!conn.run) {
|
||||
if (OpenPm3() && TestProxmark() == PM3_SUCCESS) {
|
||||
if (OpenPm3() && TestProxmark(session.current_device) == PM3_SUCCESS) {
|
||||
LOGD("Connected to device");
|
||||
PrintAndLogEx(SUCCESS, "Connected to device");
|
||||
} else {
|
||||
LOGD("Failed to connect to device");
|
||||
PrintAndLogEx(ERR, "Failed to connect to device");
|
||||
CloseProxmark();
|
||||
CloseProxmark(session.current_device);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,10 +110,10 @@ jboolean IsClientRunning(JNIEnv *env, jobject instance) {
|
|||
* */
|
||||
jboolean TestPm3(JNIEnv *env, jobject instance) {
|
||||
if (open() == false) {
|
||||
CloseProxmark();
|
||||
CloseProxmark(session.current_device);
|
||||
return false;
|
||||
}
|
||||
bool ret = (TestProxmark() == PM3_SUCCESS);
|
||||
bool ret = (TestProxmark(session.current_device) == PM3_SUCCESS);
|
||||
return (jboolean)(ret);
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ jboolean TestPm3(JNIEnv *env, jobject instance) {
|
|||
* stop pm3 client
|
||||
* */
|
||||
void ClosePm3(JNIEnv *env, jobject instance) {
|
||||
CloseProxmark();
|
||||
CloseProxmark(session.current_device);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue