file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
CallJniLib/build.gradle | Gradle | apply plugin: 'com.android.library'
android {
compileSdkVersion 29
buildToolsVersion '29.0.0'
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
ndk {
// Specifies the ABI configurations of your native
// libr... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CallJniLib/src/main/cpp/calljnilib.cpp | C++ | //
// Created by 杨充 on 2023/6/16.
//
#include "calljnilib.h"
#include <jni.h>
#include <string>
#include <assert.h>
#include <android/log.h>
#include <string.h>
using namespace std;
//java路径
#define JNI_CLASS_NAME "com/yc/calljni/CallNativeLib"
static const char* TAG ="CallJniLib";
#define LOGD(fmt, args...) __androi... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CallJniLib/src/main/cpp/calljnilib.h | C/C++ Header | #include <jni.h>
//
// Created by 杨充 on 2023/6/7.
//
//约定俗成的操作是 .h 文件主要负责类成员变量和方法的声明; .cpp 文件主要负责成员变量和方法的定义。
//ida打开显示为:assume cs:yc
#define JNI_SECTION ".yc"
//#ifndef YCJNIHELPER_TESTJNILIB_H
//#define YCJNIHELPER_TESTJNILIB_H
//
//#endif //YCJNIHELPER_TESTJNILIB_H
//__cplusplus这个宏是微软自定义宏,表示是C++编译
//两个一样的函数,在c在函... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CallJniLib/src/main/java/com/yc/calljni/CallNativeLib.java | Java | package com.yc.calljni;
public class CallNativeLib {
private static CallNativeLib instance;
// Used to load the 'calljnilib' library on application startup.
static {
System.loadLibrary("calljnilib");
}
public static CallNativeLib getInstance() {
if (instance == null) {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CallJniLib/src/main/java/com/yc/calljni/HelloCallBack.java | Java | package com.yc.calljni;
import android.util.Log;
public class HelloCallBack {
String name = "HelloCallBack";
void updateName(String name) {
this.name = name;
Log.d("CallJni", "你成功调用了HelloCallBack的方法:" +name);
}
}
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/build.gradle | Gradle | apply plugin: 'com.android.library'
android {
compileSdkVersion 29
buildToolsVersion '29.0.0'
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
ndk {
// Specifies the ABI configurations of your native
// li... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/cpp/crash_dumper.cpp | C++ | #include <jni.h>
#include <string>
#include <android/log.h>
#include <fstream>
#include <map>
#include <unistd.h>
#include <unwind.h>
#include <dlfcn.h>
#include "stack_tracer.h"
JavaVM *g_vm;
#define SIGNAL_COUNT 8
static struct sigaction g_oldSigActions[SIGNAL_COUNT] = {0};
char *tombstone_file_path = NULL;
// do n... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/cpp/readelf.cpp | C++ | #include "readelf.h"
#include <elf.h>
#include <string>
#include <android/log.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"yc_testjni_readelf" ,__VA_ARGS__)
#define SEC_NAME_BUILD_ID ".note.gnu.build-id"
#if defined(__aarch64__)
#define Elf_Ehdr Elf64_Ehdr
#define Elf_Shdr Elf64_Shdr
#elif defined(__a... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/cpp/readelf.h | C/C++ Header |
#include <string>
/**
* return the buildId of shared object
*
* @param elfData so file data
* @return buildId
*/
std::string getBuildId(unsigned char *elfData);
/**
* return the buildId of shared object
*
* @param elfData so file path
* @return buildId
*/
std::string getBuildIdFromFile(const char *path);
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/cpp/stack_tracer.cpp | C++ | #include "stack_tracer.h"
#include "readelf.h"
#include <unwind.h>
#include <dlfcn.h>
#include <android/log.h>
#include <cstdio>
#include <malloc.h>
#include <fstream>
#include <ctime>
#include <map>
typedef struct TraceInfo {
int depth;
std::string result;
} BackTraceInfo;
std::map<const char *, std::string>... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/cpp/stack_tracer.h | C/C++ Header | #include <string>
void storeCallStack(std::string *result);
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/java/com/yc/crash/NativeCrashDumper.java | Java | package com.yc.crash;
import java.io.File;
public class NativeCrashDumper {
static {
//java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList
//couldn't find "libcrash_dumper.so"
System.loadLibrary("crash_dumper");
}
private static final class InstanceHolder ... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/java/com/yc/crash/NativeCrashListener.java | Java | package com.yc.crash;
public interface NativeCrashListener {
void onSignalReceived(int signal, String logPath);
}
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
CrashDumper/src/main/java/com/yc/crash/NativeHandleMode.java | Java | package com.yc.crash;
/**
* 捕获信号,记录日志后的处理方式
*/
public enum NativeHandleMode {
/**
* 什么都不做
*/
DO_NOTHING(0),
/**
* 将捕获到的SIGNAL重新抛出
*/
RAISE_ERROR(1),
/**
* 通知Java端的Callback
*/
NOTICE_CALLBACK(2);
final int mode;
NativeHandleMode(int mode) {
this.... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/build.gradle | Gradle | apply plugin: 'com.android.library'
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
// Specifies th... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/cpp/art.cpp | C++ | /*
* Copyright (c) 2017, weishu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/cpp/art.h | C/C++ Header | /*
* Copyright (c) 2017, weishu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/cpp/epic.cpp | C++ | /*
* Original Copyright 2014-2015 Marvin Wißfeld
* Modified work Copyright (c) 2017, weishu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICE... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/cpp/fake_dlfcn.cpp | C++ | // Copyright (c) 2016 avs333
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, dist... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/cpp/fake_dlfcn.h | C/C++ Header | // Copyright (c) 2016 avs333
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, dist... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/ClassUtils.java | Java | /*
* Original work Copyright (c) 2005-2008, The Android Open Source Project
* Modified work Copyright (c) 2013, rovo89 and Tungstwenty
* Modified work Copyright (c) 2015, Alibaba Mobile Infrastructure (Android) Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ex... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/DeviceCheck.java | Java | /*
* Original work Copyright (c) 2005-2008, The Android Open Source Project
* Modified work Copyright (c) 2013, rovo89 and Tungstwenty
* Modified work Copyright (c) 2015, Alibaba Mobile Infrastructure (Android) Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ex... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/Debug.java | Java | /*
* Original work Copyright (c) 2014-2015, Marvin Wißfeld
* Modified work Copyright (c) 2016, Alibaba Mobile Infrastructure (Android) Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License ... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/Logger.java | Java | package com.taobao.android.dexposed.utility;
import android.util.Log;
/**
* Created by weishu on 17/11/10.
*/
public class Logger {
private static final boolean DEBUG = Debug.DEBUG;
public static final String preFix = "epic.";
public static void i(String tag, String msg) {
if (DEBUG) {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/NeverCalled.java | Java | package com.taobao.android.dexposed.utility;
import android.util.Log;
/**
* This Class is used for get the art_quick_to_interpreter_bridge address
* Do not call this forever!!!
*/
public class NeverCalled {
private void fake(int a) {
Log.i(getClass().getSimpleName(), a + "Do not inline me!!");
}
}
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/NougatPolicy.java | Java | package com.taobao.android.dexposed.utility;
import android.content.Context;
import android.os.SystemClock;
import android.util.Log;
import java.lang.reflect.Method;
public class NougatPolicy {
private static class TraceLogger {
static void i(String tag, String msg) {
Log.i(tag, msg);
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/Platform.java | Java | /*
* Original work Copyright (c) 2016, Lody
* Modified work Copyright (c) 2016, Alibaba Mobile Infrastructure (Android) Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/Runtime.java | Java | /*
* Original work Copyright (c) 2016, Lody
* Modified work Copyright (c) 2016, Alibaba Mobile Infrastructure (Android) Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/com/taobao/android/dexposed/utility/Unsafe.java | Java | /*
* Copyright 2014-2015 Marvin Wißfeld
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/de/robv/android/xposed/DexposedBridge.java | Java | /*
* Original work Copyright (c) 2005-2008, The Android Open Source Project
* Modified work Copyright (c) 2013, rovo89 and Tungstwenty
* Modified work Copyright (c) 2015, Alibaba Mobile Infrastructure (Android) Team
* Modified work Copyright (c) 2017, weishu
*
* Licensed under the Apache License, Version 2.0 (the... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/Epic.java | Java | /*
* Copyright (c) 2017, weishu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/EpicNative.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/Trampoline.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/arch/Arm64.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/arch/Arm64_2.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/arch/ShellCode.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/arch/Thumb2.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/entry/Entry.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/entry/Entry64.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/entry/Entry64_2.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/method/ArtMethod.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
EpicJniLib/src/main/java/me/weishu/epic/art/method/Offset.java | Java | /*
* Copyright (c) 2017, weishu twsxtd@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/build.gradle | Gradle | apply plugin: 'com.android.library'
android {
compileSdkVersion 29
buildToolsVersion '29.0.0'
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
ndk {
// Specifies the ABI configurations of your native
// lib... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/androidTest/java/com/tencent/mmkv/MMKVTest.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/androidTest/java/com/tencent/mmkv/MMKVTestService.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/cpp/flutter-bridge.cpp | C++ | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2020 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/cpp/native-bridge.cpp | C++ | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/MMKV.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/MMKVContentChangeNotification.java | Java | package com.tencent.mmkv;
/**
* Inter-process content change notification.
* Triggered by any method call, such as getXXX() or setXXX() or {@link MMKV#checkContentChangedByOuterProcess()}.
*/
public interface MMKVContentChangeNotification {
/**
* Inter-process content change notification.
* Triggered ... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/MMKVContentProvider.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/MMKVHandler.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/MMKVLogLevel.java | Java | package com.tencent.mmkv;
/**
* The levels of MMKV log.
*/
public enum MMKVLogLevel {
/**
* Debug level. Not available for release/production build.
*/
LevelDebug,
/**
* Info level. The default level.
*/
LevelInfo,
/**
* Warning level.
*/
LevelWarning,
/**... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/MMKVRecoverStrategic.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/NativeBuffer.java | Java | package com.tencent.mmkv;
/**
* A native memory wrapper, whose underlying memory can be passed to another JNI method directly.
* Avoiding unnecessary JNI boxing and unboxing.
* Must be destroy manually {@link MMKV#destroyNativeBuffer}.
*/
public final class NativeBuffer {
public long pointer;
public int si... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
MmkvLib/src/main/java/com/tencent/mmkv/ParcelableMMKV.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/build.gradle | Gradle | apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.tencent.mmkvdemo"
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
buildTypes {
release {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/Baseline.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/BenchMarkBaseService.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/FakeInfo.java | Java | package com.tencent.mmkvdemo;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
public class FakeInfo implements Parcelable {
public String channelId;
public int position;
public FakeInfo() {
}
@NonNull
@Override
public String toString() {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/Info.java | Java | package com.tencent.mmkvdemo;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
class Info implements Parcelable {
public String channelId;
public int position;
public Info(String id, int pos) {
channelId = id;
position = pos;
}
@NonNull
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/MainActivity.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/MultiProcessSharedPreferences.java | Java | package com.tencent.mmkvdemo;
import android.content.BroadcastReceiver;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.Shared... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyApplication.java | Java | package com.tencent.mmkvdemo;
import android.app.Application;
import android.util.Log;
import com.getkeepsafe.relinker.ReLinker;
import com.tencent.mmkv.MMKV;
import com.tencent.mmkv.MMKVContentChangeNotification;
import com.tencent.mmkv.MMKVHandler;
import com.tencent.mmkv.MMKVLogLevel;
import com.tencent.mmkv.MMKVRe... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService_1.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/SQLiteKV.java | Java | /*
* Tencent is pleased to support the open source community by making
* MMKV available.
*
* Copyright (C) 2018 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Mmkvdemo/src/main/java/com/tencent/mmkvdemo/TestParcelable.java | Java | package com.tencent.mmkvdemo;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.LinkedList;
import java.util.List;
class TestParcelable implements Parcelable {
int iValue;
String sValue;
List<FakeInfo> list;
@Override
public void writeToParcel(Parcel parcel, int i) {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/build.gradle | Gradle | apply plugin: 'com.android.library'
android {
compileSdkVersion 29
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
//noinspection MinSdkTooLow
minSdkVersion 9
}
}
dependencies {
implemen... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/ApkLibraryInstaller.java | Java | /*
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/MissingLibraryException.java | Java | /*
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/ReLinker.java | Java | /*
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/ReLinkerInstance.java | Java | /*
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/SystemLibraryLoader.java | Java | /*
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/TextUtils.java | Java | /*
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Dynamic32Structure.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Dynamic64Structure.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Elf.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Elf32Header.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Elf64Header.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/ElfParser.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Program32Header.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Program64Header.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Section32Header.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
ReLinker/src/main/java/com/getkeepsafe/relinker/elf/Section64Header.java | Java | /**
* Copyright 2015 - 2016 KeepSafe Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SafetyJniLib/build.gradle | Gradle | apply plugin: 'com.android.library'
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
cppFlags ""
}
}
}
buildTypes {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SafetyJniLib/src/main/cpp/safetyjnilib.cpp | C++ | #include <jni.h>
#include <string>
//
// Created by 杨充 on 2023/6/7.
//
jstring ByteToHexStr(JNIEnv *env, const char *string, char *result, jsize length);
jstring ToMd5(JNIEnv *env, jbyteArray source);
jstring loadSignature(JNIEnv *env, jobject context);
extern "C"
JNIEXPORT jstring JNICALL
Java_com_yc_safetyjni_Sa... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SafetyJniLib/src/main/java/com/yc/safetyjni/SafetyJniLib.java | Java | package com.yc.safetyjni;
public class SafetyJniLib {
private static SafetyJniLib instance;
// Used to load the 'safetyjnilib' library on application startup.
static {
System.loadLibrary("safetyjnilib");
}
public static SafetyJniLib getInstance() {
if (instance == null) {
... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/build.gradle | Gradle | //plugins {id 'com.android.library'}
apply plugin: 'com.android.library'
android {
compileSdkVersion 29
// buildToolsVersion '29.0.0'
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
ndk {
// Specifies the ABI configur... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/cpp/jni_env_manager.cc | C++ | #include "jni_env_manager.h"
#include <pthread.h>
#include <cstdlib>
namespace JniInvocation {
static JavaVM *g_VM = nullptr;
static pthread_once_t g_onceInitTls = PTHREAD_ONCE_INIT;
static pthread_key_t g_tlsJavaEnv;
void init(JavaVM *vm) {
if (g_VM) return;
g_VM = vm;
}
Jav... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/cpp/jni_env_manager.h | C/C++ Header | #ifndef LAG_DETECTOR_LAG_DETECTOR_MAIN_CPP_NATIVE_HELPER_MANAGED_JNIENV_H_
#define LAG_DETECTOR_LAG_DETECTOR_MAIN_CPP_NATIVE_HELPER_MANAGED_JNIENV_H_
#include <jni.h>
namespace JniInvocation {
void init(JavaVM *vm);
JavaVM *getJavaVM();
JNIEnv *getEnv();
}
#endif
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/cpp/quit_signal_hooker.cc | C++ | #include "quit_signal_hooker.h"
#include "jni_env_manager.h"
#include <jni.h>
#include <sys/utsname.h>
#include <unistd.h>
#include <pthread.h>
#include <android/log.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/prctl.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <csignal>
#include <... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/cpp/quit_signal_hooker.h | C/C++ Header | #ifndef LAGDETECTOR_LAG_DETECTOR_MAIN_CPP_SignalHooker_H_
#define LAGDETECTOR_LAG_DETECTOR_MAIN_CPP_SignalHooker_H_
#include <jni.h>
#endif | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/java/com/yc/signalhooker/ILogger.java | Java | package com.yc.signalhooker;
public interface ILogger {
void onPrintLog(String message);
}
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/java/com/yc/signalhooker/ISignalListener.java | Java | package com.yc.signalhooker;
public interface ISignalListener {
void onReceiveAnrSignal();
}
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
SignalHooker/src/main/java/com/yc/signalhooker/SigQuitHooker.java | Java | package com.yc.signalhooker;
import androidx.annotation.Keep;
public class SigQuitHooker {
private static ISignalListener mListener = null;
private static ILogger mLogger = null;
static {
//so库加载
System.loadLibrary("signal-hooker");
}
public static void setSignalListener(ISigna... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
TestJniLib/build.gradle | Gradle | //plugins {id 'com.android.library'}
apply plugin: 'com.android.library'
android {
compileSdkVersion 29
// buildToolsVersion '29.0.0'
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
ndk {
// Specifies the ABI configur... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
TestJniLib/src/main/cpp/testjnic.c | C | //
// Created by 杨充 on 2023/6/7.
//
#include "testjnic.h"
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
TestJniLib/src/main/cpp/testjnic.h | C/C++ Header | //
// Created by 杨充 on 2023/6/7.
//
#ifndef YCJNIHELPER_TESTJNIC_H
#define YCJNIHELPER_TESTJNIC_H
#endif //YCJNIHELPER_TESTJNIC_H
| yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
TestJniLib/src/main/cpp/testjnilib.cpp | C++ | #include <jni.h>
#include <string>
#include "testjnilib.h"
//java中stringFromJNI
//extern “C” 指定以"C"的方式来实现native函数
extern "C"
//JNIEXPORT 宏定义,用于指定该函数是JNI函数。表示此函数可以被外部调用,在Android开发中不可省略
JNIEXPORT jstring
//JNICALL 宏定义,用于指定该函数是JNI函数。,无实际意义,但是不可省略
JNICALL
//以注意到jni的取名规则,一般都是包名 + 类名,jni方法只是在前面加上了Java_,并把包名和类名之... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
TestJniLib/src/main/cpp/testjnilib.h | C/C++ Header | #include <jni.h>
//
// Created by 杨充 on 2023/6/7.
//
//约定俗成的操作是 .h 文件主要负责类成员变量和方法的声明; .cpp 文件主要负责成员变量和方法的定义。
//ida打开显示为:assume cs:yc
#define JNI_SECTION ".yc"
//#ifndef YCJNIHELPER_TESTJNILIB_H
//#define YCJNIHELPER_TESTJNILIB_H
//
//#endif //YCJNIHELPER_TESTJNILIB_H
//__cplusplus这个宏是微软自定义宏,表示是C++编译
//两个一样的函数,在c在函... | yangchong211/YCJniHelper | 283 | JNI学习案例,通过简单的案例快速入门jni开发。JNI基础语法介绍,so库生成打包和反编译,Java和C/C++相关调用案例 | Java | yangchong211 | 杨充 | Tencent |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.