mirror of
https://github.com/RfidResearchGroup/RFIDtools.git
synced 2026-05-12 11:19:59 -07:00
Connection bug and "no response" bug fixed.
This commit is contained in:
@@ -56,9 +56,10 @@ dependencies {
|
||||
implementation 'com.github.xianglin1998:IORedirector:1.0'
|
||||
implementation 'com.github.xianglin1998:Crapto1:1.3'
|
||||
implementation 'com.github.xianglin1998:nfctag:1.0'
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.1'
|
||||
implementation 'com.github.xianglin1998:nfc_console:1.0'
|
||||
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.3'
|
||||
|
||||
implementation project(':utils')
|
||||
implementation project(':libnfc_pn53x')
|
||||
implementation project(':chameleon')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.rrg.rdv.activities.main;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.app.AlertDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.iobridges.com.LocalComBridgeAdapter;
|
||||
import cn.dxl.common.util.DisplayUtil;
|
||||
import cn.dxl.common.util.FragmentUtil;
|
||||
import cn.dxl.common.util.LogUtils;
|
||||
import cn.proxgrind.com.UsbSerialControl;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.fragment.base.AppMainDevicesFragment;
|
||||
import cn.rrg.rdv.fragment.tools.MainSettingsFragment;
|
||||
@@ -88,16 +89,31 @@ public class AppMain extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
// back event dispatch!
|
||||
appMainDevicesFragment.onBackPressed();
|
||||
AlertDialog dialog = new AlertDialog.Builder(context)
|
||||
.setCancelable(false)
|
||||
.setMessage("Closing...").show();
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LocalComBridgeAdapter.getInstance().destroy();
|
||||
UsbSerialControl.get().disconect();
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dialog.dismiss();
|
||||
// back event dispatch!
|
||||
appMainDevicesFragment.onBackPressed();
|
||||
AppMain.super.onBackPressed();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
LocalComBridgeAdapter.getInstance().stopServer();
|
||||
LocalComBridgeAdapter.getInstance().stopClient();
|
||||
LogUtils.d("AppMain结束!");
|
||||
// System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@ public class Proxmark3Rdv4RRGMain
|
||||
|
||||
initViews();
|
||||
initActions();
|
||||
|
||||
// direct goto red team console!
|
||||
startActivity(new Intent(context, Proxmark3Rdv4RRGRedTeamConsoleActivity.class));
|
||||
finish();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
@@ -36,7 +40,7 @@ public class Proxmark3Rdv4RRGMain
|
||||
btnGo2Proxmark3Rdv4RRGRedTeam.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(context, Proxmark3Rdv4RRGRedTeamConsoleActivity.class));
|
||||
// startActivity(new Intent(context, Proxmark3Rdv4RRGRedTeamConsoleActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ buildscript {
|
||||
dependencies {
|
||||
//这里指定构建工具支持的版本仓库
|
||||
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||
classpath('com.github.dcendents:android-maven-gradle-plugin:1.5')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.github.xianglin1998:mfkey:1.1'
|
||||
implementation 'com.github.xianglin1998:nfctag:1.0'
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.1'
|
||||
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.3'
|
||||
|
||||
implementation project(path: ':utils')
|
||||
implementation project(path: ':communication')
|
||||
|
||||
@@ -23,6 +23,6 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.github.felHR85:UsbSerial:6.1.0'
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.1'
|
||||
implementation 'androidx.annotation:annotation:1.1.0'
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.3'
|
||||
}
|
||||
|
||||
@@ -95,11 +95,7 @@ public class UsbSerialControl implements DriverInterface<String, UsbManager> {
|
||||
if (action.equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {
|
||||
//判断并且释放USB串口
|
||||
if (mThiz != null) {
|
||||
try {
|
||||
mThiz.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mThiz.close();
|
||||
}
|
||||
//回调设备移除接口
|
||||
if (mCallback != null) mCallback.onDetach(NAME_DRIVER_USB_UART);
|
||||
@@ -141,7 +137,7 @@ public class UsbSerialControl implements DriverInterface<String, UsbManager> {
|
||||
return mPort != null ? mPort.getClass().getSimpleName() : NAME_DRIVER_USB_UART;
|
||||
}
|
||||
|
||||
private void close() throws IOException {
|
||||
private void close() {
|
||||
if (mPort == null) {
|
||||
//Log.e(LOG_TAG, "port is null");
|
||||
return;
|
||||
@@ -152,7 +148,7 @@ public class UsbSerialControl implements DriverInterface<String, UsbManager> {
|
||||
|
||||
@Override
|
||||
public void disconect() {
|
||||
//TODO 暂时不做处理
|
||||
close();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,7 +38,7 @@ 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'
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.3'
|
||||
|
||||
implementation project(path: ':communication')
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation project(':communication')
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.1'
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.3'
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ 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.1'
|
||||
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.3'
|
||||
|
||||
implementation project(':communication')
|
||||
implementation project(path: ':utils')
|
||||
|
||||
Submodule pm3rdv4rrg/src/main/cpp/proxmark3 updated: 0c233590a5...00b5841597
@@ -5,6 +5,8 @@ import com.iobridges.com.DeviceChecker;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.dxl.common.util.LogUtils;
|
||||
|
||||
public class Proxmark3RRGRdv4 extends DeviceChecker {
|
||||
|
||||
static {
|
||||
@@ -17,6 +19,7 @@ public class Proxmark3RRGRdv4 extends DeviceChecker {
|
||||
|
||||
@Override
|
||||
public boolean checkDevice() throws IOException {
|
||||
LogUtils.d("测试顺序");
|
||||
return testPm3();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
include ':app_main', ':utils', ':chameleon', ':communication', ':libnfc_pn53x', ':pm3rdv4rrg'
|
||||
include ':pm3flasher'
|
||||
include ':xmodem'
|
||||
|
||||
// if have the offline module!
|
||||
if ((Arrays.asList(getRootDir().list()).contains("iobridges"))) include ':iobridges'
|
||||
Reference in New Issue
Block a user