Search in sources :

Example 6 with TempDirectory

use of com.android.tools.build.bundletool.io.TempDirectory in project bundletool by google.

the class ConnectedDeviceModeTransparencyChecker method checkTransparency.

public static TransparencyCheckResult checkTransparency(CheckTransparencyCommand command) {
    command.getAdbServer().get().init(command.getAdbPath().get());
    AdbRunner adbRunner = new AdbRunner(command.getAdbServer().get());
    Device adbDevice = getDevice(command.getAdbServer().get(), command.getDeviceId());
    // Execute a shell command to retrieve paths to all APKs for the given package name.
    AdbShellCommandTask adbShellCommandTask = new AdbShellCommandTask(adbDevice, "pm path " + command.getPackageName().get());
    ImmutableList<String> pathsToApksOnDevice = adbShellCommandTask.execute().stream().filter(path -> path.startsWith(APK_PATH_ON_DEVICE_PREFIX)).map(path -> path.substring(APK_PATH_ON_DEVICE_PREFIX.length())).collect(toImmutableList());
    if (pathsToApksOnDevice.isEmpty()) {
        throw InvalidCommandException.builder().withInternalMessage("No files found for package " + command.getPackageName().get()).build();
    }
    // Pull APKs to a temporary directory and verify code transparency.
    try (TempDirectory tempDir = new TempDirectory("connected-device-transparency-check")) {
        Path apksExtractedSubDirectory = tempDir.getPath().resolve("extracted");
        Files.createDirectory(apksExtractedSubDirectory);
        ImmutableList<FilePullParams> pullParams = createPullParams(pathsToApksOnDevice, apksExtractedSubDirectory);
        if (command.getDeviceId().isPresent()) {
            adbRunner.run(device -> device.pull(pullParams), command.getDeviceId().get());
        } else {
            adbRunner.run(device -> device.pull(pullParams));
        }
        return ApkTransparencyCheckUtils.checkTransparency(pullParams.stream().map(FilePullParams::getDestinationPath).collect(toImmutableList()));
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}
Also used : AdbRunner(com.android.tools.build.bundletool.device.AdbRunner) CheckTransparencyCommand(com.android.tools.build.bundletool.commands.CheckTransparencyCommand) FilePullParams(com.android.tools.build.bundletool.device.Device.FilePullParams) Files(java.nio.file.Files) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Device(com.android.tools.build.bundletool.device.Device) TimeoutException(java.util.concurrent.TimeoutException) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException) DeviceAnalyzer(com.android.tools.build.bundletool.device.DeviceAnalyzer) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) ImmutableList(com.google.common.collect.ImmutableList) Paths(java.nio.file.Paths) InvalidCommandException(com.android.tools.build.bundletool.model.exceptions.InvalidCommandException) Optional(java.util.Optional) AdbShellCommandTask(com.android.tools.build.bundletool.device.AdbShellCommandTask) UncheckedTimeoutException(com.google.common.util.concurrent.UncheckedTimeoutException) Path(java.nio.file.Path) AdbServer(com.android.tools.build.bundletool.device.AdbServer) Path(java.nio.file.Path) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) AdbShellCommandTask(com.android.tools.build.bundletool.device.AdbShellCommandTask) AdbRunner(com.android.tools.build.bundletool.device.AdbRunner) Device(com.android.tools.build.bundletool.device.Device) UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException) FilePullParams(com.android.tools.build.bundletool.device.Device.FilePullParams)

Example 7 with TempDirectory

use of com.android.tools.build.bundletool.io.TempDirectory in project bundletool by google.

the class ApkModeTransparencyChecker method extractAllApksFromZip.

/**
 * Returns list of paths to all .apk files extracted from a .zip file.
 */
