INNER CODE UNIT · Java

generateChannelApk

Tencent/VasDolly · command/src/main/java/com/tencent/vasdolly/command/Util.java:265

    private static void generateChannelApk(File baseApk, List<String> channelList, File outputDir, boolean isFastMode) {
        String apkName = baseApk.getName();
        long startTime = System.currentTimeMillis();
        System.out.println("------ File " + apkName + " generate channel apk  , begin ------");

        try {
            // 获取Apk的各部分片段信息
            ApkSectionInfo apkSectionInfo = IdValueWriter.getApkSectionInfo(baseApk, false);
            for (String channel : channelList) {
                File destFile = getDestinationFile(outputDir, apkName, channel);
                System.out.println("generatedChannelApk , channel = " + channel + " , apkChannelName = " + destFile.getName());
                if (apkSectionInfo.lowMemory) {
                    copyFileUsingNio(baseApk, destFile);
                }
                ChannelWriter.addChannelByV2(apkSectionInfo, destFile, channel);
                if (!isFastMode) {
                    //1. verify channel info
                    if (ChannelReader.verifyChannelByV2(destFile, channel)) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…