This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.leadroyal.oppousb; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XC_MethodHook; | |
import de.robv.android.xposed.XC_MethodReplacement; | |
import de.robv.android.xposed.XposedBridge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.leadroyal.oppousb; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XC_MethodHook; | |
import de.robv.android.xposed.XposedBridge; | |
import de.robv.android.xposed.XposedHelpers; | |
import de.robv.android.xposed.callbacks.XC_LoadPackage; | |
public class Entry implements IXposedHookLoadPackage { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.leadroyal.miuiusb; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XC_MethodHook; | |
import de.robv.android.xposed.XposedBridge; | |
import de.robv.android.xposed.XposedHelpers; | |
import de.robv.android.xposed.callbacks.XC_LoadPackage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
from graphviz import Digraph | |
# 先加载asm文件,按照列表的方式去存 | |
fd = open("main.asm") | |
lines = [l.strip('\n') for l in fd.readlines()] | |
fd.close() | |
# 遍历label,找到label对应的addr(应该是第一个label的addr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elftools.elf.constants import P_FLAGS | |
from elftools.elf.elffile import ELFFile | |
from elftools.elf.sections import SymbolTableSection | |
from unicorn import Uc, UC_ARCH_ARM, UC_MODE_LITTLE_ENDIAN, UC_PROT_WRITE, UC_PROT_READ, UC_PROT_EXEC | |
from unicorn.arm_const import * | |
from capstone import Cs, CS_ARCH_ARM, CS_MODE_THUMB, CsInsn | |
from keystone import Ks, KS_MODE_THUMB, KS_ARCH_ARM, KS_MODE_ARM | |
import struct | |
filename = "./libcms.so" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elftools.elf.constants import P_FLAGS | |
from elftools.elf.elffile import ELFFile | |
from unicorn import Uc, UC_ARCH_ARM, UC_MODE_LITTLE_ENDIAN, UC_HOOK_CODE, UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC | |
from unicorn.arm_const import * | |
from capstone import Cs, CS_ARCH_ARM, CS_MODE_THUMB, CsInsn | |
from keystone import Ks, KS_MODE_THUMB, KS_ARCH_ARM | |
# 找到.text节 | |
filename = "./libcms.so" |