private static ImmutableList<Path> extractAllApksFromZip(Path zipOfApksPath, TempDirectory tempDirectory) throws IOException {
    ImmutableList.Builder<Path> allExtractedApkPaths = ImmutableList.builder();
    Path zipExtractedSubDirectory = tempDirectory.getPath().resolve("extracted");
    Files.createDirectory(zipExtractedSubDirectory);
    try (ZipFile zipOfApks = ZipUtils.openZipFile(zipOfApksPath)) {
        ImmutableList<ZipEntry> listOfApksToExtract = zipOfApks.stream().filter(zipEntry -> !zipEntry.isDirectory() && zipEntry.getName().toLowerCase(Locale.ROOT).endsWith(".apk")).collect(toImmutableList());
        for (ZipEntry apkToExtract : listOfApksToExtract) {
            Path extractedApkPath = zipExtractedSubDirectory.resolve(ZipPath.create(apkToExtract.getName()).toString());
            Files.createDirectories(extractedApkPath.getParent());
            try (InputStream inputStream = zipOfApks.getInputStream(apkToExtract);
                OutputStream outputApk = Files.newOutputStream(extractedApkPath)) {
                ByteStreams.copy(inputStream, outputApk);
                allExtractedApkPaths.add(extractedApkPath);
            }
        }
    }
    return allExtractedApkPaths.build();
}
Also used : ZipPath(com.android.tools.build.bundletool.model.ZipPath) Path(java.nio.file.Path) OutputStream(java.io.OutputStream) CheckTransparencyCommand(com.android.tools.build.bundletool.commands.CheckTransparencyCommand) ZipPath(com.android.tools.build.bundletool.model.ZipPath) Files(java.nio.file.Files) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) ImmutableList(com.google.common.collect.ImmutableList) Locale(java.util.Locale) ByteStreams(com.google.common.io.ByteStreams) ZipFile(java.util.zip.ZipFile) ZipUtils(com.android.tools.build.bundletool.model.utils.ZipUtils) Path(java.nio.file.Path) ZipEntry(java.util.zip.ZipEntry) InputStream(java.io.InputStream) ZipFile(java.util.zip.ZipFile) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) ImmutableList(com.google.common.collect.ImmutableList) InputStream(java.io.InputStream) ZipEntry(java.util.zip.ZipEntry) OutputStream(java.io.OutputStream)

Example 8 with TempDirectory

use of com.android.tools.build.bundletool.io.TempDirectory in project bundletool by google.

the class AppBundleRecompressor method recompressAppBundle.

public void recompressAppBundle(File inputFile, File outputFile) {
    try (ZipReader zipReader = ZipReader.createFromFile(inputFile.toPath());
        ZipArchive newBundle = new ZipArchive(outputFile);
        TempDirectory tempDirectory = new TempDirectory(getClass().getSimpleName())) {
        ZipEntrySourceFactory sourceFactory = new ZipEntrySourceFactory(zipReader, tempDirectory);
        List<ListenableFuture<ZipEntrySource>> sources = new ArrayList<>();
        BundleConfig bundleConfig = extractBundleConfig(zipReader);
        ImmutableSet<String> uncompressedAssetsModules = extractModulesWithUncompressedAssets(zipReader, bundleConfig);
        CompressionManager compressionManager = new CompressionManager(bundleConfig, uncompressedAssetsModules);
        for (Entry entry : zipReader.getEntries().values()) {
            CompressionLevel compressionLevel = compressionManager.getCompressionLevel(entry);
            // parallelization there either.
            if (compressionLevel.equals(SAME_AS_SOURCE) || compressionLevel.equals(NO_COMPRESSION) || entry.getUncompressedSize() < LARGE_ENTRY_SIZE_THRESHOLD_BYTES) {
                sources.add(immediateFuture(sourceFactory.create(entry, compressionLevel)));
            } else {
                sources.add(executor.submit(() -> sourceFactory.create(entry, compressionLevel)));
            }
        }
        // as they're ready.
        for (ListenableFuture<ZipEntrySource> sourceFuture : Futures.inCompletionOrder(sources)) {
            ZipEntrySource source = Futures.getUnchecked(sourceFuture);
            if (source.getCompressionLevel().isCompressed() && source.getCompressedSize() >= source.getUncompressedSize()) {
                // No benefit in compressing, leave the file uncompressed.
                newBundle.add(sourceFactory.create(source.getEntry(), NO_COMPRESSION));
            } else {
                newBundle.add(source);
            }
        }
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}
Also used : ArrayList(java.util.ArrayList) ZipArchive(com.android.zipflinger.ZipArchive) ZipReader(com.android.tools.build.bundletool.io.ZipReader) UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException) ZipEntrySourceFactory(com.android.tools.build.bundletool.io.ZipEntrySourceFactory) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) BundleConfig(com.android.bundle.Config.BundleConfig) Entry(com.android.zipflinger.Entry) CompressionLevel(com.android.tools.build.bundletool.model.CompressionLevel) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) ZipEntrySource(com.android.tools.build.bundletool.io.ZipEntrySource)

