com.android.reverse.collecter.DexFileInfoCollecter Java Examples

The following examples show how to use com.android.reverse.collecter.DexFileInfoCollecter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DumpClassCommandHandler.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Override
public void doAction() {
	String[] loadClass = DexFileInfoCollecter.getInstance().dumpLoadableClass(mCookie);
	if (loadClass != null) {
		Logger.log("Start Loadable ClassName ->");
		String className = null;
		for (int i = 0; i < loadClass.length; i++) {
			className = loadClass[i];
			if (!this.isFilterClass(className)) {
				Logger.log("ClassName = " + className);
			}
		}
		Logger.log("End Loadable ClassName");
	}else{
		Logger.log("Can't find class loaded by the dex");
	}
}
 
Example #2
Source File: ReverseXposedModule.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
	// TODO Auto-generated method stub
	if(lpparam.appInfo == null || 
			(lpparam.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) !=0){
		return;
	}else if(lpparam.isFirstApplication && !ZJDROID_PACKAGENAME.equals(lpparam.packageName)){
	  Logger.PACKAGENAME = lpparam.packageName;
	  Logger.log("the package = "+lpparam.packageName +" has hook");
	  Logger.log("the app target id = "+android.os.Process.myPid());
	  PackageMetaInfo pminfo = PackageMetaInfo.fromXposed(lpparam);
	  ModuleContext.getInstance().initModuleContext(pminfo);
	  DexFileInfoCollecter.getInstance().start();
	  LuaScriptInvoker.getInstance().start();
	  ApiMonitorHookManager.getInstance().startMonitor();
	}else{
		
	}
}
 
Example #3
Source File: DumpClassCommandHandler.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String[] loadClass = DexFileInfoCollecter.getInstance().dumpLoadableClass(dexpath);
	if (loadClass != null) {
		Logger.log("Start Loadable ClassName ->");
		String className = null;
		for (int i = 0; i < loadClass.length; i++) {
			className = loadClass[i];
			if (!this.isFilterClass(className)) {
				Logger.log("ClassName = " + className);
			}
		}
		Logger.log("End Loadable ClassName");
	}else{
		Logger.log("Can't find class loaded by the dex");
	}
}
 
Example #4
Source File: ReverseXposedModule.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
	// TODO Auto-generated method stub
	if(lpparam.appInfo == null || 
			(lpparam.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) !=0){
		return;
	}else if(lpparam.isFirstApplication && !ZJDROID_PACKAGENAME.equals(lpparam.packageName)){
	  Logger.PACKAGENAME = lpparam.packageName;
	  Logger.log("the package = "+lpparam.packageName +" has hook");
	  Logger.log("the app target id = "+android.os.Process.myPid());
	  PackageMetaInfo pminfo = PackageMetaInfo.fromXposed(lpparam);
	  ModuleContext.getInstance().initModuleContext(pminfo);
	  DexFileInfoCollecter.getInstance().start();
	  ApiMonitorHookManager.getInstance().startMonitor();
	}else{
		
	}
}
 
Example #5
Source File: DumpClassCommandHandler.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String[] loadClass = DexFileInfoCollecter.getInstance().dumpLoadableClass(dexpath);
	if (loadClass != null) {
		Logger.log("Start Loadable ClassName ->");
		String className = null;
		for (int i = 0; i < loadClass.length; i++) {
			className = loadClass[i];
			if (!this.isFilterClass(className)) {
				Logger.log("ClassName = " + className);
			}
		}
		Logger.log("End Loadable ClassName");
	}else{
		Logger.log("Can't find class loaded by the dex");
	}
}
 
Example #6
Source File: ReverseXposedModule.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
	// TODO Auto-generated method stub
	if(lpparam.appInfo == null || 
			(lpparam.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) !=0){
		return;
	}else if(lpparam.isFirstApplication && !ZJDROID_PACKAGENAME.equals(lpparam.packageName)){
	  Logger.PACKAGENAME = lpparam.packageName;
	  Logger.log("the package = "+lpparam.packageName +" has hook");
	  Logger.log("the app target id = "+android.os.Process.myPid());
	  PackageMetaInfo pminfo = PackageMetaInfo.fromXposed(lpparam);
	  ModuleContext.getInstance().initModuleContext(pminfo);
	  DexFileInfoCollecter.getInstance().start();
	  LuaScriptInvoker.getInstance().start();
	  ApiMonitorHookManager.getInstance().startMonitor();
	}else{
		
	}
}
 
Example #7
Source File: DumpClassCommandHandler.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String[] loadClass = DexFileInfoCollecter.getInstance().dumpLoadableClass(dexpath);
	if (loadClass != null) {
		Logger.log("Start Loadable ClassName ->");
		String className = null;
		for (int i = 0; i < loadClass.length; i++) {
			className = loadClass[i];
			if (!this.isFilterClass(className)) {
				Logger.log("ClassName = " + className);
			}
		}
		Logger.log("End Loadable ClassName");
	}else{
		Logger.log("Can't find class loaded by the dex");
	}
}
 
Example #8
Source File: DumpDexInfoCommandHandler.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	HashMap<String, DexFileInfo> dexfileInfo = DexFileInfoCollecter.getInstance().dumpDexFileInfo();
	Iterator<DexFileInfo> itor = dexfileInfo.values().iterator();
	DexFileInfo info = null;
	Logger.log("The DexFile Infomation ->");
	while (itor.hasNext()) {
		info = itor.next();
		Logger.log("filepath:"+ info.getDexPath()+" mCookie:"+info.getmCookie());
	}
	Logger.log("End DexFile Infomation");
}
 
