YYHD-工作中一些总结(4)
2017-08-15 14:07
155 查看
1.可以更新内存的Code
2.AndroidStudio 多渠道配置
apply plugin: 'com.android.application'
android {
signingConfigs {
SignConfig {
keyAlias 'iplay'
keyPassword 'passwd11'
storeFile file('release.keystore')
storePassword 'passwd11'
}
}
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.gameassist.plugin.wedo1.DeathMoto4"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0.1"
}
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.SignConfig
manifestPlaceholders = [mylabel: "暴力摩托4-release"]
}
debug {
manifestPlaceholders = [mylabel: "暴力摩托4-debug"]
}
}
flavorDimensions "default"
productFlavors {
disheng {
applicationId "com.gameassist.plugin.wedo1.DeathMoto4.disheng"
dimension "default"
}
}
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "plugins-${variant.flavorName}-${variant.buildType.name}-v${variant.versionCode}-暴力摩托4.apk".toLowerCase()
}
}
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile project(':jni')
provided files('libs/pluginInterface.jar')
compile(name: 'frank-c-release', ext: 'aar')
// compile 'com.yyhd.mini.program.frank:franksdk:1.0.2'
}
//change so memory data int test[]={0xE3A0045D,0xE2800973,0xE2800E87,0xE2800005}; int *temp=(int *)(baseA+0xe22e90); size_t pagesize = sysconf(_SC_PAGESIZE); // Calculate start and end addresses for the write. uintptr_t start = (uintptr_t) temp ; uintptr_t end = start + 1024; // Calculate start of page for mprotect. uintptr_t pagestart = start & -pagesize; if( !mprotect((void *) pagestart, end - pagestart,PROT_READ | PROT_WRITE | PROT_EXEC) ) { for(int i=0; i<4; i++){ temp[i]=test[i]; // LogD("my_<%s>, data = %x",__FUNCTION__, temp[i]); } } #define GETLR(store_lr) \ __asm__ __volatile__( \ "mov %0, lr\n\t" \ : "=r"(store_lr) \ ) unsigned lr; GETLR(lr); const-string v0, "hook_log" invoke-static {v0, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I void keepSoData(){ FILE *pFile=fopen(SoPath,"r"); //获取文件的指针 if(pFile==NULL){ __android_log_print(ANDROID_LOG_INFO, "native_hook__dump", "SoPath is null"); return ; } char *pBuf; //定义文件指针 fseek(pFile,0,SEEK_END); //把指针移动到文件的结尾 ,获取文件长度 int len=ftell(pFile); //获取文件长度 pBuf=(char *)malloc(len+1); //new char[len+1]; //定义数组长度 memset(pBuf,0,len+1); rewind(pFile); //把指针移动到文件开头 因为我们一开始把指针移动到结尾,如果不移动回来 会出错 fread(pBuf,len,1,pFile); //读文件 pBuf[len]=0; //把读到的文件最后一位 写为0 要不然系统会一直寻找到0后才结束 //显示读到的数据 fclose(pFile); // 关闭文件 FILE *fp; // 定义一个文件指针fp fp = fopen("/sdcard/dump_xqm.so", "wb"); // 以二进制可写方式打开stu.dat文件 if(fp==NULL){ __android_log_print(ANDROID_LOG_INFO, "native_hook__dump", "SoPath is null"); return; } int i=0; fwrite (pBuf , sizeof(char), len, fp); fclose (fp); free(pBuf); } public static void test(){ Exception e = new Exception("this is a log"); StackTraceElement[] elements=e.getStackTrace(); StringBuilder sb=new StringBuilder(); for(int i=0; i
2.AndroidStudio 多渠道配置
apply plugin: 'com.android.application'
android {
signingConfigs {
SignConfig {
keyAlias 'iplay'
keyPassword 'passwd11'
storeFile file('release.keystore')
storePassword 'passwd11'
}
}
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.gameassist.plugin.wedo1.DeathMoto4"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0.1"
}
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.SignConfig
manifestPlaceholders = [mylabel: "暴力摩托4-release"]
}
debug {
manifestPlaceholders = [mylabel: "暴力摩托4-debug"]
}
}
flavorDimensions "default"
productFlavors {
disheng {
applicationId "com.gameassist.plugin.wedo1.DeathMoto4.disheng"
dimension "default"
}
}
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "plugins-${variant.flavorName}-${variant.buildType.name}-v${variant.versionCode}-暴力摩托4.apk".toLowerCase()
}
}
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile project(':jni')
provided files('libs/pluginInterface.jar')
compile(name: 'frank-c-release', ext: 'aar')
// compile 'com.yyhd.mini.program.frank:franksdk:1.0.2'
}
相关文章推荐
- YYHD-工作中一些总结(3)
- YYHD-工作中一些总结(5)
- YYHD-工作中一些总结(1)
- YYHD-工作中一些总结(2)
- 旷视科技(Face++)和孙剑博士近期一些研究工作总结
- 工作中一些细小的经验总结
- 一些工作总结
- 工作一些C++总结
- 工作内容的一些总结
- f在工作中遇到的一些问题及总结(f的第一篇博客)
- 工作总结(四)SSH一些总结
- 年中总结:一些工作和技术相关的想法
- 工作中一些细小的经验总结
- 今天这篇文章给了一些推荐方面的思路 —— 要整理总结推荐方面的工作了
- 工作中棋牌麻将的总结一些术语(1)
- 【MySQL】个人工作中的一些使用总结(1)
- 半年工作总结&&09年的一些想法
- 关于工作的一些总结
- 一周工作总结--左连接造成的一些问题
- 总结C#中得到程序当前工作目录和执行目录的一些方法