Example 9 with TempDirectory

use of com.android.tools.build.bundletool.io.TempDirectory in project bundletool by google.

the class InstallMultiApksCommand method extractApksFromZip.

/**
 * Extract the .apks files from a zip file containing multiple .apks files.
 */
private static ImmutableList<Path> extractApksFromZip(Path zipPath, TempDirectory tempDirectory) throws IOException {
    ImmutableList.Builder<Path> extractedApks = ImmutableList.builder();
    Path zipExtractedSubDirectory = tempDirectory.getPath().resolve("extracted");
    Files.createDirectory(zipExtractedSubDirectory);
    try (ZipFile apksArchiveContainer = new ZipFile(zipPath.toFile())) {
        ImmutableList<ZipEntry> apksToExtractList = apksArchiveContainer.stream().filter(zipEntry -> !zipEntry.isDirectory() && zipEntry.getName().toLowerCase(Locale.ROOT).endsWith(".apks")).collect(toImmutableList());
        for (ZipEntry apksToExtract : apksToExtractList) {
            Path extractedApksPath = zipExtractedSubDirectory.resolve(ZipPath.create(apksToExtract.getName()).toString());
            Files.createDirectories(extractedApksPath.getParent());
            try (InputStream inputStream = apksArchiveContainer.getInputStream(apksToExtract);
                OutputStream outputApks = Files.newOutputStream(extractedApksPath)) {
                ByteStreams.copy(inputStream, outputApks);
                extractedApks.add(extractedApksPath);
            }
        }
    }
    return extractedApks.build();
}
Also used : Path(java.nio.file.Path) ZipPath(com.android.tools.build.bundletool.model.ZipPath) TimeoutException(java.util.concurrent.TimeoutException) SYSTEM_PATH_VARIABLE(com.android.tools.build.bundletool.model.utils.SdkToolsLocator.SYSTEM_PATH_VARIABLE) DeviceSpec(com.android.bundle.Devices.DeviceSpec) DeviceAnalyzer(com.android.tools.build.bundletool.device.DeviceAnalyzer) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) ImmutableListMultimap.toImmutableListMultimap(com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap) Locale(java.util.Locale) Flag(com.android.tools.build.bundletool.flags.Flag) Duration(java.time.Duration) AdbShellCommandTask(com.android.tools.build.bundletool.device.AdbShellCommandTask) ZipFile(java.util.zip.ZipFile) FilePreconditions.checkFileHasExtension(com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileHasExtension) Path(java.nio.file.Path) ZipEntry(java.util.zip.ZipEntry) InstalledPackageInfo(com.android.tools.build.bundletool.device.PackagesParser.InstalledPackageInfo) ImmutableSet(com.google.common.collect.ImmutableSet) BadgingInfo(com.android.tools.build.bundletool.device.BadgingInfoParser.BadgingInfo) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Aapt2Command(com.android.tools.build.bundletool.androidtools.Aapt2Command) Device(com.android.tools.build.bundletool.device.Device) ParsedFlags(com.android.tools.build.bundletool.flags.ParsedFlags) CanIgnoreReturnValue(com.google.errorprone.annotations.CanIgnoreReturnValue) Streams(com.google.common.collect.Streams) Logger(java.util.logging.Logger) UncheckedIOException(java.io.UncheckedIOException) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) SystemEnvironmentProvider(com.android.tools.build.bundletool.model.utils.SystemEnvironmentProvider) ImmutableListMultimap(com.google.common.collect.ImmutableListMultimap) AutoValue(com.google.auto.value.AutoValue) ByteStreams(com.google.common.io.ByteStreams) Optional(java.util.Optional) FilePreconditions.checkFileExistsAndReadable(com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileExistsAndReadable) ZipPath(com.android.tools.build.bundletool.model.ZipPath) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) Supplier(java.util.function.Supplier) ImmutableList(com.google.common.collect.ImmutableList) DefaultSystemEnvironmentProvider(com.android.tools.build.bundletool.model.utils.DefaultSystemEnvironmentProvider) BadgingInfoParser(com.android.tools.build.bundletool.device.BadgingInfoParser) Suppliers(com.google.common.base.Suppliers) Comparator.comparing(java.util.Comparator.comparing) AdbServer(com.android.tools.build.bundletool.device.AdbServer) OutputStream(java.io.OutputStream) ANDROID_HOME_VARIABLE(com.android.tools.build.bundletool.model.utils.SdkToolsLocator.ANDROID_HOME_VARIABLE) FilePreconditions.checkFileExistsAndExecutable(com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileExistsAndExecutable) AdbCommand(com.android.tools.build.bundletool.androidtools.AdbCommand) Files(java.nio.file.Files) ANDROID_SERIAL_VARIABLE(com.android.tools.build.bundletool.commands.CommandUtils.ANDROID_SERIAL_VARIABLE) Collectors.maxBy(java.util.stream.Collectors.maxBy) IOException(java.io.IOException) PackagesParser(com.android.tools.build.bundletool.device.PackagesParser) Streams.stream(com.google.common.collect.Streams.stream) IncompatibleDeviceException(com.android.tools.build.bundletool.model.exceptions.IncompatibleDeviceException) InvalidCommandException(com.android.tools.build.bundletool.model.exceptions.InvalidCommandException) FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Versions(com.android.tools.build.bundletool.model.utils.Versions) CommandDescription(com.android.tools.build.bundletool.commands.CommandHelp.CommandDescription) InputStream(java.io.InputStream) ZipFile(java.util.zip.ZipFile) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) ImmutableList(com.google.common.collect.ImmutableList) InputStream(java.io.InputStream) ZipEntry(java.util.zip.ZipEntry) OutputStream(java.io.OutputStream)

