安卓常见运行时函数原型表

Runtime Function: float __addsf3 (float a, float b)
Runtime Function: double __adddf3 (double a, double b)
Runtime Function: long double __addtf3 (long double a, long double b)
Runtime Function: long double __addxf3 (long double a, long double b)
These functions return the sum of a and b.

Runtime Function: float … Read More

安卓反调试笔记

USB调试模式检测
int adb = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 0);

Settings.Secure.ADB_ENABLED was deprecated in API level 17. Instead, use

Settings.Global.getInt(context.getContentResolver(), Settings.Global.ADB_ENABLED, 0)  

Read More

Android 程序中卸载其它App的几种方法

1. 直接使用Intent卸载

//android自带了一个安装程序---/system/app/PackageInstaller.apk.
//大多数情况下,我们手机上安装应用都是通过这个apk来安装
Uri uri = Uri.fromParts("package", "com.example.demo", null);
Intent intent = new Intent(Intent.ACTION_DELETE, uri);
startActivity(intent);

2. 通过pm命令方式实现静默卸载

//pm命令可以通过adb在shell中执行,同样,我们可以通过代码来执行
public static String execCommand(String... command) {
    Process process = null;
    InputStream errIs = null;
    InputStream inIs = null;
    String result = "";
    try {
        process = new ProcessBuilder().command(command).start();
        ByteArrayOutputStream baos 
Read More