Java Code Examples for jadx.api.JadxArgs#setSkipResources()

The following examples show how to use jadx.api.JadxArgs#setSkipResources() . 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: IntegrationTest.java    From Box with Apache License 2.0 6 votes vote down vote up
@BeforeEach
public void init() {
	this.deleteTmpFiles = true;
	this.unloadCls = true;
	this.withDebugInfo = true;
	this.compile = true;
	this.useEclipseCompiler = false;
	this.resMap = Collections.emptyMap();

	args = new JadxArgs();
	args.setOutDir(new File(OUT_DIR));
	args.setShowInconsistentCode(true);
	args.setThreadsCount(1);
	args.setSkipResources(true);
	args.setFsCaseSensitive(false); // use same value on all systems
}
 
Example 2
Source File: IntegrationTest.java    From Box with Apache License 2.0 6 votes vote down vote up
@BeforeEach
public void init() {
	this.deleteTmpFiles = true;
	this.unloadCls = true;
	this.withDebugInfo = true;
	this.compile = true;
	this.useEclipseCompiler = false;
	this.resMap = Collections.emptyMap();

	args = new JadxArgs();
	args.setOutDir(new File(OUT_DIR));
	args.setShowInconsistentCode(true);
	args.setThreadsCount(1);
	args.setSkipResources(true);
	args.setFsCaseSensitive(false); // use same value on all systems
}
 
Example 3
Source File: IntegrationTest.java    From jadx with Apache License 2.0 6 votes vote down vote up
@BeforeEach
public void init() {
	this.deleteTmpFiles = true;
	this.unloadCls = true;
	this.withDebugInfo = true;
	this.compile = true;
	this.useEclipseCompiler = false;
	this.resMap = Collections.emptyMap();

	args = new JadxArgs();
	args.setOutDir(new File(OUT_DIR));
	args.setShowInconsistentCode(true);
	args.setThreadsCount(1);
	args.setSkipResources(true);
	args.setFsCaseSensitive(false); // use same value on all systems
}
 
Example 4
Source File: MainWindow.java    From jadx with Apache License 2.0 5 votes vote down vote up
private void saveAll(boolean export) {
	JadxArgs decompilerArgs = wrapper.getArgs();
	if ((!decompilerArgs.isFsCaseSensitive() && !decompilerArgs.isRenameCaseSensitive())
			|| !decompilerArgs.isRenameValid() || !decompilerArgs.isRenamePrintable()) {
		JOptionPane.showMessageDialog(
				this,
				NLS.str("msg.rename_disabled", settings.getLangLocale()),
				NLS.str("msg.rename_disabled_title", settings.getLangLocale()),
				JOptionPane.INFORMATION_MESSAGE);
	}
	JFileChooser fileChooser = new JFileChooser();
	fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
	fileChooser.setToolTipText(NLS.str("file.save_all_msg"));

	Path currentDirectory = settings.getLastSaveFilePath();
	if (currentDirectory != null) {
		fileChooser.setCurrentDirectory(currentDirectory.toFile());
	}

	int ret = fileChooser.showSaveDialog(mainPanel);
	if (ret == JFileChooser.APPROVE_OPTION) {
		decompilerArgs.setExportAsGradleProject(export);
		if (export) {
			decompilerArgs.setSkipSources(false);
			decompilerArgs.setSkipResources(false);
		} else {
			decompilerArgs.setSkipSources(settings.isSkipSources());
			decompilerArgs.setSkipResources(settings.isSkipResources());
		}
		settings.setLastSaveFilePath(fileChooser.getCurrentDirectory().toPath());
		ProgressMonitor progressMonitor = new ProgressMonitor(mainPanel, NLS.str("msg.saving_sources"), "", 0, 100);
		progressMonitor.setMillisToPopup(0);
		wrapper.saveAll(fileChooser.getSelectedFile(), progressMonitor);
	}
}
 
Example 5
Source File: JadxCLIArgs.java    From jadx with Apache License 2.0 5 votes vote down vote up
public JadxArgs toJadxArgs() {
	JadxArgs args = new JadxArgs();
	args.setInputFiles(files.stream().map(FileUtils::toFile).collect(Collectors.toList()));
	args.setOutDir(FileUtils.toFile(outDir));
	args.setOutDirSrc(FileUtils.toFile(outDirSrc));
	args.setOutDirRes(FileUtils.toFile(outDirRes));
	args.setOutputFormat(JadxArgs.OutputFormatEnum.valueOf(outputFormat.toUpperCase()));
	args.setThreadsCount(threadsCount);
	args.setSkipSources(skipSources);
	if (singleClass != null) {
		args.setClassFilter(className -> singleClass.equals(className));
	}
	args.setSkipResources(skipResources);
	args.setFallbackMode(fallbackMode);
	args.setShowInconsistentCode(showInconsistentCode);
	args.setCfgOutput(cfgOutput);
	args.setRawCFGOutput(rawCfgOutput);
	args.setReplaceConsts(replaceConsts);
	args.setDeobfuscationOn(deobfuscationOn);
	args.setDeobfuscationForceSave(deobfuscationForceSave);
	args.setDeobfuscationMinLength(deobfuscationMinLength);
	args.setDeobfuscationMaxLength(deobfuscationMaxLength);
	args.setUseSourceNameAsClassAlias(deobfuscationUseSourceNameAsAlias);
	args.setParseKotlinMetadata(deobfuscationParseKotlinMetadata);
	args.setEscapeUnicode(escapeUnicode);
	args.setRespectBytecodeAccModifiers(respectBytecodeAccessModifiers);
	args.setExportAsGradleProject(exportAsGradleProject);
	args.setUseImports(useImports);
	args.setDebugInfo(debugInfo);
	args.setInlineAnonymousClasses(inlineAnonymousClasses);
	args.setRenameCaseSensitive(isRenameCaseSensitive());
	args.setRenameValid(isRenameValid());
	args.setRenamePrintable(isRenamePrintable());
	args.setFsCaseSensitive(fsCaseSensitive);
	return args;
}