Example 10 with TempDirectory

use of com.android.tools.build.bundletool.io.TempDirectory in project bundletool by google.

the class InstallMultiApksCommand method execute.

public void execute() throws TimeoutException, IOException {
    validateInput();
    AdbServer adbServer = getAdbServer();
    adbServer.init(getAdbPath());
    try (TempDirectory tempDirectory = new TempDirectory()) {
        DeviceAnalyzer deviceAnalyzer = new DeviceAnalyzer(adbServer);
        DeviceSpec deviceSpec = deviceAnalyzer.getDeviceSpec(getDeviceId());
        Device device = deviceAnalyzer.getAndValidateDevice(getDeviceId());
        if (getTimeout().isPresent() && !device.getVersion().isGreaterOrEqualThan(Versions.ANDROID_S_API_VERSION)) {
            throw InvalidCommandException.builder().withInternalMessage("'%s' flag is supported for Android 12+ devices.", TIMEOUT_MILLIS_FLAG.getName()).build();
        }
        Path aapt2Dir = tempDirectory.getPath().resolve("aapt2");
        Files.createDirectory(aapt2Dir);
        Supplier<Aapt2Command> aapt2CommandSupplier = Suppliers.memoize(() -> getOrExtractAapt2Command(aapt2Dir));
        ImmutableMap<String, InstalledPackageInfo> existingPackages = getPackagesInstalledOnDevice(device);
        ImmutableList<PackagePathVersion> installableApksFilesWithBadgingInfo = getActualApksPaths(tempDirectory).stream().flatMap(apksArchivePath -> stream(apksWithPackageName(apksArchivePath, deviceSpec, aapt2CommandSupplier))).filter(apks -> shouldInstall(apks, existingPackages)).collect(toImmutableList());
        ImmutableList<PackagePathVersion> apkFilesToInstall = uniqueApksByPackageName(installableApksFilesWithBadgingInfo).stream().flatMap(apks -> extractApkListFromApks(deviceSpec, apks, Optional.ofNullable(existingPackages.get(apks.getPackageName())), tempDirectory).stream()).collect(toImmutableList());
        ImmutableListMultimap<String, String> apkToInstallByPackage = apkFilesToInstall.stream().collect(toImmutableListMultimap(PackagePathVersion::getPackageName, packagePathVersion -> packagePathVersion.getPath().toAbsolutePath().toString()));
        if (apkFilesToInstall.isEmpty()) {
            logger.warning("No packages found to install! Exiting...");
            return;
        }
        AdbCommand adbCommand = getOrCreateAdbCommand();
        ImmutableList<String> commandResults = adbCommand.installMultiPackage(apkToInstallByPackage, getStaged(), getEnableRollback(), getTimeout(), getDeviceId());
        logger.info(String.format("Output:\n%s", String.join("\n", commandResults)));
        logger.info("Please reboot device to complete installation.");
    }
}
Also used : Path(java.nio.file.Path) ZipPath(com.android.tools.build.bundletool.model.ZipPath) TimeoutException(java.util.concurrent.TimeoutException) SYSTEM_PATH_VARIABLE(com.android.tools.build.bundletool.model.utils.SdkToolsLocator.SYSTEM_PATH_VARIABLE) DeviceSpec(com.android.bundle.Devices.DeviceSpec) DeviceAnalyzer(com.android.tools.build.bundletool.device.DeviceAnalyzer) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) ImmutableListMultimap.toImmutableListMultimap(com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap) Locale(java.util.Locale) Flag(com.android.tools.build.bundletool.flags.Flag) Duration(java.time.Duration) AdbShellCommandTask(com.android.tools.build.bundletool.device.AdbShellCommandTask) ZipFile(java.util.zip.ZipFile) FilePreconditions.checkFileHasExtension(com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileHasExtension) Path(java.nio.file.Path) ZipEntry(java.util.zip.ZipEntry) InstalledPackageInfo(com.android.tools.build.bundletool.device.PackagesParser.InstalledPackageInfo) ImmutableSet(com.google.common.collect.ImmutableSet) BadgingInfo(com.android.tools.build.bundletool.device.BadgingInfoParser.BadgingInfo) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableList.toImmutableList(com.google.common.collect.ImmutableList.toImmutableList) Aapt2Command(com.android.tools.build.bundletool.androidtools.Aapt2Command) Device(com.android.tools.build.bundletool.device.Device) ParsedFlags(com.android.tools.build.bundletool.flags.ParsedFlags) CanIgnoreReturnValue(com.google.errorprone.annotations.CanIgnoreReturnValue) Streams(com.google.common.collect.Streams) Logger(java.util.logging.Logger) UncheckedIOException(java.io.UncheckedIOException) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) SystemEnvironmentProvider(com.android.tools.build.bundletool.model.utils.SystemEnvironmentProvider) ImmutableListMultimap(com.google.common.collect.ImmutableListMultimap) AutoValue(com.google.auto.value.AutoValue) ByteStreams(com.google.common.io.ByteStreams) Optional(java.util.Optional) FilePreconditions.checkFileExistsAndReadable(com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileExistsAndReadable) ZipPath(com.android.tools.build.bundletool.model.ZipPath) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) Supplier(java.util.function.Supplier) ImmutableList(com.google.common.collect.ImmutableList) DefaultSystemEnvironmentProvider(com.android.tools.build.bundletool.model.utils.DefaultSystemEnvironmentProvider) BadgingInfoParser(com.android.tools.build.bundletool.device.BadgingInfoParser) Suppliers(com.google.common.base.Suppliers) Comparator.comparing(java.util.Comparator.comparing) AdbServer(com.android.tools.build.bundletool.device.AdbServer) OutputStream(java.io.OutputStream) ANDROID_HOME_VARIABLE(com.android.tools.build.bundletool.model.utils.SdkToolsLocator.ANDROID_HOME_VARIABLE) FilePreconditions.checkFileExistsAndExecutable(com.android.tools.build.bundletool.model.utils.files.FilePreconditions.checkFileExistsAndExecutable) AdbCommand(com.android.tools.build.bundletool.androidtools.AdbCommand) Files(java.nio.file.Files) ANDROID_SERIAL_VARIABLE(com.android.tools.build.bundletool.commands.CommandUtils.ANDROID_SERIAL_VARIABLE) Collectors.maxBy(java.util.stream.Collectors.maxBy) IOException(java.io.IOException) PackagesParser(com.android.tools.build.bundletool.device.PackagesParser) Streams.stream(com.google.common.collect.Streams.stream) IncompatibleDeviceException(com.android.tools.build.bundletool.model.exceptions.IncompatibleDeviceException) InvalidCommandException(com.android.tools.build.bundletool.model.exceptions.InvalidCommandException) FlagDescription(com.android.tools.build.bundletool.commands.CommandHelp.FlagDescription) Versions(com.android.tools.build.bundletool.model.utils.Versions) CommandDescription(com.android.tools.build.bundletool.commands.CommandHelp.CommandDescription) InputStream(java.io.InputStream) Aapt2Command(com.android.tools.build.bundletool.androidtools.Aapt2Command) Device(com.android.tools.build.bundletool.device.Device) DeviceAnalyzer(com.android.tools.build.bundletool.device.DeviceAnalyzer) DeviceSpec(com.android.bundle.Devices.DeviceSpec) TempDirectory(com.android.tools.build.bundletool.io.TempDirectory) InstalledPackageInfo(com.android.tools.build.bundletool.device.PackagesParser.InstalledPackageInfo) AdbServer(com.android.tools.build.bundletool.device.AdbServer) AdbCommand(com.android.tools.build.bundletool.androidtools.AdbCommand)

