混淆
加固
https
检测wifi代理
/** * 检测是否使用了代理 * @return */ public static boolean checkIsProxy(){ String host = System.getProperty("http.proxyHost"); String port = System.getProperty("http.proxyPort"); if (port == null) { port = "-1"; } int p = Integer.parseInt(port); if(!TextUtils.isEmpty(host)&&p!=-1){ return true; } return false; }
检测是否手机是否root
package com.bianyi.toufang.util; import android.content.Context; import android.content.pm.PackageManager; import java.io.BufferedReader; import java.io.File; import java.io.InputStreamReader; public class RootUtils { public static boolean isDeviceRooted(Context context) { return checkRootMethod1() || checkRootMethod2() || checkRootMethod3()||checkRootMethod4(context); } private static boolean checkRootMethod1() { String buildTags = android.os.Build.TAGS; return buildTags != null && buildTags.contains("test-keys"); } private static boolean checkRootMethod2() { String[] paths = { "/system/app/Superuser.apk", "/sbin/su", "/system/bin/su", "/system/xbin/su", "/data/local/xbin/su", "/data/local/bin/su", "/system/sd/xbin/su", "/system/bin/failsafe/su", "/data/local/su", "/su/bin/su"}; for (String path : paths) { if (new File(path).exists()) return true; } return false; } private static boolean checkRootMethod3() { Process process = null; try { process = Runtime.getRuntime().exec(new String[] { "/system/xbin/which", "su" }); BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())); if (in.readLine() != null) return true; return false; } catch (Throwable t) { return false; } finally { if (process != null) process.destroy(); } } public static boolean checkRootMethod4(Context context) { return isPackageInstalled("eu.chainfire.supersu", context); } private static boolean isPackageInstalled(String packagename, Context context) { PackageManager pm = context.getPackageManager(); try { pm.getPackageInfo(packagename, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } } }
检测xposed
接口aes,rsa加密,header,token机制等(需后端配合)
检测调试模式等
签名校验防止二次打包
本文为Adamin90原创文章,转载无需和我联系,但请注明来自http://www.lixiaopeng.top
你的糖罐呢:大佬
2019-09-18 17:54:57 回复