一、查看自己的应用签名:
首先在Terminal控制台中,输入:keytool -list -keystore -v -keystore + jks文件的绝对路径,
keytool -list -keystore -v -keystore C:\Users\Administrator\Desktop\test.jks
.输入密钥库命令:(这里输入的就是你设置的密码,千万别说你忘记了)
然后就可以查看指纹证书了
二、查看三方的APK签名信息:
用winrar或7-zip等压缩工具打开待查看的apk,将其中META-INF文件夹解压出来,得到其中的CERT.RSA文件(例子:CER……继续阅读 »
sharezer
6年前 (2018-06-01) 4585浏览 0评论
1个赞
一般来说,通常写法是这样的:
public class Singleton {
private static Singleton instance;
private Singleton (){}
public static Singleton getInstance() {
if (instance == null) {
instance = new Singleton();
}
return instance;
}
}
这种写法线程不安全,所以有的是加线程锁,加了之后是这样的:
pub……继续阅读 »
sharezer
6年前 (2018-05-28) 2151浏览 0评论
0个赞
做一下记录:
find /sdcard/log/crash/ -mtime +30 | xargs rm -rf
……继续阅读 »
sharezer
7年前 (2017-08-10) 2399浏览 0评论
0个赞
private YuvImage i420ToYuvImage(ByteBuffer[] yuvPlanes, int[] yuvStrides, int width, int height) {
if (yuvStrides[0] != width) {
return fastI420ToYuvImage(yuvPlanes, yuvStrides, width, height);
}
if (yuvStrides[1] != width / 2) {
return fastI420ToYuvImage(yuvPlanes, yuvSt……继续阅读 »
sharezer
7年前 (2017-07-13) 2386浏览 0评论
0个赞
pm dump【包名】| grep -A 1 android.intent.action.MAIN: | tail -1
PS:windows貌似不能使用tail
……继续阅读 »
sharezer
7年前 (2017-07-03) 2406浏览 0评论
1个赞
/**
* 通过包名获取task id,不存在为-1
*
* @param packageName
* @return
*/
public int getTaskId(String packageName) {
String result = execRootCmd("dumpsys activity | grep " + packageName);
int start = result.indexOf("TaskRecord{");
if(start > 0){
int end = result……继续阅读 »
sharezer
7年前 (2017-07-03) 3395浏览 0评论
0个赞
/**
* 返回当前的应用是否处于前台显示状态
*
* @param packageName
* @return
*/
public boolean isTopActivity(String packageName) {
String result = execRootCmd("dumpsys activity | grep \"mResumedActivity\"");
int start = result.indexOf("u0") + 3;
int end = result.indexOf("/");
Log.d(TAG, "s: " + sta……继续阅读 »
sharezer
7年前 (2017-06-02) 2794浏览 0评论
3个赞
public boolean isNumeric(String str) {
for (int i = 0; i < str.length(); i++) {
if (!Character.isDigit(str.charAt(i))) {
return false;
}
}
return true;
}
……继续阅读 »
sharezer
7年前 (2017-06-02) 2377浏览 0评论
0个赞
这里使用的是ps命令,不用root或系统权限。
public int getPid(String name) {
String cmd = ("ps | grep " + name);
String str = execRootCmd(cmd);
if (str == null || str == "" || str.length() < 1)
return -1;
else {
String[] arr = str.split("\\s+");
……继续阅读 »
sharezer
7年前 (2017-06-02) 3351浏览 0评论
5个赞
// 执行命令并且输出结果
private String execRootCmd(String cmd) {
Log.d(TAG, "cmd: " + cmd);
String result = "";
DataOutputStream dos = null;
DataInputStream dis = null;
try {
Process p = Runtime.getRuntime().exec("su");// 经过Root处理的android系统即有su命令
……继续阅读 »
sharezer
7年前 (2017-06-02) 2494浏览 0评论
2个赞