Aggregations

TempDirectory (com.android.tools.build.bundletool.io.TempDirectory)10 IOException (java.io.IOException)8 UncheckedIOException (java.io.UncheckedIOException)8 Path (java.nio.file.Path)8 ZipFile (java.util.zip.ZipFile)6 AdbServer (com.android.tools.build.bundletool.device.AdbServer)5 DeviceAnalyzer (com.android.tools.build.bundletool.device.DeviceAnalyzer)5 ZipPath (com.android.tools.build.bundletool.model.ZipPath)5 DeviceSpec (com.android.bundle.Devices.DeviceSpec)4 AdbShellCommandTask (com.android.tools.build.bundletool.device.AdbShellCommandTask)4 BadgingInfo (com.android.tools.build.bundletool.device.BadgingInfoParser.BadgingInfo)4 Device (com.android.tools.build.bundletool.device.Device)4 IncompatibleDeviceException (com.android.tools.build.bundletool.model.exceptions.IncompatibleDeviceException)4 InvalidCommandException (com.android.tools.build.bundletool.model.exceptions.InvalidCommandException)4 ImmutableList (com.google.common.collect.ImmutableList)4 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)4 Files (java.nio.file.Files)4 Aapt2Command (com.android.tools.build.bundletool.androidtools.Aapt2Command)3 AdbCommand (com.android.tools.build.bundletool.androidtools.AdbCommand)3 CommandDescription (com.android.tools.build.bundletool.commands.CommandHelp.CommandDescription)3