mirror of
https://github.com/RfidResearchGroup/RFIDtools.git
synced 2026-05-12 11:19:59 -07:00
PM3 resource updated and some bug fixed.
This commit is contained in:
@@ -52,14 +52,11 @@ dependencies {
|
||||
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'
|
||||
|
||||
// This my project maven from github release!
|
||||
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:nfc_console:1.0'
|
||||
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.7'
|
||||
// implementation project(path: ':iobridges')
|
||||
implementation project(path: ':iobridges')
|
||||
implementation project(path: ':crapto1')
|
||||
implementation project(path: ':nfctag')
|
||||
implementation project(path: ':console')
|
||||
implementation project(path: ':redirector')
|
||||
|
||||
implementation project(':utils')
|
||||
implementation project(':libnfc_pn53x')
|
||||
|
||||
@@ -35,9 +35,7 @@
|
||||
</activity>
|
||||
|
||||
<activity android:name=".activities.tools.KeyFileEditActivity" />
|
||||
<activity android:name=".activities.tools.DumpEqualActivity" />
|
||||
<activity android:name=".activities.tools.DumpEditActivity" />
|
||||
<activity android:name=".activities.tools.FormatCovertActivity" />
|
||||
<activity android:name=".activities.tools.ChameleonSoltAliasesActivity" />
|
||||
<activity android:name=".activities.tools.AboutActicity" />
|
||||
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style>
|
||||
*{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
ul,li{
|
||||
list-style: none;
|
||||
}
|
||||
body{
|
||||
background:#05A1FF;
|
||||
font: "宋体" 16px;
|
||||
color: white;
|
||||
}
|
||||
.title{
|
||||
padding: 6px;
|
||||
}
|
||||
.devlist,.comlist{
|
||||
text-indent:2em;
|
||||
line-height: 33px;
|
||||
border: solid 1px white;
|
||||
border-bottom: none;
|
||||
border-radius: 3px;
|
||||
margin: 2px;
|
||||
}
|
||||
.devlist li{
|
||||
border-bottom: solid 1px white;
|
||||
}
|
||||
.comlist li{
|
||||
border-bottom: solid 1px white;
|
||||
}
|
||||
.itemTitle{
|
||||
padding:6px;
|
||||
background: #0097F3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>使用帮助</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3 align="center" class="title">前言</h3>
|
||||
<p class="itemTitle">本APP支持哪些设备?</p>
|
||||
<ul class="devlist">
|
||||
<li>1、恩智浦_自带(免费)</li>
|
||||
<li>2、恩智浦_PN532(付费)</li>
|
||||
<li>3、龙杰_ACR122U(付费)</li>
|
||||
<li>4、Proxmark3CDC(付费)</li>
|
||||
<li>5、ChameleonCDC(付费)</li>
|
||||
<li>6、Proxmark3SPP(付费)</li>
|
||||
</ul>
|
||||
<p class="itemTitle">本APP支持哪些连接方式?</p>
|
||||
<ul class="comlist">
|
||||
<li>1、OTG</li>
|
||||
<li>2、蓝牙</li>
|
||||
</ul>
|
||||
<p class="itemTitle">APP注意事项正文</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
1、Miui系统可能需要前往权限管理打开“后台弹出窗口”,否则一键重启不可用!
|
||||
</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
2、没有购买权限是无法发现相关设备的,请有需要的用户联系管理员购买!
|
||||
</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
3、为了您的数据安全,APP不允许您以Wifi代理或者VPN之类的方式联网!
|
||||
</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
4、很多权限都是谷歌附加强调的,但APP本身并未使用,比如定位,此链接可证实:<a href="http://sina.lt/gpyF">cnblogs</a>!
|
||||
如果您没有使用蓝牙相关的设备,您完全可以禁止本APP的定位权限,身正不怕影子斜!
|
||||
</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
5、目前已知的问题是后台一段时间后会被回收内存,导致程序出错,所以在处理任务时请不要轻易切换后台!
|
||||
</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
6、出现问题请在“加入Q群”中进群反馈,必要时提供log文件,在“发送log”选项中,
|
||||
选择log时请选择发送最顶端的带有数字的比如“log_1557477240504”,最好是多发几个。
|
||||
</p>
|
||||
<p class="itemTitle">APP使用帮助正文</p>
|
||||
<p style="text-indent:2em; margin: 6px;">
|
||||
本APP在线帮助与免责声明已经整理好一部分,本APP涉及到的开源库将被共享到此链接,如果未发现,可能是操作未更新,可联系dev要求更新。<a
|
||||
href="http://www.pn532.com/?id=21">跳转观看</a></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
20201026_5
|
||||
|
||||
pattern: *_*
|
||||
|
||||
frist *: date
|
||||
second: number
|
||||
|
||||
example: 20201026_1
|
||||
example: 20201026_2
|
||||
example: 20201027_1
|
||||
Binary file not shown.
+6
-4
@@ -80,10 +80,12 @@ public class Proxmark3NewTerminalInitActivity extends BaseActivity {
|
||||
box.setChecked(Commons.getAutoGoToTerminal());
|
||||
|
||||
// Must have init pm3 client and check auto go and have the terminal type selected!
|
||||
if (Commons.getAutoGoToTerminal()
|
||||
&& Commons.isPM3ClientDecompressed()
|
||||
&& Commons.getTerminalType() != -1) {
|
||||
go();
|
||||
if (Commons.getAutoGoToTerminal() && Commons.getTerminalType() != -1) {
|
||||
if (Proxmark3Installer.isCanInstall(activity)) {
|
||||
Proxmark3Installer.installIfNeed(activity, this::go);
|
||||
} else {
|
||||
go();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
package cn.rrg.rdv.activities.tools;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
import cn.dxl.common.widget.FilesSelectorDialog;
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.activities.main.BaseActivity;
|
||||
import cn.rrg.rdv.adapter.DumpEqualAdapter;
|
||||
import cn.rrg.rdv.javabean.M1Bean;
|
||||
import cn.rrg.rdv.presenter.FileReadLinePresenter;
|
||||
import cn.rrg.rdv.view.FileReadLineView;
|
||||
import cn.rrg.rdv.util.Commons;
|
||||
import cn.rrg.rdv.util.LineEqualUtil;
|
||||
import cn.rrg.rdv.util.Paths;
|
||||
import cn.dxl.common.util.ArrayUtils;
|
||||
import cn.dxl.common.widget.ToastUtil;
|
||||
|
||||
public class DumpEqualActivity extends BaseActivity implements FileReadLineView {
|
||||
|
||||
private RadioGroup radioGroupPathSelect = null;
|
||||
private TextView txtSelectData1 = null;
|
||||
private TextView txtSelectData2 = null;
|
||||
private TextView txtShowEqualMsg = null;
|
||||
private DumpEqualAdapter adapter = null;
|
||||
private ArrayList<String> mData1 = new ArrayList<>();
|
||||
private ArrayList<String> mData2 = new ArrayList<>();
|
||||
private FilesSelectorDialog mSelector = null;
|
||||
private int fileId = 1;
|
||||
private FileReadLinePresenter presenter = null;
|
||||
//初始化给两个必须要的参数!
|
||||
private boolean[] states = {false, false};
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
setContentView(R.layout.act_dump_equal);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
presenter = new FileReadLinePresenter();
|
||||
presenter.attachView(this);
|
||||
|
||||
//初始化视图
|
||||
initViews();
|
||||
//初始化动作!
|
||||
initActions();
|
||||
|
||||
//看看能否取得传递过来的数据!
|
||||
Intent intent = getIntent();
|
||||
//取出数据进行转换!
|
||||
ArrayList<M1Bean> dataList = (ArrayList<M1Bean>) intent.getSerializableExtra("dataList");
|
||||
//进行判断!
|
||||
if (dataList != null) {
|
||||
//取出数据名字!
|
||||
String name = intent.getStringExtra("dataName");
|
||||
if (name != null) {
|
||||
txtSelectData1.setText(name);
|
||||
} else {
|
||||
txtSelectData1.setText(R.string.data_name_dafault);
|
||||
}
|
||||
ArrayList<String> data = new ArrayList<>(128);
|
||||
//进行拼接!
|
||||
for (M1Bean bean : dataList) {
|
||||
//进行拼接!
|
||||
data.addAll(Arrays.asList(bean.getDatas()));
|
||||
}
|
||||
//设置ID
|
||||
fileId = 1;
|
||||
onReadFinish(ArrayUtils.list2Arr(data));
|
||||
}
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
radioGroupPathSelect = findViewById(R.id.rdoGroupDataPath);
|
||||
txtSelectData1 = findViewById(R.id.txtDumpEqualData1);
|
||||
txtSelectData2 = findViewById(R.id.txtDumpEqualData2);
|
||||
txtShowEqualMsg = findViewById(R.id.txtShowEqualMsg);
|
||||
ListView lvShowEqualResult = findViewById(R.id.lvShowEqualResult);
|
||||
adapter = new DumpEqualAdapter(this, R.layout.dump_equal_result_item);
|
||||
lvShowEqualResult.setAdapter(adapter);
|
||||
mSelector = new FilesSelectorDialog.Builder(this).setPathOnLoad(Paths.DUMP_DIRECTORY).create();
|
||||
}
|
||||
|
||||
private void initActions() {
|
||||
txtSelectData1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String path = Commons.getCustomerPath(radioGroupPathSelect);
|
||||
mSelector.setPathOnLoad(path);
|
||||
mSelector.setOnSelectListener(new FilesSelectorDialog.OnSelectListener() {
|
||||
@Override
|
||||
public void selected(File file) {
|
||||
fileId = 1;
|
||||
txtSelectData1.setText(file.getName());
|
||||
presenter.load(file);
|
||||
}
|
||||
});
|
||||
mSelector.show();
|
||||
}
|
||||
});
|
||||
txtSelectData2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String path = Commons.getCustomerPath(radioGroupPathSelect);
|
||||
mSelector.setPathOnLoad(path);
|
||||
mSelector.setOnSelectListener(new FilesSelectorDialog.OnSelectListener() {
|
||||
@Override
|
||||
public void selected(File file) {
|
||||
fileId = 2;
|
||||
txtSelectData2.setText(file.getName());
|
||||
presenter.load(file);
|
||||
}
|
||||
});
|
||||
mSelector.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
presenter.detachView();
|
||||
//清除数据,帮助回收!
|
||||
mData1.clear();
|
||||
mData2.clear();
|
||||
adapter.clear();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReadFinish(String[] line) {
|
||||
//加载成功了,需要进行判断当前是哪个文件加载出来的!
|
||||
switch (fileId) {
|
||||
//进行处理!
|
||||
case 1:
|
||||
//第一个数据!
|
||||
mData1.clear();
|
||||
mData1.addAll(Arrays.asList(line));
|
||||
states[0] = true;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
//第二个数据!
|
||||
mData2.clear();
|
||||
mData2.addAll(Arrays.asList(line));
|
||||
states[1] = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//进行判断,如果两个数据皆正常,则直接开始计算判断!
|
||||
boolean canStart = true;
|
||||
for (boolean state : states) {
|
||||
if (!state) {
|
||||
canStart = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (canStart) {
|
||||
//已经可以进行对比!
|
||||
LineEqualUtil leu = new LineEqualUtil();
|
||||
leu.putData(ArrayUtils.list2Arr(mData1), ArrayUtils.list2Arr(mData2));
|
||||
String[] result = leu.finalResult();
|
||||
int blockDiffCount = leu.getBlockDiffCount();
|
||||
int allDiffCount = leu.getAllDiffCount();
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String msg = getString(R.string.data_block_diff_count) + blockDiffCount + getString(R.string.data_char_diff_count) + allDiffCount;
|
||||
txtShowEqualMsg.setText(msg);
|
||||
//显示一些必要的弹窗
|
||||
if (blockDiffCount == 0 && allDiffCount == 0) {
|
||||
showToast(getString(R.string.data_identical));
|
||||
}
|
||||
//必须先清除之前的数据
|
||||
adapter.clear();
|
||||
adapter.addAll(result);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReadFail(String msg) {
|
||||
showToast(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showToast(String msg) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToastUtil.show(DumpEqualActivity.this, msg, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showDialog(String title, String msg) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideDialog() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,289 +0,0 @@
|
||||
package cn.rrg.rdv.activities.tools;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import cn.dxl.common.widget.FilesSelectorDialog;
|
||||
import cn.rrg.rdv.R;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.rrg.rdv.activities.main.BaseActivity;
|
||||
import cn.rrg.rdv.presenter.FormatConvertPresenter;
|
||||
import cn.rrg.rdv.view.FormatConvertView;
|
||||
import cn.rrg.rdv.util.Commons;
|
||||
import cn.rrg.rdv.util.Paths;
|
||||
import cn.dxl.common.util.StringUtil;
|
||||
|
||||
public class FormatCovertActivity extends BaseActivity implements FormatConvertView {
|
||||
|
||||
private int mType = 0;
|
||||
//中介者对象持有
|
||||
private FormatConvertPresenter presenter = null;
|
||||
//文件选择器对象
|
||||
private FilesSelectorDialog mSelector = null;
|
||||
|
||||
private RadioGroup radioGroupPathSelect = null;
|
||||
|
||||
private Button btnSelectFromQQ = null;
|
||||
private Button btnSelectFromWecat = null;
|
||||
private Button btnSelectFromSdcard = null;
|
||||
private Button btnSelectFromThiz = null;
|
||||
private Button btnSelectFromMCT = null;
|
||||
private Button btnSelectFromMTools = null;
|
||||
private Button btnCovert2Bin = null;
|
||||
private Button btnCovert2Txt = null;
|
||||
|
||||
private TextView txtSelectFormAnywhere = null;
|
||||
private TextView txtShowFormatDiffrences = null;
|
||||
|
||||
private EditText edtInputSaveName = null;
|
||||
|
||||
private String mSourceFilePath = null;
|
||||
private String mSaveFileName = null;
|
||||
private String mSavePath = null;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
setContentView(R.layout.act_format_convert);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
//初始化中介者对象
|
||||
presenter = new FormatConvertPresenter();
|
||||
//绑定视图
|
||||
presenter.attachView(this);
|
||||
|
||||
//初始化视图
|
||||
initViews();
|
||||
//初始化文件选择器
|
||||
initSelector();
|
||||
//初始化动作!
|
||||
initActions();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
radioGroupPathSelect = findViewById(R.id.rdoGroupDataPath);
|
||||
|
||||
btnSelectFromQQ = findViewById(R.id.btnDumpSelectFromQQ);
|
||||
btnSelectFromSdcard = findViewById(R.id.btnDumpSelectFromSdcard);
|
||||
btnSelectFromWecat = findViewById(R.id.btnDumpSelectFromWecat);
|
||||
btnSelectFromThiz = findViewById(R.id.btnDumpSelectFromThis);
|
||||
btnSelectFromMCT = findViewById(R.id.btnDumpSelectFromMCT);
|
||||
btnSelectFromMTools = findViewById(R.id.btnDumpSelectFromMTools);
|
||||
btnCovert2Bin = findViewById(R.id.btnConvert2Bin);
|
||||
btnCovert2Txt = findViewById(R.id.btnConvert2Txt);
|
||||
|
||||
TextView txtSaveToAnywhere = findViewById(R.id.txtSaveToAnywhere);
|
||||
txtSelectFormAnywhere = findViewById(R.id.txtSelectFormAnywhere);
|
||||
txtShowFormatDiffrences = findViewById(R.id.txtShowFormatDiffences);
|
||||
|
||||
edtInputSaveName = findViewById(R.id.edtInputFileName);
|
||||
|
||||
Toolbar mToolbar = findViewById(R.id.toolbar_act_format_convert);
|
||||
mToolbar.setTitle(R.string.title_format_convert);
|
||||
setSupportActionBar(mToolbar);
|
||||
}
|
||||
|
||||
private void initActions() {
|
||||
btnSelectFromThiz.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelector.setPathOnLoad(Paths.DUMP_DIRECTORY);
|
||||
initSourceFileSelector();
|
||||
}
|
||||
});
|
||||
btnSelectFromSdcard.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelector.setPathOnLoad(Paths.EXTERNAL_STORAGE_DIRECTORY);
|
||||
initSourceFileSelector();
|
||||
}
|
||||
});
|
||||
btnSelectFromQQ.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelector.setPathOnLoad(Paths.QQ_DIRECTORY);
|
||||
initSourceFileSelector();
|
||||
}
|
||||
});
|
||||
btnSelectFromWecat.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelector.setPathOnLoad(Paths.WECAT_DIRECTORY);
|
||||
initSourceFileSelector();
|
||||
}
|
||||
});
|
||||
btnSelectFromMCT.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelector.setPathOnLoad(Paths.MCT_DUMP_DIRECTORY);
|
||||
initSourceFileSelector();
|
||||
}
|
||||
});
|
||||
btnSelectFromMTools.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelector.setPathOnLoad(Paths.MTools_PATH);
|
||||
initSourceFileSelector();
|
||||
}
|
||||
});
|
||||
btnCovert2Bin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkSavePath();
|
||||
if (mSourceFilePath == null) {
|
||||
showToast(getString(R.string.tisp_select_convert_target));
|
||||
return;
|
||||
}
|
||||
if (mSaveFileName == null || mSavePath == null) {
|
||||
showToast(getString(R.string.tisp_select_convert_save_path));
|
||||
return;
|
||||
}
|
||||
mType = 0;
|
||||
presenter.convert2Bin(mSourceFilePath);
|
||||
}
|
||||
});
|
||||
btnCovert2Txt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkSavePath();
|
||||
if (mSourceFilePath == null) {
|
||||
showToast(getString(R.string.tisp_select_convert_target));
|
||||
return;
|
||||
}
|
||||
if (mSaveFileName == null || mSavePath == null) {
|
||||
showToast(getString(R.string.tisp_select_convert_save_path));
|
||||
return;
|
||||
}
|
||||
mType = 1;
|
||||
presenter.convert2Txt(mSourceFilePath);
|
||||
}
|
||||
});
|
||||
|
||||
txtShowFormatDiffrences.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new AlertDialog.Builder(FormatCovertActivity.this).setTitle("Format distinction")
|
||||
.setMessage("1.Binary file is a general tag data format, which is the same as\". dump\", and compatible with most software.\n2.The tag data format in text format. is easy to view and can also be used in standard MCT programs.").show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initSelector() {
|
||||
FilesSelectorDialog.Builder builder = new FilesSelectorDialog.Builder(this);
|
||||
builder.setTitle(R.string.title_file_select)
|
||||
.setCancelable(false)
|
||||
.setCanMultiple(false)
|
||||
.setPathOnLoad(Paths.DUMP_DIRECTORY);
|
||||
mSelector = builder.create();
|
||||
}
|
||||
|
||||
private void checkSavePath() {
|
||||
String path = Commons.getCustomerPath(radioGroupPathSelect);
|
||||
String name = edtInputSaveName.getText().toString();
|
||||
if (!StringUtil.isEmpty(name)) {
|
||||
//非空文件名。检查是否有/字符,有则为非法!
|
||||
if (name.contains("/")) {
|
||||
return;
|
||||
}
|
||||
//进行最终的拼接!
|
||||
mSavePath = path;
|
||||
mSaveFileName = name;
|
||||
} else {
|
||||
// FIXME: 2019/5/31 修复空指针闪退!
|
||||
if (mSourceFilePath != null) {
|
||||
File file = new File(mSourceFilePath);
|
||||
mSavePath = file.getParent();
|
||||
mSaveFileName = file.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initSourceFileSelector() {
|
||||
mSelector.setCanGetPath(false);
|
||||
mSelector.setOnSelectListener(new FilesSelectorDialog.OnSelectListener() {
|
||||
@Override
|
||||
public void selected(File file) {
|
||||
mSourceFilePath = file.getAbsolutePath();
|
||||
txtSelectFormAnywhere.setText((getString(R.string.res) + file.getName()));
|
||||
showToast(getString(R.string.success));
|
||||
}
|
||||
});
|
||||
mSelector.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
//销毁视图绑定!
|
||||
presenter.detachView();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConvertSucess(byte[] result) {
|
||||
//判断结果有效性!
|
||||
if (result == null) {
|
||||
showToast(getString(R.string.tips_convert_result_null));
|
||||
return;
|
||||
}
|
||||
if (mSavePath == null) {
|
||||
showToast(getString(R.string.tips_convert_save_path_null));
|
||||
return;
|
||||
}
|
||||
if (mSaveFileName == null) {
|
||||
showToast(getString(R.string.tips_convert_save_name_null));
|
||||
return;
|
||||
}
|
||||
switch (mType) {
|
||||
case 0:
|
||||
presenter.save2BIN(result, mSavePath, mSaveFileName);
|
||||
break;
|
||||
case 1:
|
||||
presenter.save2TXT(result, mSavePath, mSaveFileName);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConvertFail(String errorMsg) {
|
||||
showToast(errorMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveSuccess() {
|
||||
showToast(getString(R.string.success));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveFail(String msg) {
|
||||
if (msg != null)
|
||||
runOnUiThread(() -> {
|
||||
showToast(msg);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showToast(String msg) {
|
||||
runOnUiThread(() -> {
|
||||
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showDialog(String title, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideDialog() {
|
||||
}
|
||||
}
|
||||
@@ -90,9 +90,7 @@ public class Proxmark3FirmwareActivity extends BaseActivity implements DevCallba
|
||||
|
||||
proDialog1 = new ProDialog1(context);
|
||||
|
||||
if (!Commons.isElfDecompressed()) {
|
||||
Proxmark3Installer.installIfNeed(this, null);
|
||||
}
|
||||
Proxmark3Installer.installIfNeed(this, null);
|
||||
|
||||
initViews();
|
||||
initActions();
|
||||
|
||||
@@ -12,13 +12,9 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.proxgrind.pm3flasher.Proxmark3Flasher;
|
||||
|
||||
import cn.rrg.rdv.R;
|
||||
import cn.rrg.rdv.activities.tools.DumpEqualActivity;
|
||||
import cn.rrg.rdv.activities.tools.DumpListActivity;
|
||||
import cn.rrg.rdv.activities.tools.FileListActivity;
|
||||
import cn.rrg.rdv.activities.tools.FormatCovertActivity;
|
||||
import cn.rrg.rdv.activities.tools.KeyFileListActivity;
|
||||
import cn.rrg.rdv.activities.tools.Proxmark3FirmwareActivity;
|
||||
import cn.rrg.rdv.fragment.base.BaseFragment;
|
||||
@@ -28,8 +24,6 @@ public class ToolsAccessFragment
|
||||
|
||||
private Button btnDataEditor = null;
|
||||
private Button btnKeyEditor = null;
|
||||
private Button btnFormatCovert = null;
|
||||
private Button btnDiffTools = null;
|
||||
private Button btnPM3Flasher;
|
||||
|
||||
@Nullable
|
||||
@@ -49,8 +43,6 @@ public class ToolsAccessFragment
|
||||
private void initViews(View view) {
|
||||
btnDataEditor = view.findViewById(R.id.btnDumpEditor);
|
||||
btnKeyEditor = view.findViewById(R.id.btnKeyEditor);
|
||||
btnFormatCovert = view.findViewById(R.id.btnConvertFormat);
|
||||
btnDiffTools = view.findViewById(R.id.btnDiffTool);
|
||||
btnPM3Flasher = view.findViewById(R.id.btnPM3Flasher);
|
||||
}
|
||||
|
||||
@@ -59,10 +51,6 @@ public class ToolsAccessFragment
|
||||
startActivity(new Intent(context, DumpListActivity.class).putExtra("mode", DumpListActivity.MODE.EDIT));
|
||||
});
|
||||
|
||||
btnDiffTools.setOnClickListener(v -> startActivity(new Intent(context, DumpEqualActivity.class)));
|
||||
|
||||
btnFormatCovert.setOnClickListener(v -> startActivity(new Intent(context, FormatCovertActivity.class)));
|
||||
|
||||
btnKeyEditor.setOnClickListener(v -> startActivity(
|
||||
new Intent(context, KeyFileListActivity.class).putExtra("mode", FileListActivity.MODE.EDIT))
|
||||
);
|
||||
|
||||
@@ -20,16 +20,15 @@ public class InitUtil {
|
||||
public static final String LOG_TAG = InitUtil.class.getSimpleName();
|
||||
|
||||
public static void initApplicationResource(Context context) {
|
||||
AssetsUtil au = new AssetsUtil(context);
|
||||
File dump_dir = new File(Paths.DUMP_DIRECTORY);
|
||||
if (!dump_dir.exists()) {
|
||||
if (!dump_dir.mkdirs()) {
|
||||
Log.d(LOG_TAG, "init dumps dir fail!");
|
||||
} else {
|
||||
initDumpFile(au);
|
||||
initDumpFile(context);
|
||||
}
|
||||
} else {
|
||||
initDumpFile(au);
|
||||
initDumpFile(context);
|
||||
}
|
||||
File driver_dir = new File(Paths.DRIVER_DIRECTORY);
|
||||
if (!driver_dir.exists()) {
|
||||
@@ -42,20 +41,20 @@ public class InitUtil {
|
||||
if (!keys_dir.mkdirs()) {
|
||||
Log.d(LOG_TAG, "init keys dir fail!");
|
||||
} else {
|
||||
initKeysFile(au);
|
||||
initKeysFile(context);
|
||||
}
|
||||
} else {
|
||||
initKeysFile(au);
|
||||
initKeysFile(context);
|
||||
}
|
||||
File common_dir = new File(Paths.COMMON_DIRECTORY);
|
||||
if (!common_dir.exists()) {
|
||||
if (common_dir.mkdirs()) {
|
||||
initCommonInFile();
|
||||
initMfInfoMapsFile(au);
|
||||
initMfInfoMapsFile(context);
|
||||
}
|
||||
} else {
|
||||
initCommonInFile();
|
||||
initMfInfoMapsFile(au);
|
||||
initMfInfoMapsFile(context);
|
||||
}
|
||||
File pn53x_dir = new File(Paths.PN53X_DIRRECTORY);
|
||||
if (!pn53x_dir.exists()) {
|
||||
@@ -71,11 +70,11 @@ public class InitUtil {
|
||||
if (!pm3_dir.mkdirs()) {
|
||||
Log.d(LOG_TAG, "init pm3 dir fail!");
|
||||
} else {
|
||||
initEasyButtonFile(au);
|
||||
initEasyButtonFile(context);
|
||||
initPM3ForwardFile();
|
||||
}
|
||||
} else {
|
||||
initEasyButtonFile(au);
|
||||
initEasyButtonFile(context);
|
||||
initPM3ForwardFile();
|
||||
}
|
||||
Commons.updatePM3Cwd();
|
||||
@@ -95,45 +94,45 @@ public class InitUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static void initMfInfoMapsFile(AssetsUtil au) {
|
||||
private static void initMfInfoMapsFile(Context context) {
|
||||
File f1 = new File(Paths.COMMON_DIRECTORY + "/" + "template_mifare_info_en.html");
|
||||
File f2 = new File(Paths.COMMON_DIRECTORY + "/" + "template_tag_info_en.html");
|
||||
|
||||
//移动两个标签信息HTML文件到指定目录!
|
||||
au.copyFile("template_mifare_info_en.html",
|
||||
AssetsUtil.copyFile(context, "template_mifare_info_en.html",
|
||||
new File(Paths.COMMON_DIRECTORY + "/" + "template_mifare_info_en.html").getAbsolutePath());
|
||||
au.copyFile("template_tag_info_en.html",
|
||||
AssetsUtil.copyFile(context, "template_tag_info_en.html",
|
||||
new File(Paths.COMMON_DIRECTORY + "/" + "template_tag_info_en.html").getAbsolutePath());
|
||||
}
|
||||
|
||||
private static void initDumpFile(AssetsUtil au) {
|
||||
private static void initDumpFile(Context context) {
|
||||
File target = new File(Paths.DEFAULT_DUMP_FILE);
|
||||
//目标文件夹里是否有这个文件!
|
||||
if (!(target.exists() && target.isFile())) {
|
||||
//包里面是否有这个资源文件!
|
||||
if (au.copyFile(Paths.DEFAULT_DUMP_NAME, Paths.DEFAULT_DUMP_FILE)) {
|
||||
if (AssetsUtil.copyFile(context, Paths.DEFAULT_DUMP_NAME, Paths.DEFAULT_DUMP_FILE)) {
|
||||
Log.d(LOG_TAG, "创建默认的空白数据文件成功!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void initKeysFile(AssetsUtil au) {
|
||||
private static void initKeysFile(Context context) {
|
||||
File target = new File(Paths.DEFAULT_KEYS_FILE);
|
||||
//目标文件夹里是否有这个文件!
|
||||
if (!(target.exists() && target.isFile())) {
|
||||
//包里面是否有这个资源文件!
|
||||
if (au.copyFile(Paths.DEFAULT_KEYS_NAME, Paths.DEFAULT_KEYS_FILE)) {
|
||||
if (AssetsUtil.copyFile(context, Paths.DEFAULT_KEYS_NAME, Paths.DEFAULT_KEYS_FILE)) {
|
||||
Log.d(LOG_TAG, "创建默认的空白数据文件成功!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void initEasyButtonFile(AssetsUtil au) {
|
||||
private static void initEasyButtonFile(Context context) {
|
||||
File target = new File(Paths.PM3_CMD_FILE);
|
||||
//目标文件夹里是否有这个文件!
|
||||
if (!(target.exists() && target.isFile())) {
|
||||
//包里面是否有这个资源文件!
|
||||
if (au.copyFile(Paths.DEFAULT_CMD_NAME, Paths.PM3_CMD_FILE)) {
|
||||
if (AssetsUtil.copyFile(context, Paths.DEFAULT_CMD_NAME, Paths.PM3_CMD_FILE)) {
|
||||
Log.d(LOG_TAG, "创建默认的动态按钮文件成功!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,15 +3,45 @@ package cn.rrg.rdv.util;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
|
||||
import com.termux.app.TermuxService;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.dxl.common.util.AssetsUtil;
|
||||
import cn.dxl.common.util.FileUtils;
|
||||
import cn.dxl.common.util.LogUtils;
|
||||
import cn.rrg.rdv.R;
|
||||
|
||||
public class Proxmark3Installer {
|
||||
static String zipName = "proxmark3.zip";
|
||||
static String verName = "pm3_version.txt";
|
||||
static String zipFile = TermuxService.HOME_PATH + File.separator + zipName;
|
||||
static String verFile = TermuxService.HOME_PATH + File.separator + verName;
|
||||
|
||||
public static boolean isCanInstall(Context context) {
|
||||
try {
|
||||
String version_assets = AssetsUtil.readLines(context, verName);
|
||||
|
||||
// read version for res installed
|
||||
String version_installed = FileUtils.readLine(new File(verFile));
|
||||
// check version
|
||||
if (version_installed.length() == 0) {
|
||||
// no file found or file have some problem, we need reinstall
|
||||
return true;
|
||||
}
|
||||
if (version_installed.equals(version_assets)) {
|
||||
// if version same, we can stop install
|
||||
LogUtils.d("Proxmark3Installer->installIfNeed(): version same, we can stop install.");
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Install the pm3 client and resource if need!
|
||||
@@ -29,10 +59,23 @@ public class Proxmark3Installer {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String zipName = "proxmark3.zip";
|
||||
String zipFile = TermuxService.HOME_PATH + File.separator + zipName;
|
||||
new AssetsUtil(activity).copyFile(zipName, zipFile);
|
||||
try {
|
||||
if (!isCanInstall(activity)) {
|
||||
if (whenDone != null) activity.runOnUiThread(whenDone);
|
||||
progress.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
// before install, we need delete all old res
|
||||
FileUtils.delete(new File(TermuxService.HOME_PATH));
|
||||
// and recreate path
|
||||
FileUtils.createPaths(new File(TermuxService.HOME_PATH));
|
||||
|
||||
// copy zip file from apk to local
|
||||
AssetsUtil.copyFile(activity, zipName, zipFile);
|
||||
AssetsUtil.copyFile(activity, verName, verFile);
|
||||
|
||||
// unzip to home path
|
||||
ZipUtils.UnZipFolder(zipFile, TermuxService.HOME_PATH, new ZipUtils.Progress() {
|
||||
@Override
|
||||
public void onProgress(int max, int current, String file) {
|
||||
@@ -45,37 +88,49 @@ public class Proxmark3Installer {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
LogUtils.d("PM3 Resource install finish.");
|
||||
|
||||
} catch (Exception e) {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AlertDialog.Builder(activity)
|
||||
.setTitle(R.string.error)
|
||||
.setMessage(e.getMessage())
|
||||
.show();
|
||||
activity.runOnUiThread(() -> {
|
||||
try {
|
||||
progress.dismiss();
|
||||
} catch (RuntimeException e) {
|
||||
// Activity already dismissed - ignore.
|
||||
}
|
||||
});
|
||||
if (whenDone != null)
|
||||
whenDone.run();
|
||||
}
|
||||
});
|
||||
showDialogOnErr(activity, progress, e.getMessage(), whenDone);
|
||||
e.printStackTrace();
|
||||
}
|
||||
showDialogOnOk(activity, progress);
|
||||
if (whenDone != null) activity.runOnUiThread(whenDone);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
// show dialog if task execute success
|
||||
public static void showDialogOnOk(Activity activity, ProgressDialog dialog) {
|
||||
activity.runOnUiThread(() -> {
|
||||
try {
|
||||
dialog.dismiss();
|
||||
} catch (RuntimeException e) {
|
||||
// Activity already dismissed - ignore.
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// show dialog if has err
|
||||
public static void showDialogOnErr(Activity activity, ProgressDialog dialog, String errMsg, Runnable call) {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AlertDialog.Builder(activity)
|
||||
.setTitle(R.string.error)
|
||||
.setMessage(errMsg)
|
||||
.show();
|
||||
activity.runOnUiThread(() -> {
|
||||
try {
|
||||
progress.dismiss();
|
||||
dialog.dismiss();
|
||||
} catch (RuntimeException e) {
|
||||
// Activity already dismissed - ignore.
|
||||
}
|
||||
});
|
||||
if (whenDone != null)
|
||||
activity.runOnUiThread(whenDone);
|
||||
if (call != null)
|
||||
call.run();
|
||||
}
|
||||
}).start();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package cn.rrg.rdv.util;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
@@ -14,6 +15,8 @@ import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import cn.dxl.common.util.LogUtils;
|
||||
|
||||
/**
|
||||
* @author: lijuan
|
||||
* @description: 解压ZIP文件
|
||||
@@ -225,4 +228,32 @@ public class ZipUtils {
|
||||
inZip.close();
|
||||
return fileList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author dxl
|
||||
* read a file from zip file(no unzip)
|
||||
*/
|
||||
public static String readZipFile(File zipFile, String readFileName) throws Exception {
|
||||
ZipFile zf = new ZipFile(zipFile);
|
||||
InputStream in = new BufferedInputStream(new FileInputStream(zipFile));
|
||||
ZipInputStream zin = new ZipInputStream(in);
|
||||
ZipEntry ze;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((ze = zin.getNextEntry()) != null) {
|
||||
LogUtils.d("项目名: " + ze.getName());
|
||||
if (!ze.isDirectory()) {
|
||||
if (ze.getName().contains(readFileName)) {
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
|
||||
while ((line = br.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
br.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
zin.closeEntry();
|
||||
in.close();
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,52 +63,6 @@
|
||||
android:text="@string/title_pm3_firmware_flasher"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDiffTool"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/btn_selectot_white"
|
||||
android:gravity="start|center"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/data_diff"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnUnionKeyEditor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/btn_selectot_white"
|
||||
android:drawableEnd="@drawable/main_union_key"
|
||||
android:gravity="start|center"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/union_keys"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnConvertFormat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/btn_selectot_white"
|
||||
android:gravity="start|center"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/format_covert"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--选择区域!-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/md_grey_200"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="@string/tips_data_select"
|
||||
android:textColor="@color/md_grey_700"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtDumpEqualData1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableEnd="@drawable/no_1"
|
||||
android:gravity="center"
|
||||
android:maxLength="23"
|
||||
android:padding="10dp"
|
||||
android:text="@string/no_select"
|
||||
android:textColor="@color/md_blue_700" />
|
||||
|
||||
<include layout="@layout/view_v_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtDumpEqualData2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableEnd="@drawable/no_2"
|
||||
android:gravity="center"
|
||||
android:maxLength="23"
|
||||
android:padding="10dp"
|
||||
android:text="@string/no_select"
|
||||
android:textColor="@color/md_blue_700" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/file_select_init_list" />
|
||||
|
||||
<include layout="@layout/view_h_line" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--对比结果显示区域!-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/md_grey_200"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="@string/diff_result"
|
||||
android:textColor="@color/md_grey_700"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtShowEqualMsg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:text="@string/diff_result_no"
|
||||
android:textColor="@color/md_blue_700" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lvShowEqualResult"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@null" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,192 +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"
|
||||
style="@style/AppTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar_act_format_convert"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/toolbarStyle"
|
||||
app:popupTheme="@style/popMenuStyle">
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtSelectFormAnywhere"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/md_grey_100"
|
||||
android:text="@string/format_convert_from_where" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/md_grey_200" />
|
||||
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:columnCount="3">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDumpSelectFromQQ"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:drawableTop="@drawable/qq"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/QQ"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDumpSelectFromWecat"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:drawableTop="@drawable/wechat"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/wechat"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDumpSelectFromThis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:drawableTop="@drawable/nfctools"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/app"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDumpSelectFromMCT"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:drawableTop="@drawable/mct"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/mct"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDumpSelectFromSdcard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:drawableTop="@drawable/sdcard"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="Sdacrd"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDumpSelectFromMTools"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:drawableTop="@drawable/mtools"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="MTools"
|
||||
android:textAllCaps="false"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@color/md_grey_200" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtSaveToAnywhere"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/md_grey_100"
|
||||
android:text="@string/format_convert_to_where" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/md_grey_200" />
|
||||
|
||||
<include layout="@layout/file_select_init_list" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtInputFileName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/format_convert_file_name_input" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@color/md_grey_200" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/format_convert_file_what_fromat" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/md_grey_200" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnConvert2Bin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="false"
|
||||
android:text="@string/format_bin" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnConvert2Txt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="false"
|
||||
android:text="@string/format_txt" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@color/md_grey_200" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtShowFormatDiffences"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/md_grey_100"
|
||||
android:gravity="right"
|
||||
android:padding="16dp"
|
||||
android:text="@string/format_between"
|
||||
android:textColor="#1E87E4" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -330,5 +330,6 @@
|
||||
<string name="tips_plz_wait">请稍等</string>
|
||||
<string name="select">select</string>
|
||||
<string name="title_pm3_home">Proxmark3 External Work Directory</string>
|
||||
<string name="tips_pm3_res_err">The version for proxmark3 resource read failed.</string>
|
||||
|
||||
</resources>
|
||||
@@ -336,5 +336,6 @@
|
||||
<string name="tips_plz_wait">请稍等。</string>
|
||||
<string name="select">选择</string>
|
||||
<string name="title_pm3_home">Proxmark3 外部工作目录</string>
|
||||
<string name="tips_pm3_res_err">读取PM3的资源版本失败</string>
|
||||
|
||||
</resources>
|
||||
@@ -329,5 +329,6 @@
|
||||
<string name="tips_plz_wait">Please wait.</string>
|
||||
<string name="select">select</string>
|
||||
<string name="title_pm3_home">Proxmark3 External Work Directory</string>
|
||||
<string name="tips_pm3_res_err">The version for proxmark3 resource read failed.</string>
|
||||
|
||||
</resources>
|
||||
@@ -21,12 +21,13 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.github.xianglin1998:mfkey:1.1'
|
||||
implementation 'com.github.xianglin1998:nfctag:1.0'
|
||||
|
||||
implementation 'com.github.felHR85:UsbSerial:6.1.0'
|
||||
|
||||
implementation 'com.github.xianglin1998:ComBridge:1.0.7'
|
||||
// implementation project(path: ':iobridges')
|
||||
implementation project(path: ':iobridges')
|
||||
implementation project(path: ':mfkey')
|
||||
implementation project(path: ':nfctag')
|
||||
implementation project(path: ':iobridges')
|
||||
|
||||
implementation project(path: ':utils')
|
||||
implementation project(path: ':communication')
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user