当前位置: 首页>>代码示例>>Java>>正文


Java ExtFile.getDirectory方法代码示例

本文整理汇总了Java中brut.androlib.res.util.ExtFile.getDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java ExtFile.getDirectory方法的具体用法?Java ExtFile.getDirectory怎么用?Java ExtFile.getDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在brut.androlib.res.util.ExtFile的用法示例。


在下文中一共展示了ExtFile.getDirectory方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: decodeRawFiles

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeRawFiles(ExtFile apkFile, File outDir)
        throws AndrolibException {
    LOGGER.info("Copying assets and libs...");
    try {
        Directory in = apkFile.getDirectory();
        if (in.containsDir("assets")) {
            in.copyToDir(outDir, "assets");
        }
        if (in.containsDir("lib")) {
            in.copyToDir(outDir, "lib");
        }
        if (in.containsDir("libs")) {
            in.copyToDir(outDir, "libs");
        }
    } catch (DirectoryException ex) {
        throw new AndrolibException(ex);
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:19,代码来源:Androlib.java

示例2: recordUncompressedFiles

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void recordUncompressedFiles(ExtFile apkFile, Collection<String> uncompressedFilesOrExts) throws AndrolibException {
    try {
        Directory unk = apkFile.getDirectory();
        Set<String> files = unk.getFiles(true);
        String ext;

        for (String file : files) {
            if (isAPKFileNames(file) && !NO_COMPRESS_PATTERN.matcher(file).find()) {
                if (unk.getCompressionLevel(file) == 0) {
                    ext = FilenameUtils.getExtension(file);
                    if (ext.isEmpty()) {
                        ext = file;
                    }
                    if (! uncompressedFilesOrExts.contains(ext)) {
                        uncompressedFilesOrExts.add(ext);
                    }
                }
            }
        }
    } catch (DirectoryException ex) {
        throw new AndrolibException(ex);
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:24,代码来源:Androlib.java

示例3: decodeUnknownFiles

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeUnknownFiles(ExtFile apkFile, File outDir, ResTable resTable)
        throws AndrolibException {
    LOGGER.info("Copying unknown files...");
    File unknownOut = new File(outDir, UNK_DIRNAME);
    try {
        Directory unk = apkFile.getDirectory();

        // loop all items in container recursively, ignoring any that are pre-defined by aapt
        Set<String> files = unk.getFiles(true);
        for (String file : files) {
            if (!isAPKFileNames(file) && !file.endsWith(".dex")) {

                // copy file out of archive into special "unknown" folder
                unk.copyToDir(unknownOut, file);
                // lets record the name of the file, and its compression type
                // so that we may re-include it the same way
                mResUnknownFiles.addUnknownFileInfo(file, String.valueOf(unk.getCompressionLevel(file)));
            }
        }
    } catch (DirectoryException ex) {
        throw new AndrolibException(ex);
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:24,代码来源:Androlib.java

示例4: writeOriginalFiles

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void writeOriginalFiles(ExtFile apkFile, File outDir)
        throws AndrolibException {
    LOGGER.info("Copying original files...");
    File originalDir = new File(outDir, "original");
    if (!originalDir.exists()) {
        originalDir.mkdirs();
    }

    try {
        Directory in = apkFile.getDirectory();
        if(in.containsFile("AndroidManifest.xml")) {
            in.copyToDir(originalDir, "AndroidManifest.xml");
        }
        if (in.containsDir("META-INF")) {
            in.copyToDir(originalDir, "META-INF");
        }
    } catch (DirectoryException ex) {
        throw new AndrolibException(ex);
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:21,代码来源:Androlib.java

示例5: decodeManifestRaw

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeManifestRaw(ExtFile apkFile, File outDir)
        throws AndrolibException {
    try {
        Directory apk = apkFile.getDirectory();
        LOGGER.info("Copying raw manifest...");
        apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
    } catch (DirectoryException ex) {
        throw new AndrolibException(ex);
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:11,代码来源:Androlib.java

示例6: decodeSourcesRaw

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeSourcesRaw(ExtFile apkFile, File outDir, boolean debug)
		throws AndrolibException {
	try {
		Directory apk = apkFile.getDirectory();
		LOGGER.info("Copying raw classes.dex file...");
		apkFile.getDirectory().copyToDir(outDir, "classes.dex");
	} catch (DirectoryException ex) {
		throw new AndrolibException(ex);
	}
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:11,代码来源:Androlib.java

示例7: decodeManifestRaw

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeManifestRaw(ExtFile apkFile, File outDir)
		throws AndrolibException {
	try {
		Directory apk = apkFile.getDirectory();
		LOGGER.info("Copying raw manifest...");
		apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
	} catch (DirectoryException ex) {
		throw new AndrolibException(ex);
	}
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:11,代码来源:Androlib.java

示例8: decodeRawFiles

import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeRawFiles(ExtFile apkFile, File outDir)
		throws AndrolibException {
	LOGGER.info("Copying assets and libs...");
	try {
		Directory in = apkFile.getDirectory();
		if (in.containsDir("assets")) {
			in.copyToDir(outDir, "assets");
		}
		if (in.containsDir("lib")) {
			in.copyToDir(outDir, "lib");
		}
	} catch (DirectoryException ex) {
		throw new AndrolibException(ex);
	}
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:16,代码来源:Androlib.java


注:本文中的brut.androlib.res.util.ExtFile.getDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。