Skip to content

Commit 3354b97

Browse files
authored
Merge pull request #58 from xianglin1998/master
PM3 res updated.
2 parents e5e7f69 + 1cefde1 commit 3354b97

File tree

132 files changed

+8302
-1586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+8302
-1586
lines changed

app_main/build.gradle

+5-9
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,11 @@ dependencies {
5252

5353
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'
5454

55-
// This my project maven from github release!
56-
implementation 'com.github.xianglin1998:IORedirector:1.0'
57-
implementation 'com.github.xianglin1998:Crapto1:1.3'
58-
implementation 'com.github.xianglin1998:nfctag:1.0'
59-
implementation 'com.github.xianglin1998:nfc_console:1.0'
60-
61-
implementation 'com.github.xianglin1998:ComBridge:1.0.7'
62-
// implementation project(path: ':iobridges')
55+
implementation project(path: ':iobridges')
56+
implementation project(path: ':crapto1')
57+
implementation project(path: ':nfctag')
58+
implementation project(path: ':console')
59+
implementation project(path: ':redirector')
6360

6461
implementation project(':utils')
6562
implementation project(':libnfc_pn53x')
@@ -68,7 +65,6 @@ dependencies {
6865

6966
implementation project(path: ':pm3flasher')
7067
implementation project(':pm3rdv4rrg')
71-
implementation project(path: ':xmodem')
7268

7369
// The dep from TERMUX(A FullTerminal implements.)
7470
implementation project(":termux-app")

app_main/src/main/AndroidManifest.xml

-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
</activity>
3636

3737
<activity android:name=".activities.tools.KeyFileEditActivity" />
38-
<activity android:name=".activities.tools.DumpEqualActivity" />
3938
<activity android:name=".activities.tools.DumpEditActivity" />
40-
<activity android:name=".activities.tools.FormatCovertActivity" />
4139
<activity android:name=".activities.tools.ChameleonSoltAliasesActivity" />
4240
<activity android:name=".activities.tools.AboutActicity" />
4341

app_main/src/main/assets/help.html

-87
This file was deleted.
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
20201026_5
2+
3+
pattern: *_*
4+
5+
frist *: date
6+
second: number
7+
8+
example: 20201026_1
9+
example: 20201026_2
10+
example: 20201027_1
-10.7 MB
Binary file not shown.

app_main/src/main/java/cn/rrg/rdv/activities/chameleon/ChameleonGUIActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import android.widget.TextView;
1919

2020
import com.iobridges.com.Communication;
21-
import com.proxgrind.xmodem.XModem128;
21+
import cn.rrg.chameleon.xmodem.XModem128;
2222

2323
import java.io.ByteArrayInputStream;
2424
import java.io.ByteArrayOutputStream;

app_main/src/main/java/cn/rrg/rdv/activities/proxmark3/rdv4_rrg/Proxmark3NewTerminalInitActivity.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
8080
box.setChecked(Commons.getAutoGoToTerminal());
8181

8282
// Must have init pm3 client and check auto go and have the terminal type selected!
83-
if (Commons.getAutoGoToTerminal()
84-
&& Commons.isPM3ClientDecompressed()
85-
&& Commons.getTerminalType() != -1) {
86-
go();
83+
if (Commons.getAutoGoToTerminal() && Commons.getTerminalType() != -1) {
84+
if (Proxmark3Installer.isCanInstall(activity)) {
85+
Proxmark3Installer.installIfNeed(activity, this::go);
86+
} else {
87+
go();
88+
}
8789
}
8890
}
8991

app_main/src/main/java/cn/rrg/rdv/activities/tools/AboutActicity.java

+1-134
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,22 @@
11
package cn.rrg.rdv.activities.tools;
22

3-
import android.content.DialogInterface;
4-
import android.content.Intent;
53
import android.content.pm.PackageInfo;
64
import android.content.pm.PackageManager;
7-
import android.net.Uri;
85
import android.os.Bundle;
6+
97
import androidx.annotation.Nullable;
10-
import androidx.appcompat.app.AlertDialog;
118

129
import android.view.View;
13-
import android.webkit.WebView;
1410
import android.widget.Button;
1511
import android.widget.TextView;
16-
import android.widget.Toast;
17-
18-
import java.io.File;
1912

20-
import cn.dxl.common.util.AppUtil;
21-
import cn.dxl.common.util.FileUtils;
22-
import cn.dxl.common.widget.FilesSelectorDialog;
2313
import cn.rrg.rdv.R;
2414
import cn.rrg.rdv.activities.main.BaseActivity;
2515
import cn.rrg.rdv.util.Commons;
26-
import cn.rrg.rdv.util.Paths;
27-
import cn.dxl.common.util.RestartUtils;
28-
import cn.dxl.common.widget.ToastUtil;
2916

3017
public class AboutActicity extends BaseActivity {
3118

32-
private TextView txtUserHelp = null;
33-
private TextView txtDisclaimer = null;
34-
private TextView txtJoinGroup = null;
35-
private TextView txtContactDev = null;
3619
private TextView txtShowVersion = null;
37-
private TextView txtSendLogFile = null;
38-
private TextView txtCleanData = null;
39-
4020
private Button btnGo2ProxgrindWebsite;
4121
private Button btnGo2RRGWebsite;
4222

@@ -51,105 +31,13 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
5131
}
5232

5333
private void initViews() {
54-
txtUserHelp = findViewById(R.id.txtUserHelp);
55-
txtDisclaimer = findViewById(R.id.txtDisclaimer);
56-
txtJoinGroup = findViewById(R.id.txtJoinQQGroup);
57-
txtContactDev = findViewById(R.id.txtContactDev);
5834
txtShowVersion = findViewById(R.id.txtShowAppVersion);
59-
txtSendLogFile = findViewById(R.id.txtSendLogFile);
60-
txtCleanData = findViewById(R.id.txtCleanData);
6135

6236
btnGo2ProxgrindWebsite = findViewById(R.id.btnGo2ProxgrindWebsite);
6337
btnGo2RRGWebsite = findViewById(R.id.btnGo2RRGWebsite);
6438
}
6539

6640
private void initActions() {
67-
txtUserHelp.setOnClickListener(new View.OnClickListener() {
68-
@Override
69-
public void onClick(View v) {
70-
//建立视图
71-
WebView wv = new WebView(AboutActicity.this);
72-
//加载文件
73-
wv.loadUrl("file:///android_asset/help.html");
74-
//加载进对话框中
75-
new AlertDialog.Builder(AboutActicity.this)
76-
.setView(wv).show();
77-
}
78-
});
79-
80-
txtDisclaimer.setOnClickListener(new View.OnClickListener() {
81-
@Override
82-
public void onClick(View v) {
83-
}
84-
});
85-
86-
txtJoinGroup.setOnClickListener(new View.OnClickListener() {
87-
@Override
88-
public void onClick(View v) {
89-
boolean result = joinQQGroup("4QQrqUHKMNZDNWLvi4kEWeEDHYMekp7x");
90-
if (!result) {
91-
Toast.makeText(AboutActicity.this, "未安装手Q或安装的版本不支持!", Toast.LENGTH_SHORT).show();
92-
}
93-
}
94-
});
95-
96-
txtContactDev.setOnClickListener(new View.OnClickListener() {
97-
@Override
98-
public void onClick(View v) {
99-
Commons.callQQ(AboutActicity.this, "64101226", new Runnable() {
100-
@Override
101-
public void run() {
102-
ToastUtil.show(context, getString(R.string.error), false);
103-
}
104-
});
105-
}
106-
});
107-
108-
txtSendLogFile.setOnClickListener(new View.OnClickListener() {
109-
@Override
110-
public void onClick(View v) {
111-
new FilesSelectorDialog.Builder(AboutActicity.this)
112-
.setPathOnLoad(Paths.LOG_DIRECTORY)
113-
.setTitle(R.string.logList)
114-
.setOnSelectListener(new FilesSelectorDialog.OnSelectListener() {
115-
@Override
116-
public void selected(File file) {
117-
FileUtils.shareFile(file);
118-
}
119-
})
120-
.create().show();
121-
}
122-
});
123-
124-
txtCleanData.setOnClickListener(new View.OnClickListener() {
125-
@Override
126-
public void onClick(View v) {
127-
new AlertDialog.Builder(AboutActicity.this)
128-
.setTitle(R.string.warning)
129-
.setMessage(R.string.tipls_clearData)
130-
.setPositiveButton(getString(R.string.clear), new DialogInterface.OnClickListener() {
131-
@Override
132-
public void onClick(DialogInterface dialog, int which) {
133-
Toast.makeText(AboutActicity.this, getString(R.string.cleaning), Toast.LENGTH_SHORT).show();
134-
FileUtils.delete(new File(Paths.TOOLS_DIRECTORY));
135-
Toast.makeText(AboutActicity.this, getString(R.string.clearFinish), Toast.LENGTH_SHORT).show();
136-
//必须重启APP
137-
RestartUtils.restartAPP(AboutActicity.this, 1000, new RestartUtils.OnExitAction() {
138-
@Override
139-
public boolean usingSystemExit() {
140-
//调用act管理器结束所有的活动!
141-
AppUtil.getInstance().finishAll();
142-
return false;
143-
}
144-
});
145-
AppUtil.getInstance().finishAll();
146-
}
147-
})
148-
.setNegativeButton(R.string.cancel, null)
149-
.show();
150-
}
151-
});
152-
15341
btnGo2ProxgrindWebsite.setOnClickListener(new View.OnClickListener() {
15442
@Override
15543
public void onClick(View v) {
@@ -177,27 +65,6 @@ private void showVersion() {
17765
}
17866
}
17967

180-
/****************
181-
*
182-
* 发起添加群流程。群号:NFC PN532 计算机 单片机(573359551) 的 key 为: 4QQrqUHKMNZDNWLvi4kEWeEDHYMekp7x
183-
* 调用 joinQQGroup(4QQrqUHKMNZDNWLvi4kEWeEDHYMekp7x) 即可发起手Q客户端申请加群 NFC PN532 计算机 单片机(573359551)
184-
*
185-
* @param key 由官网生成的key
186-
* @return 返回true表示呼起手Q成功,返回fals表示呼起失败
187-
******************/
188-
public boolean joinQQGroup(String key) {
189-
Intent intent = new Intent();
190-
intent.setData(Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D" + key));
191-
// 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
192-
try {
193-
startActivity(intent);
194-
return true;
195-
} catch (Exception e) {
196-
// 未安装手Q或安装的版本不支持
197-
return false;
198-
}
199-
}
200-
20168
@Override
20269
protected void onDestroy() {
20370
super.onDestroy();

0 commit comments

Comments
 (0)