Skip to content

AsmActual利用ASM技术将合规插件会侵入到编译流程中, 插件会把App中所有系统敏感API或属性替换为SDK的收口方法 , 从而解决直接使用系统方法时面临的隐私合规问题

Peakmain/AsmActualCombat

Repository files navigation

AsmActualCombat

使用文档链接:https://github.com/Peakmain/AsmActualCombat/wiki

How To

旧版本添加方式

ASM插件依赖 Add it in your root build.gradle at the end of repositories:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "io.github.peakmain:plugin:1.1.4"
  }
}

apply plugin: "com.peakmain.plugin"

拦截事件sdk的依赖

  • Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  • Step 2. Add the dependency
	dependencies {
	       implementation 'com.github.Peakmain:AsmActualCombat:1.1.5'
	}

新版本添加方式

settings.gradle

pluginManagement {
    repositories {
        //插件依赖
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        //sdk仓库
        maven { url 'https://jitpack.io' }
    }
}

插件依赖

根目录下的build.gradle文件

plugins {
    //插件依赖和版本
    id "io.github.peakmain" version "1.1.4" apply false
}

sdk版本依赖

implementation 'com.github.Peakmain:AsmActualCombat:1.1.5'

功能介绍

ASM全埋点功能

  • AppStart事件:应用程序启动启动事件。
  • AppEnd事件:应用程序退出事件。
  • AppViewScreen事件:应用程序页面浏览事件
  • AppClick 事件:应用程序控件(View)点击事件,如:ImageView,Button,Dialog等
  • 默认包含防止多次点击事件的处理
  • 可动态设置方法对点击事件处理之前进行拦截,目前只支持对setOnClickListener进行拦截
隐私方法调用处理
  • 对调用隐私方法的方法体替换成自己的方法(支持动态替换方法)
  • 支持的方法如下 image
monitorPlugin {
    whiteList = [//设置白名单
            "com.peakmain.asmactualcombat.utils.TestUtils",
            "com.peakmain.plugin"
    ]
    methodStatus = 1//1代表方法体替换,其他都是正常情况
    enableLog=true//是否开启日志打印,默认不打印
}

辅助功能

  • 可获取方法的耗时时间
  • 打印方法的参数和返回值
  • 打印方法的Frame
  • 可动态配置是否开启插件,默认是开启

关于我

Donations

如果您觉得我的开源库帮您节省了大量的开发时间,请扫描下方的二维码随意打赏,您的支持将激励我不断前进 微信 支付宝

About

AsmActual利用ASM技术将合规插件会侵入到编译流程中, 插件会把App中所有系统敏感API或属性替换为SDK的收口方法 , 从而解决直接使用系统方法时面临的隐私合规问题

Resources

Stars

Watchers

Forks

Packages

No packages published