Example #9
Source File: DumpDexFileCommandHandler.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexdump.odex";
	DexFileInfoCollecter.getInstance().dumpDexFile(filename, dexpath);
	Logger.log("the dexfile data save to ="+filename);
}
 
Example #10
Source File: BackSmaliCommandHandler.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexfile.dex";
	DexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);
	Logger.log("the dexfile data save to ="+filename);
}
 
Example #11
Source File: BackSmaliCommandHandler.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexfile.dex";
	DexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);
	Logger.log("the dexfile data save to ="+filename);
}
 
Example #12
Source File: ReverseXposedModule.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
    public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {


        XMMultiDex.install(ReverseXposedModule.class.getClassLoader(),MODULE_PATH,lpparam.appInfo);

        APPINFO_DATA_DIR = lpparam.appInfo.dataDir;

//        addNativeLibDic();



        if (lpparam.appInfo == null ||
                (lpparam.appInfo.flags & (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0) {
            return;
        } else if (lpparam.isFirstApplication && !ZJDROID_PACKAGENAME.equals(lpparam.packageName)) {
            Logger.PACKAGENAME = lpparam.packageName;
            Logger.log("the package = " + lpparam.packageName + " has hook");
            Logger.log("the app target id = " + android.os.Process.myPid());
            PackageMetaInfo pminfo = PackageMetaInfo.fromXposed(lpparam);
            ModuleContext.getInstance().initModuleContext(pminfo);
            DexFileInfoCollecter.getInstance().start();
            LuaScriptInvoker.getInstance().start();


            Logger.log_behavior("the package = " + lpparam.packageName + " has hook");
            Logger.log_behavior("the app target id = " + android.os.Process.myPid());
            ApiMonitorHookManager.getInstance().startMonitor();
        } else {

        }
    }
 
Example #13
Source File: DumpDexInfoCommandHandler.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	HashMap<String, DexFileInfo> dexfileInfo = DexFileInfoCollecter.getInstance().dumpDexFileInfo();
	Iterator<DexFileInfo> itor = dexfileInfo.values().iterator();
	DexFileInfo info = null;
	Logger.log("The DexFile Infomation ->");
	while (itor.hasNext()) {
		info = itor.next();
		Logger.log("filepath:"+ info.getDexPath()+" mCookie:"+info.getmCookie());
	}
	Logger.log("End DexFile Infomation");
}
 
Example #14
Source File: DumpDexFileCommandHandler.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexdump.odex";
	DexFileInfoCollecter.getInstance().dumpDexFile(filename, dexpath);
	Logger.log("the dexfile data save to ="+filename);
}
 
Example #15
Source File: BackSmaliCommandHandler.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexfile.dex";
	DexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);
	Logger.log("the dexfile data save to ="+filename);
}
 
Example #16
Source File: DumpDexInfoCommandHandler.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	HashMap<Long, DexFileInfo> dexfileInfo = DexFileInfoCollecter.getInstance().dumpDexFileInfo();
	Iterator<DexFileInfo> itor = dexfileInfo.values().iterator();
	DexFileInfo info = null;
	Logger.log("The DexFile Infomation ->");
	while (itor.hasNext()) {
		info = itor.next();
		Logger.log("filepath:"+ info.getDexPath()+" dexElementToString:"+info.getToStringResult() +" mCookie:"+info.getmCookie());
	}
	Logger.log("End DexFile Infomation");
}
 
Example #17
Source File: DumpDexInfoCommandHandler.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	HashMap<String, DexFileInfo> dexfileInfo = DexFileInfoCollecter.getInstance().dumpDexFileInfo();
	Iterator<DexFileInfo> itor = dexfileInfo.values().iterator();
	DexFileInfo info = null;
	Logger.log("The DexFile Infomation ->");
	while (itor.hasNext()) {
		info = itor.next();
		Logger.log("filepath:"+ info.getDexPath()+" mCookie:"+info.getmCookie());
	}
	Logger.log("End DexFile Infomation");
}
 
Example #18
Source File: DumpDexFileCommandHandler.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {
	// TODO Auto-generated method stub
	String filename = ModuleContext.getInstance().getAppContext().getFilesDir()+"/dexdump.odex";
	DexFileInfoCollecter.getInstance().dumpDexFile(filename, dexpath);
	Logger.log("the dexfile data save to ="+filename);
}
 
Example #19
Source File: BackSmaliCommandHandler.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public void doAction() {

    if (Build.VERSION.SDK_INT >= 20) {
        //TODO 增加art虚拟机中backsmali的支持
        Logger.log("Forbidden ! in Art, ZjDroid was unable to back smali dex file automaticly!");
        return;
    }

    String filename = ModuleContext.getInstance().getAppContext().getFilesDir() + "/dexfile" + mCookie + ".dex";
    DexFileInfoCollecter.getInstance().backsmaliDexFile(filename, mCookie);
    Logger.log("the dexfile data save to =" + filename);
}
 
Example #20
Source File: LuaClassLoader.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
public static Class forName(String className){
	return DexFileInfoCollecter.getInstance().loadClass(className);
}
 
Example #21
Source File: DumpDexFileCommandHandler.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Override
public void doAction() {
    String filename = ModuleContext.getInstance().getAppContext().getFilesDir() + "/dexdump" + mCookie + ".odex";
    DexFileInfoCollecter.getInstance().dumpDexFile(filename, Long.parseLong(mCookie));
    Logger.log("the dexfile data save to =" + filename);
}