mirror of
https://github.com/RfidResearchGroup/RFIDtools.git
synced 2026-05-12 11:19:59 -07:00
Crazy attempt, all reconstruction. wubalubadubdub !!!
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
[submodule "pm3rdv4rrg/src/main/cpp/proxmark3"]
|
||||
path = pm3rdv4rrg/src/main/cpp/proxmark3
|
||||
url = https://github.com/RfidResearchGroup/proxmark3.git
|
||||
[submodule "pm3rdv4rrg/src/main/cpp/bzip2"]
|
||||
path = pm3rdv4rrg/src/main/cpp/bzip2
|
||||
url = http://sourceware.org/git/bzip2.git
|
||||
@@ -1,81 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="cn.rrg.rdv">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:name="cn.dxl.common.application.App"
|
||||
android:allowBackup="false"
|
||||
android:icon="@drawable/rfid"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:targetApi="q">
|
||||
|
||||
<activity android:name=".activities.tools.LoginActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
|
||||
android:resource="@xml/device_filter" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".activities.tools.KeyFileEditActivity" />
|
||||
<activity android:name=".activities.tools.DumpEditActivity" />
|
||||
<activity android:name=".activities.tools.ChameleonSoltAliasesActivity" />
|
||||
<activity android:name=".activities.tools.AboutActicity" />
|
||||
|
||||
<activity android:name=".activities.px53x.EmulateConsoleActivity" />
|
||||
<activity android:name=".activities.px53x.MfcukConsoleActivity" />
|
||||
<activity android:name=".activities.px53x.MfocConsoleActivity" />
|
||||
<activity android:name=".activities.px53x.NfcListConsoleActivity" />
|
||||
<activity android:name=".activities.px53x.HardnestedConsoleActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.connect.Proxmark3Rdv4RRGConnectActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout" />
|
||||
|
||||
<activity android:name=".activities.main.GeneralNfcDeviceMain">
|
||||
<!-- NFC Tech Filter -->
|
||||
<intent-filter>
|
||||
<action android:name="android.nfc.action.TECH_DISCOVERED" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.nfc.action.TECH_DISCOVERED"
|
||||
android:resource="@xml/nfc_filter" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".activities.connect.Acr122uHkUsbConnectActivity" />
|
||||
<activity android:name=".activities.main.PN53XNfcMain" />
|
||||
<activity android:name=".activities.main.PN53XReaderMain" />
|
||||
<activity android:name=".activities.connect.PN532UartConnectActivity" />
|
||||
<activity android:name=".activities.connect.ChameleonUsb2UartConnectActivity" />
|
||||
<activity android:name=".activities.chameleon.ChameleonGUIActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.main.AppMain"
|
||||
android:screenOrientation="nosensor" />
|
||||
|
||||
<activity android:name=".activities.connect.PN53XUsbBulkTransferActivity" />
|
||||
<activity android:name=".activities.tools.DumpListActivity" />
|
||||
<activity android:name=".activities.tools.KeyFileListActivity" />
|
||||
<activity android:name=".activities.main.PM3FlasherMainActivity" />
|
||||
<activity android:name=".activities.tools.Proxmark3FirmwareActivity" />
|
||||
<activity android:name=".activities.proxmark3.rdv4_rrg.Proxmark3NewTerminalInitActivity" />
|
||||
<activity android:name=".activities.proxmark3.rdv4_rrg.Proxmark3Rdv4RRGRedTeamConsoleActivity" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,102 +0,0 @@
|
||||
package cn.rrg.rdv.activities.main;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.iobridges.com.LocalComBridgeAdapter;
|
||||
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.activities.px53x.HardnestedConsoleActivity;
|
||||
import cn.rrg.rdv.activities.px53x.MfcukConsoleActivity;
|
||||
import cn.rrg.rdv.activities.px53x.MfocConsoleActivity;
|
||||
import cn.rrg.rdv.activities.px53x.NfcListConsoleActivity;
|
||||
|
||||
public class PN53XNfcMain extends BaseActivity {
|
||||
|
||||
private Button btnNestedCrack = null;
|
||||
private Button btnPRNGCrack = null;
|
||||
private Button btnReader = null;
|
||||
private Button btnHardnested = null;
|
||||
private Button btnNfcList = null;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.act_main_pn53x);
|
||||
|
||||
initViews();
|
||||
initActions();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
btnReader = findViewById(R.id.btnStartPN53XReaderAct);
|
||||
btnPRNGCrack = findViewById(R.id.btnStartMfcukAct);
|
||||
btnNestedCrack = findViewById(R.id.btnStartMfocAct);
|
||||
btnHardnested = findViewById(R.id.btnHardnested);
|
||||
btnNfcList = findViewById(R.id.btnNfcList);
|
||||
}
|
||||
|
||||
private void initActions() {
|
||||
//设置读卡的按钮的接口实现
|
||||
btnReader.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(context, PN53XReaderMain.class));
|
||||
}
|
||||
});
|
||||
|
||||
//设置半加密破解的按钮的接口实现
|
||||
btnNestedCrack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(context, MfocConsoleActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
//设置全加密破解的按钮的接口实现
|
||||
btnPRNGCrack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(context, MfcukConsoleActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
//hard破解的按钮的接口实现
|
||||
btnHardnested.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.warning)
|
||||
.setMessage("您想使用的功能是实验室功能(暂未稳定),可能会发生许多或者已知或者未知的问题,您确定要进入使用吗?")
|
||||
.setPositiveButton(R.string.go2, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
startActivity(new Intent(context, HardnestedConsoleActivity.class));
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null).show();
|
||||
}
|
||||
});
|
||||
|
||||
//NfcList页面跳转!
|
||||
btnNfcList.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(context, NfcListConsoleActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
LocalComBridgeAdapter.getInstance()
|
||||
.stopClient();
|
||||
}
|
||||
}
|
||||
-157
@@ -1,157 +0,0 @@
|
||||
package cn.rrg.rdv.activities.proxmark3.rdv4_rrg;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.dxl.common.util.FileUtils;
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
import cn.rrg.freo.IORedirector;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.activities.tools.BaseConsoleActivity;
|
||||
import cn.rrg.rdv.implement.EntryICommandType;
|
||||
import cn.rrg.rdv.util.Paths;
|
||||
|
||||
public abstract class Proxmark3ConsoleActivity
|
||||
extends BaseConsoleActivity
|
||||
implements View.OnClickListener,
|
||||
CompoundButton.OnCheckedChangeListener {
|
||||
|
||||
//滞留一个视图实例,可用如GUI,子控件实现!
|
||||
protected View guiView = null;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//重定向!
|
||||
IORedirector.setStdEO(Paths.PM3_FORWARD_O, IORedirector.STD_OUT);
|
||||
IORedirector.setStdEO(Paths.PM3_FORWARD_E, IORedirector.STD_ERR);
|
||||
IORedirector.setStdIN(Paths.COMMON_FORWARD_I);
|
||||
}
|
||||
}).start();
|
||||
|
||||
//父类先初初始化!
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
//默认关闭错误消息输出区域(用不上...)
|
||||
ckBoxOpenOutputError.setChecked(false);
|
||||
//覆盖父类的停止按钮点击实例
|
||||
btnStop.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.btnStop) {//判断当前是否有客户端可终止的任务在执行,是的话则终止!
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//TODO 此处进行IO,模拟键盘输入!
|
||||
stopPM3Client4KeyBorad();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
//通过键盘输入结束任务!
|
||||
protected void stopPM3Client4KeyBorad() {
|
||||
FileUtils.writeString(new File(Paths.COMMON_FORWARD_I), "\n", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
//非常有必要进行相关的结束操作!
|
||||
stopPM3Client4KeyBorad();
|
||||
mCMD.stopExecute();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
/*
|
||||
* 重写视图实例寻找,方便进行控制!
|
||||
* */
|
||||
@Override
|
||||
public <T extends View> T findViewById(int id) {
|
||||
T view = super.findViewById(id);
|
||||
return view != null ? view : guiView != null ? guiView.findViewById(id) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
//don't need process!!!
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return guiView;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File initOutTarget() {
|
||||
return new File(Paths.PM3_FORWARD_O);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File initErrTarget() {
|
||||
return new File(Paths.PM3_FORWARD_E);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
mDefaultCMD = "help";
|
||||
if (edtInputCmd.getText().toString().length() > 0) {
|
||||
mDefaultCMD = edtInputCmd.getText().toString();
|
||||
}
|
||||
//此处做出多行执行优化!
|
||||
int ret = -2;
|
||||
//优化,如果是多行命令的操作!
|
||||
if (mDefaultCMD.contains("\n")) {
|
||||
//包含换行,则当作多行处理!
|
||||
String[] cmds = mDefaultCMD.split("\n");
|
||||
Log.d(LOG_TAG, "警告,当前执行的是多行处理操作!");
|
||||
for (String c : cmds) {
|
||||
Log.d(LOG_TAG, "当前执行的命令: " + c);
|
||||
mCMD.startExecute(c);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
//直接执行命令并且在执行命令完成后进行回调!
|
||||
ret = cmd.startExecute(mDefaultCMD);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewOutLine(String line) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewErrLine(String line) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return new EntryICommandType();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTesting() {
|
||||
return super.isTesting();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void stopTest() {
|
||||
//super.stopTest();
|
||||
//TODO 无必要停止PM3的底层线程!
|
||||
}
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package cn.rrg.rdv.activities.proxmark3.rdv4_rrg;
|
||||
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.natives.Proxmark3RRGRdv4Tools;
|
||||
|
||||
public class Proxmark3Rdv4RRGConsoleActivity
|
||||
extends Proxmark3ConsoleActivity {
|
||||
|
||||
@Override
|
||||
protected ICommandTools initCMD() {
|
||||
//替换为rdv4的工具类!
|
||||
return new Proxmark3RRGRdv4Tools();
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.rrg.rdv.activities.px53x;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import cn.rrg.natives.EmulateTools;
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
|
||||
public class EmulateConsoleActivity extends PN53XConsoleActivity {
|
||||
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandTools initCMD() {
|
||||
return new EmulateTools();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
mDefaultCMD = "emulate -h";
|
||||
return super.startTest(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
showToast("Emulate停止执行!");
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package cn.rrg.rdv.activities.px53x;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import cn.rrg.natives.HardnestedTools;
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
|
||||
public class HardnestedConsoleActivity extends PN53XConsoleActivity {
|
||||
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandTools initCMD() {
|
||||
return new HardnestedTools();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return new ICommandType() {
|
||||
@Override
|
||||
public boolean isKey(String output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseKey(String output) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isData(String output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseData(String output) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isText(String output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Runnable parseText(String output) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
mDefaultCMD = "hard FFFFFFFFFFFF 0 A 4 A";
|
||||
return super.startTest(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
showToast("Hardnested结束执行...");
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
package cn.rrg.rdv.activities.px53x;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import cn.dxl.common.util.ViewUtil;
|
||||
import cn.dxl.common.widget.ToastUtil;
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
import cn.rrg.natives.MfcukTools;
|
||||
import cn.rrg.natives.PN53XTagLeaksAdapter;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.implement.EntryICommandType;
|
||||
|
||||
public class MfcukConsoleActivity extends PN53XConsoleActivity {
|
||||
|
||||
private AlertDialog checkTipsDialog;
|
||||
private TextView txtMsgView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
checkTipsDialog = new AlertDialog.Builder(context).create();
|
||||
checkTipsDialog.setTitle(R.string.tips);
|
||||
View continer = ViewUtil.inflate(context, R.layout.dialog_working_msg);
|
||||
txtMsgView = continer.findViewById(R.id.text1);
|
||||
txtMsgView.setText(R.string.msg_working_darkside_check);
|
||||
checkTipsDialog.setView(continer);
|
||||
checkTipsDialog.setCancelable(false);
|
||||
}
|
||||
|
||||
private void showWorkingDialog(boolean show) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (show)
|
||||
checkTipsDialog.show();
|
||||
else
|
||||
checkTipsDialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandTools initCMD() {
|
||||
return new MfcukTools();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return new EntryICommandType() {
|
||||
@Override
|
||||
public boolean isKey(String output) {
|
||||
return output.matches("INFO: block \\d recovered KEY: ([A-Za-z0-9])+");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseKey(String output) {
|
||||
return output.substring(output.length() - 12, output.length());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
showWorkingDialog(true);
|
||||
// Judge if there is have a nack loophole
|
||||
if (!new PN53XTagLeaksAdapter().isDarksideSupported()) {
|
||||
showWorkingDialog(false);
|
||||
// darkside no supported.
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.tips)
|
||||
.setMessage(getString(R.string.msg_darkside_no_supported)).show();
|
||||
}
|
||||
});
|
||||
return -1;
|
||||
} else {
|
||||
showWorkingDialog(false);
|
||||
ToastUtil.show(context, getString(R.string.msg_darkside_support), false);
|
||||
}
|
||||
mDefaultCMD = "mfcuk -C -R 0:A -w -v 2";
|
||||
return super.startTest(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewOutLine(String line) {
|
||||
super.onNewOutLine(line);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewErrLine(String line) {
|
||||
super.onNewErrLine(line);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
showToast("监听到Mfcuk执行结束...");
|
||||
//如果是结束了!
|
||||
if (mIsRequsetMode) {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AlertDialog.Builder(mContext)
|
||||
.setTitle("温馨提示")
|
||||
.setMessage("检测到当前活动是从其他的组件请求跳转过来的,是否需要结束,然后请求mofc半加测试进行更多的密钥探测与数据导出?")
|
||||
.setPositiveButton("结束", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
//开始请求!
|
||||
Intent intent = new Intent(mContext, MfocConsoleActivity.class);
|
||||
intent.putExtra("ctm", true);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton("留下", null).show();
|
||||
}
|
||||
});
|
||||
mIsRequsetMode = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
package cn.rrg.rdv.activities.px53x;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
import cn.rrg.natives.MfocTools;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.activities.tools.DumpEditActivity;
|
||||
import cn.rrg.rdv.util.DumpUtils;
|
||||
import cn.rrg.rdv.util.Paths;
|
||||
import cn.rrg.rdv.util.UnionAction;
|
||||
|
||||
public class MfocConsoleActivity extends PN53XConsoleActivity {
|
||||
|
||||
private boolean isNeedRequestMfcuk = false;
|
||||
private boolean isAutoExcuted = false;
|
||||
private String mDefaultDumpFile = Paths.DUMP_DIRECTORY + File.separator + "data.dump";
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
//在回到界面时判断是否是组件间开启了传输,然后需要重新开启请求!
|
||||
if (isNeedRequestMfcuk || mIsRequsetMode) {
|
||||
//判断是否需要重新开启执行!
|
||||
if (!isTesting() && isAutoExcuted) {
|
||||
btnStart.performClick();
|
||||
//不让他多次执行!
|
||||
isAutoExcuted = false;
|
||||
}
|
||||
isNeedRequestMfcuk = false;
|
||||
mIsRequsetMode = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandTools initCMD() {
|
||||
return new MfocTools();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return new ICommandType() {
|
||||
@Override
|
||||
public boolean isKey(String output) {
|
||||
return output.matches(" {2}Found Key: \\w \\[[A-Za-z0-9]+\\]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseKey(String output) {
|
||||
return output.substring(output.indexOf('[') + 1, output.indexOf(']'));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isData(String output) {
|
||||
return output.matches("Block [0-9]{2}, type A, key [A-Za-z0-9]{12} :.*");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseData(String output) {
|
||||
return output.substring(output.indexOf(':') + 1).replaceAll(" {2}", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isText(String output) {
|
||||
//可以在这里做一些文本识别,非退出行,或是其他的一些行!
|
||||
return !isKey(output) && !isData(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Runnable parseText(String output) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
mDefaultCMD = "mfoc " + " -O " + mDefaultDumpFile;
|
||||
//执行父类,进行真正的逻辑判断,检查输入与是否在执行,进行下一步的操作!
|
||||
mIsRequsetMode = true;
|
||||
return super.startTest(cmd);
|
||||
}
|
||||
|
||||
private boolean isDefaultKeys(String key) {
|
||||
if (key.equalsIgnoreCase("ffffffffffff")) return true;
|
||||
if (key.equalsIgnoreCase("a0a1a2a3a4a5")) return true;
|
||||
if (key.equalsIgnoreCase("d3f7d3f7d3f7")) return true;
|
||||
if (key.equalsIgnoreCase("000000000000")) return true;
|
||||
if (key.equalsIgnoreCase("b0b1b2b3b4b5")) return true;
|
||||
if (key.equalsIgnoreCase("1a982c7e459a")) return true;
|
||||
if (key.equalsIgnoreCase("aabbccddeeff")) return true;
|
||||
if (key.equalsIgnoreCase("714c5c886e97")) return true;
|
||||
if (key.equalsIgnoreCase("587ee5f9350f")) return true;
|
||||
if (key.equalsIgnoreCase("a0478cc39091")) return true;
|
||||
if (key.equalsIgnoreCase("533cb6c723f6")) return true;
|
||||
if (key.equalsIgnoreCase("8fd0a4f256e9")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void stopTest() {
|
||||
//强行停止的情况则不自动返回上一层!
|
||||
mIsRequsetMode = false;
|
||||
super.stopTest();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewOutLine(String line) {
|
||||
super.onNewOutLine(line);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewErrLine(String line) {
|
||||
super.onNewErrLine(line);
|
||||
if (line.equalsIgnoreCase("No sector encrypted with the default key has been found, exiting..")) {
|
||||
//这是没有密钥的错误消息,需要请求全加密来进行破解!
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AlertDialog.Builder(MfocConsoleActivity.this)
|
||||
.setTitle(R.string.tips)
|
||||
.setMessage(R.string.tips_mfcuk_request)
|
||||
.setPositiveButton(R.string.go2, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
isNeedRequestMfcuk = true;
|
||||
//开始封装消息进行请求!
|
||||
String cmd = "mfcuk -C -R 0:A -w -v 2";
|
||||
//开始请求!
|
||||
Intent intent = new Intent(MfocConsoleActivity.this, MfcukConsoleActivity.class);
|
||||
intent.putExtra("cmd", cmd);
|
||||
intent.putExtra("ctm", true);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
//不需要尝试反转数据!
|
||||
//UnionAction.reverse();
|
||||
//需要直接退出当前ACT,返回可能存在的上层ACT,
|
||||
//TODO 注意,此时应当对数据进行判断,如果有足够数量的数据则调用dump组件显示!
|
||||
String[] datas = UnionAction.getDatas();
|
||||
int dataCount = datas.length;
|
||||
for (String line : datas) {
|
||||
Log.d(LOG_TAG, "line: " + line);
|
||||
if (!DumpUtils.isBlockData(line)) {
|
||||
showToast(getString(R.string.error));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (dataCount == 64 || dataCount == 128 || dataCount == 256) {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//先提醒用户是否需要跳转!
|
||||
new AlertDialog.Builder(mContext)
|
||||
.setTitle(R.string.tips)
|
||||
.setMessage(R.string.tips_mfoc_data_found)
|
||||
.setPositiveButton(R.string.go2, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//拥有足够的扇区数据,可以被解析显示!
|
||||
//TODO 因为控制台的输出有点问题,因此不能直接利用,需要打开输出的dump!
|
||||
Intent intent = new Intent(mContext, DumpEditActivity.class);
|
||||
intent.putExtra("isFileMode", true);
|
||||
intent.putExtra("isConnected", true);
|
||||
intent.putExtra("file", mDefaultDumpFile);
|
||||
startActivity(intent);
|
||||
//使用后直接移除数据!
|
||||
UnionAction.removeData();
|
||||
//结束此活动!
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.no, null).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package cn.rrg.rdv.activities.px53x;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
import cn.rrg.natives.NfcListTools;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.implement.EntryICommandType;
|
||||
|
||||
public class NfcListConsoleActivity extends PN53XConsoleActivity {
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandTools initCMD() {
|
||||
return new NfcListTools();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return new EntryICommandType();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
mDefaultCMD = "nfclist -v";
|
||||
return super.startTest(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
showToast(getString(R.string.finish));
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package cn.rrg.rdv.activities.px53x;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.rrg.freo.IORedirector;
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.rdv.activities.tools.BaseConsoleActivity;
|
||||
import cn.rrg.rdv.util.Paths;
|
||||
import cn.rrg.rdv.util.UnionAction;
|
||||
|
||||
public abstract class PN53XConsoleActivity extends BaseConsoleActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
//在所有的初始化开始之前先设置重定向!
|
||||
IORedirector.setStdEO(Paths.PN53X_FORWARD_O, IORedirector.STD_OUT);
|
||||
IORedirector.setStdEO(Paths.PN53X_FORWARD_E, IORedirector.STD_ERR);
|
||||
//调用父类方法初始化!
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
//父类初始化完成后进行设置,PN53X默认关闭日志框!
|
||||
ckBoxOpenOutputLog.setChecked(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startActivity(Intent intent) {
|
||||
super.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File initOutTarget() {
|
||||
return new File(Paths.PN53X_FORWARD_O);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File initErrTarget() {
|
||||
return new File(Paths.PN53X_FORWARD_E);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
if (isTesting()) {
|
||||
showToast("Has some task is excuting...");
|
||||
return -1;
|
||||
}
|
||||
if (edtInputCmd.getText().toString().length() > 0) {
|
||||
mDefaultCMD = edtInputCmd.getText().toString();
|
||||
}
|
||||
return cmd.startExecute(mDefaultCMD);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewOutLine(String line) {
|
||||
//解析为密钥
|
||||
if (mType.isKey(line)) {
|
||||
String key = mType.parseKey(line);
|
||||
if (key == null) {
|
||||
showToast("检测到一组输出可能是密钥,但解析失败!");
|
||||
return;
|
||||
}
|
||||
UnionAction.addKey(key);
|
||||
showToast("Found a key: " + key);
|
||||
return;
|
||||
}
|
||||
//解析为数据!
|
||||
if (mType.isData(line)) {
|
||||
String data = mType.parseData(line);
|
||||
if (data == null) {
|
||||
showToast("检测到一组输出可能是数据,但解析失败!");
|
||||
return;
|
||||
}
|
||||
UnionAction.addData(data);
|
||||
//showToast("Found a dat: " + data);
|
||||
return;
|
||||
}
|
||||
//解析为普通的文本!
|
||||
if (mType.isText(line)) {
|
||||
//解析动作
|
||||
Runnable r = mType.parseText(line);
|
||||
//在主线程(UI线程!)中执行!
|
||||
if (r != null) mHandler.post(r);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewErrLine(String line) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTesting() {
|
||||
return super.isTesting();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void stopTest() {
|
||||
super.stopTest();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,73 +0,0 @@
|
||||
package cn.rrg.rdv.activities.tools;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.View;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.rrg.freo.IORedirector;
|
||||
import cn.rrg.console.define.ICommandTools;
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
import cn.rrg.rdv.implement.EntryICommandType;
|
||||
import cn.rrg.rdv.util.Paths;
|
||||
|
||||
public abstract class CommonConsoleActivity extends BaseConsoleActivity {
|
||||
|
||||
private File o = new File(Paths.COMMON_FORWARD_O);
|
||||
private File e = new File(Paths.COMMON_FORWARD_E);
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
IORedirector.setStdEO(o.getAbsolutePath(), IORedirector.STD_OUT);
|
||||
IORedirector.setStdEO(e.getAbsolutePath(), IORedirector.STD_ERR);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View getCommandGUI() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICommandType initType() {
|
||||
return new EntryICommandType();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File initOutTarget() {
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File initErrTarget() {
|
||||
return e;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int startTest(ICommandTools cmd) {
|
||||
if (isTesting()) {
|
||||
showToast("Has some task is excuting...");
|
||||
return -1;
|
||||
}
|
||||
if (edtInputCmd.getText().toString().length() > 0) {
|
||||
mDefaultCMD = edtInputCmd.getText().toString();
|
||||
}
|
||||
return cmd.startExecute(mDefaultCMD);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewOutLine(String line) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewErrLine(String line) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTestEnd() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
package cn.rrg.rdv.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import cn.dxl.mifare.MifareClassicUtils;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.dxl.common.util.ContextUtil;
|
||||
import cn.dxl.common.util.TextStyleUtil;
|
||||
|
||||
public class DumpEqualAdapter extends AbsResIdArrayAdapter<String> {
|
||||
|
||||
public DumpEqualAdapter(@NonNull Context context, int resource) {
|
||||
super(context, resource);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||
//绘制一下视图!
|
||||
View view = convertView;
|
||||
if (view == null) view = LayoutInflater.from(getContext()).inflate(resourceId, null);
|
||||
TextView showInfo = view.findViewById(R.id.txtShowEqualInfo);
|
||||
TextView showBlock = view.findViewById(R.id.txtShowEqualBlock);
|
||||
TextView showResult = view.findViewById(R.id.txtShowEqualResult);
|
||||
//显示块索引值!
|
||||
showBlock.setText(String.valueOf(position));
|
||||
//判断是否试起始扇区,是的话就显示扇区索引值
|
||||
LinearLayout layout = view.findViewById(R.id.layout_sector_label);
|
||||
if (MifareClassicUtils.isFirstBlock(position)) {
|
||||
layout.setVisibility(View.VISIBLE);
|
||||
//填充扇区值!
|
||||
TextView txtShowSector = layout.findViewById(R.id.txtShowSector);
|
||||
int sector = MifareClassicUtils.blockToSector(position);
|
||||
txtShowSector.setText(String.valueOf(sector));
|
||||
} else {
|
||||
layout.setVisibility(View.GONE);
|
||||
}
|
||||
//判断是否需要显示尾部的分割线!
|
||||
View endDivider = view.findViewById(R.id.view_divider);
|
||||
if (MifareClassicUtils.isTrailerBlock(position)) {
|
||||
endDivider.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
endDivider.setVisibility(View.GONE);
|
||||
}
|
||||
//判断是否需要显示块数据的分割线!
|
||||
View dataBlckDivider = view.findViewById(R.id.view_divider_1);
|
||||
if (!MifareClassicUtils.isTrailerBlock(position)) {
|
||||
dataBlckDivider.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dataBlckDivider.setVisibility(View.GONE);
|
||||
}
|
||||
//显示块对比结果.进行样式设置!
|
||||
String content = getItem(position);
|
||||
if (content != null) {
|
||||
String[] contents = content.split("\n");
|
||||
//填充显示数据信息!
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0, j = 0; i < contents.length; i++) {
|
||||
//判断是奇数还是偶数,奇数必定有对比
|
||||
if (i % 2 == 0) {
|
||||
//实际数据个数计算!
|
||||
++j;
|
||||
//奇数直接换行,偶数添加索引再换行!
|
||||
sb.append(": ").append(j);
|
||||
if (i != contents.length - 1)
|
||||
sb.append('\n');
|
||||
} else {
|
||||
//未达到结尾则需要直接换行!
|
||||
if (i != contents.length - 1)
|
||||
sb.append("\n");
|
||||
}
|
||||
}
|
||||
showInfo.setText(sb.toString());
|
||||
//富文本样式构造器!
|
||||
SpannableStringBuilder ssb = new SpannableStringBuilder();
|
||||
//判断是奇数还是偶数,奇数必定有对比
|
||||
for (int i = 0; i < contents.length; i++) {
|
||||
//判断是当前是数据行还是对比行!
|
||||
String data = contents[i];
|
||||
if (i % 2 == 0) {
|
||||
//偶数行是数据行,数据行需要判断尾部块或者厂商块!
|
||||
if (position == 0) {
|
||||
//厂商块!
|
||||
ssb.append(TextStyleUtil.getStyleString(getContext(), data, R.style.ManufacturerStyle));
|
||||
if (i != contents.length - 1) ssb.append('\n');
|
||||
} else if (MifareClassicUtils.isTrailerBlock(position)) {
|
||||
//尾部块!
|
||||
//尾部块需要进行截取设置,无需最终的换行!!!
|
||||
String keyA = data.substring(0, 12);
|
||||
String access = data.substring(12, 20);
|
||||
String keyB = data.substring(20, 32);
|
||||
ssb.append(TextStyleUtil.merge(
|
||||
TextStyleUtil.getStyleString(getContext(), keyA, R.style.KeyStyle),
|
||||
TextStyleUtil.getStyleString(getContext(), access, R.style.AccessStyle),
|
||||
TextStyleUtil.getStyleString(getContext(), keyB, R.style.KeyStyle)
|
||||
));
|
||||
if (i != contents.length - 1) ssb.append('\n');
|
||||
} else {
|
||||
//数据块!
|
||||
ssb.append(TextStyleUtil.getColorString(data, ContextUtil.getColor(R.color.md_white_1000)));
|
||||
if (i != contents.length - 1) ssb.append('\n');
|
||||
}
|
||||
} else {
|
||||
//奇数行是对比行!
|
||||
ssb.append(TextStyleUtil.getColorString(contents[i], ContextUtil.getColor(R.color.md_red_A700)));
|
||||
if (i != contents.length - 1) ssb.append('\n');
|
||||
}
|
||||
}
|
||||
showResult.setText(ssb);
|
||||
} else {
|
||||
showResult.setText(getContext().getString(R.string.content_null));
|
||||
}
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package cn.rrg.rdv.implement;
|
||||
|
||||
import cn.rrg.console.define.ICommandType;
|
||||
|
||||
public class EntryICommandType implements ICommandType {
|
||||
@Override
|
||||
public boolean isKey(String output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseKey(String output) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isData(String output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseData(String output) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isText(String output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Runnable parseText(String output) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package cn.rrg.rdv.models;
|
||||
|
||||
import cn.dxl.mifare.MifareAdapter;
|
||||
import cn.rrg.natives.SpclMf;
|
||||
import cn.rrg.rdv.callback.ReaderCallback;
|
||||
import cn.rrg.rdv.javabean.M1Bean;
|
||||
|
||||
public class PN53XTagReadModel extends AbsTagReadModel {
|
||||
@Override
|
||||
protected MifareAdapter getTag() {
|
||||
return SpclMf.get();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package cn.rrg.rdv.view;
|
||||
|
||||
import cn.dxl.common.util.PrintUtil;
|
||||
|
||||
public interface LoginView extends BaseMvpView, PrintUtil.OnPrintLisenter {
|
||||
void onInitFinish();
|
||||
|
||||
void onInitFail();
|
||||
}
|
||||
@@ -1,274 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<cn.dxl.common.widget.StatusBarHeightView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical"
|
||||
app:use_type="use_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/md_grey_300"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="6dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/standard_output"
|
||||
android:textColor="@color/md_grey_600"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="38dp"
|
||||
android:text="@string/screen_scale"
|
||||
android:textColor="@color/md_grey_600"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/skBarConsoleViewScale"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:max="10"
|
||||
android:progress="8" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout_output_out_views"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="8">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/svOutContain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtOutConsoleMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:hint="@string/tips_no_input"
|
||||
android:paddingLeft="10dp"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="10sp"
|
||||
android:typeface="monospace" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@color/md_grey_100" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout_err_log_group_views"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/md_grey_300"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="6dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/other_output"
|
||||
android:textColor="@color/md_grey_600"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/ckBoxOpenOutputError"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:checked="true"
|
||||
android:text="@string/output_err"
|
||||
android:textColor="@color/md_grey_600"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/ckBoxOpenOutputLogMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:checked="true"
|
||||
android:text="@string/output_log"
|
||||
android:textColor="@color/md_grey_600"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.16">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout_output_err_views"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/svErrContain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtErrConsoleMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:paddingLeft="10dp"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="10sp"
|
||||
android:typeface="monospace" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/view_console_err_log_division"
|
||||
layout="@layout/view_v_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout_output_log_views"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/svLogContain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtLogConsoleMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:paddingLeft="10dp"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="10sp"
|
||||
android:typeface="monospace" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<cn.dxl.common.widget.EditTextWithDelete
|
||||
android:id="@+id/edtInputCommand"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/command_input_hint"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:padding="8dp"
|
||||
android:text="@string/console_send"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnClearMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:padding="8dp"
|
||||
android:text="@string/console_clear_screen"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:padding="8dp"
|
||||
android:text="@string/console_stop_exe"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGui"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:padding="8dp"
|
||||
android:text="@string/console_gui"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</cn.dxl.common.widget.StatusBarHeightView>
|
||||
@@ -1,116 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center|top"
|
||||
android:orientation="vertical">
|
||||
|
||||
<cn.dxl.common.widget.StatusBarHeightView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:columnCount="2"
|
||||
app:orientation="horizontal"
|
||||
app:useDefaultMargins="false">
|
||||
<!--column:列-->
|
||||
<!--row: 行-->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStartPN53XReaderAct"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:drawableTop="@drawable/main_write"
|
||||
android:drawablePadding="-50dp"
|
||||
android:gravity="bottom|center"
|
||||
android:paddingTop="38dp"
|
||||
android:paddingBottom="28dp"
|
||||
android:text="@string/reader"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnNfcList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:drawableTop="@drawable/main_nfclist"
|
||||
android:drawablePadding="-50dp"
|
||||
android:gravity="bottom|center"
|
||||
android:paddingTop="38dp"
|
||||
android:paddingBottom="28dp"
|
||||
android:text="@string/nfclist"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStartMfocAct"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:drawableTop="@drawable/main_mfoc"
|
||||
android:drawablePadding="-50dp"
|
||||
android:gravity="bottom|center"
|
||||
android:paddingTop="38dp"
|
||||
android:paddingBottom="28dp"
|
||||
android:text="@string/mfoc"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStartMfcukAct"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:drawableTop="@drawable/main_mfcuk"
|
||||
android:drawablePadding="-50dp"
|
||||
android:gravity="bottom|center"
|
||||
android:paddingTop="38dp"
|
||||
android:paddingBottom="28dp"
|
||||
android:text="@string/mfcuk"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnHardnested"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:drawableTop="@drawable/main_iterator"
|
||||
android:drawablePadding="-50dp"
|
||||
android:gravity="bottom|center"
|
||||
android:paddingTop="38dp"
|
||||
android:paddingBottom="28dp"
|
||||
android:text="@string/hardnested"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_margin="0.2dp"
|
||||
android:background="@drawable/selector_shadow"
|
||||
android:drawableTop="@drawable/main_emulate"
|
||||
android:drawablePadding="-50dp"
|
||||
android:gravity="bottom|center"
|
||||
android:paddingTop="38dp"
|
||||
android:paddingBottom="28dp"
|
||||
android:text="@string/emulate"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user