From 447ba503328ea6ae002b3e25b89c90740814b097 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sun, 7 Mar 2021 15:06:45 -0500 Subject: [PATCH] refactor: drop author tags and support javadocs --- .../src/main/java/brut/apktool/Main.java | 4 -- .../main/java/android/util/AttributeSet.java | 6 +- .../main/java/android/util/TypedValue.java | 15 ++--- .../src/main/java/brut/androlib/Androlib.java | 3 - .../java/brut/androlib/AndrolibException.java | 3 - .../main/java/brut/androlib/ApkDecoder.java | 3 - .../java/brut/androlib/ApktoolProperties.java | 3 - .../err/CantFind9PatchChunkException.java | 3 - .../err/CantFindFrameworkResException.java | 3 - .../androlib/err/InFileNotFoundException.java | 3 - .../androlib/err/OutDirExistsException.java | 3 - .../err/UndefinedResObjectException.java | 3 - .../main/java/brut/androlib/mod/SmaliMod.java | 17 +++--- .../brut/androlib/res/AndrolibResources.java | 3 - .../androlib/res/data/ResConfigFlags.java | 3 - .../java/brut/androlib/res/data/ResID.java | 3 - .../brut/androlib/res/data/ResPackage.java | 3 - .../brut/androlib/res/data/ResResSpec.java | 9 +-- .../brut/androlib/res/data/ResResource.java | 3 - .../java/brut/androlib/res/data/ResTable.java | 3 - .../java/brut/androlib/res/data/ResType.java | 3 - .../brut/androlib/res/data/ResTypeSpec.java | 3 - .../androlib/res/data/ResUnknownFiles.java | 3 - .../brut/androlib/res/data/ResValuesFile.java | 3 - .../res/data/value/ResArrayValue.java | 7 +-- .../brut/androlib/res/data/value/ResAttr.java | 6 +- .../androlib/res/data/value/ResBagValue.java | 6 +- .../androlib/res/data/value/ResBoolValue.java | 3 - .../res/data/value/ResColorValue.java | 3 - .../res/data/value/ResDimenValue.java | 3 - .../androlib/res/data/value/ResEnumAttr.java | 6 +- .../androlib/res/data/value/ResFileValue.java | 3 - .../androlib/res/data/value/ResFlagsAttr.java | 6 +- .../res/data/value/ResFloatValue.java | 3 - .../res/data/value/ResFractionValue.java | 3 - .../androlib/res/data/value/ResIdValue.java | 6 +- .../res/data/value/ResIntBasedValue.java | 3 - .../androlib/res/data/value/ResIntValue.java | 3 - .../res/data/value/ResPluralsValue.java | 6 +- .../res/data/value/ResReferenceValue.java | 3 - .../res/data/value/ResScalarValue.java | 6 +- .../res/data/value/ResStringValue.java | 7 +-- .../res/data/value/ResStyleValue.java | 6 +- .../androlib/res/data/value/ResValue.java | 3 - .../res/data/value/ResValueFactory.java | 3 - .../androlib/res/decoder/ARSCDecoder.java | 3 - .../res/decoder/AXmlResourceParser.java | 20 +++---- .../res/decoder/Res9patchStreamDecoder.java | 9 +-- .../androlib/res/decoder/ResAttrDecoder.java | 3 - .../androlib/res/decoder/ResFileDecoder.java | 3 - .../res/decoder/ResRawStreamDecoder.java | 6 +- .../res/decoder/ResStreamDecoder.java | 3 - .../decoder/ResStreamDecoderContainer.java | 3 - .../androlib/res/decoder/StringBlock.java | 30 ++++------ .../res/decoder/XmlPullStreamDecoder.java | 16 ++---- .../androlib/res/util/ExtMXSerializer.java | 8 +-- .../androlib/res/util/ExtXmlSerializer.java | 6 +- .../res/xml/ResValuesXmlSerializable.java | 6 +- .../androlib/res/xml/ResXmlEncodable.java | 3 - .../brut/androlib/res/xml/ResXmlEncoders.java | 6 +- .../brut/androlib/res/xml/ResXmlPatcher.java | 55 +++++++------------ .../java/brut/androlib/src/SmaliBuilder.java | 14 ++--- .../java/brut/androlib/src/SmaliDecoder.java | 3 - .../org/xmlpull/renamed/MXSerializer.java | 5 +- .../test/java/brut/androlib/TestUtils.java | 19 ++++--- .../aapt1/AndroidOreoNotSparseTest.java | 3 - .../androlib/aapt1/AndroidOreoSparseTest.java | 3 - .../androlib/aapt1/BuildAndDecodeJarTest.java | 3 - .../androlib/aapt1/BuildAndDecodeTest.java | 24 ++++---- .../androlib/aapt1/DebugTagRetainedTest.java | 3 - .../aapt1/EmptyResourcesArscTest.java | 3 - .../aapt1/ReferenceVersionCodeTest.java | 3 - .../aapt1/UnknownCompressionTest.java | 3 - .../androlib/aapt2/BuildAndDecodeTest.java | 3 - .../DebuggableFalseChangeToTrueTest.java | 12 ++-- .../aapt2/DebuggableTrueAddedTest.java | 12 ++-- .../aapt2/DebuggableTrueRetainedTest.java | 12 ++-- .../decode/DecodeKotlinCoroutinesTest.java | 18 ++---- .../androlib/decode/DecodeKotlinTest.java | 3 - .../DoubleExtensionUnknownFileTest.java | 3 - .../androlib/decode/ExternalEntityTest.java | 3 - .../androlib/decode/MinifiedArscTest.java | 3 - .../decode/MissingVersionManifestTest.java | 3 - .../decode/OutsideOfDirectoryEntryTest.java | 3 - .../encoders/PositionalEnumerationTest.java | 3 - .../util/UnknownDirectoryTraversalTest.java | 3 - .../main/java/brut/common/BrutException.java | 3 - .../src/main/java/brut/directory/DirUtil.java | 3 - .../src/main/java/brut/directory/ExtFile.java | 3 - .../src/main/java/brut/util/BrutIO.java | 15 ++--- .../java/brut/util/DataInputDelegate.java | 3 - brut.j.util/src/main/java/brut/util/Duo.java | 3 - .../src/main/java/brut/util/ExtDataInput.java | 3 - brut.j.util/src/main/java/brut/util/Jar.java | 13 +---- brut.j.util/src/main/java/brut/util/OS.java | 7 +-- 95 files changed, 162 insertions(+), 441 deletions(-) diff --git a/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java b/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java index 1ffad395..4139a59c 100644 --- a/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java +++ b/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java @@ -30,10 +30,6 @@ import java.io.File; import java.io.IOException; import java.util.logging.*; -/** - * @author Ryszard Wiśniewski - * @author Connor Tumbleson - */ public class Main { public static void main(String[] args) throws IOException, InterruptedException, BrutException { diff --git a/brut.apktool/apktool-lib/src/main/java/android/util/AttributeSet.java b/brut.apktool/apktool-lib/src/main/java/android/util/AttributeSet.java index dd745a85..f1131441 100644 --- a/brut.apktool/apktool-lib/src/main/java/android/util/AttributeSet.java +++ b/brut.apktool/apktool-lib/src/main/java/android/util/AttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Android4ME + * Copyright 2008 Android4ME / Dmitry Skiba * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,6 @@ */ package android.util; -/** - * @author Dmitry Skiba - * - */ public interface AttributeSet { int getAttributeCount(); diff --git a/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java b/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java index f6e10a16..c61c17ed 100644 --- a/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java +++ b/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java @@ -17,7 +17,7 @@ package android.util; /** * Container for a dynamically typed data value. Primarily used with - * {@link android.content.res.Resources} for holding resource values. + * Resources for holding resource values. */ public class TypedValue { /** The value contains no data. */ @@ -196,14 +196,13 @@ public class TypedValue { /* ------------------------------------------------------------ */ /** - * If {@link #density} is equal to this value, then the density should be + * If density is equal to this value, then the density should be * treated as the system's default density value: - * {@link DisplayMetrics#DENSITY_DEFAULT}. */ public static final int DENSITY_DEFAULT = 0; /** - * If {@link #density} is equal to this value, then there is no density + * If density is equal to this value, then there is no density * associated with the resource and it should not be scaled. */ public static final int DENSITY_NONE = 0xffff; @@ -243,13 +242,11 @@ public class TypedValue { private static final String[] FRACTION_UNIT_STRS = new String[] { "%", "%p" }; /** - * Perform type conversion as per {@link #coerceToString()} on an explicitly + * Perform type conversion as per coerceToString on an explicitly * supplied type and data. * - * @param type - * The data type identifier. - * @param data - * The data value. + * @param type The data type identifier. + * @param data The data value. * * @return String The coerced string value. If the value is null or the type * is not known, null is returned. diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java index e9067504..35fe942f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java @@ -45,9 +45,6 @@ import java.util.zip.ZipOutputStream; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; -/** - * @author Ryszard Wiśniewski - */ public class Androlib { private final AndrolibResources mAndRes = new AndrolibResources(); protected final ResUnknownFiles mResUnknownFiles = new ResUnknownFiles(); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/AndrolibException.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/AndrolibException.java index d76581d4..22d70658 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/AndrolibException.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/AndrolibException.java @@ -18,9 +18,6 @@ package brut.androlib; import brut.common.BrutException; -/** - * @author Ryszard Wiśniewski - */ public class AndrolibException extends BrutException { public AndrolibException() { } diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java index bba38046..a301ee59 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java @@ -38,9 +38,6 @@ import java.io.IOException; import java.util.*; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class ApkDecoder { public ApkDecoder() { this(new Androlib()); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApktoolProperties.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApktoolProperties.java index ebd4fd94..340d3e59 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApktoolProperties.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApktoolProperties.java @@ -21,9 +21,6 @@ import java.io.InputStream; import java.util.Properties; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class ApktoolProperties { public static String get(String key) { return get().getProperty(key); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFind9PatchChunkException.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFind9PatchChunkException.java index 5f204115..de2566c8 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFind9PatchChunkException.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFind9PatchChunkException.java @@ -18,9 +18,6 @@ package brut.androlib.err; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class CantFind9PatchChunkException extends AndrolibException { public CantFind9PatchChunkException(String message, Throwable cause) { super(message, cause); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFindFrameworkResException.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFindFrameworkResException.java index d7867f29..4a81dc6f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFindFrameworkResException.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/CantFindFrameworkResException.java @@ -18,9 +18,6 @@ package brut.androlib.err; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class CantFindFrameworkResException extends AndrolibException { public CantFindFrameworkResException(int id) { mPkgId = id; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/InFileNotFoundException.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/InFileNotFoundException.java index a682b905..a2ce5fbe 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/InFileNotFoundException.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/InFileNotFoundException.java @@ -18,9 +18,6 @@ package brut.androlib.err; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class InFileNotFoundException extends AndrolibException { public InFileNotFoundException() { } diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/OutDirExistsException.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/OutDirExistsException.java index 30c586b5..0733d414 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/OutDirExistsException.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/OutDirExistsException.java @@ -18,9 +18,6 @@ package brut.androlib.err; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class OutDirExistsException extends AndrolibException { public OutDirExistsException() { } diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/UndefinedResObjectException.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/UndefinedResObjectException.java index b2a17830..8f360799 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/UndefinedResObjectException.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/err/UndefinedResObjectException.java @@ -18,9 +18,6 @@ package brut.androlib.err; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class UndefinedResObjectException extends AndrolibException { public UndefinedResObjectException(String message) { super(message); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java index d951d91e..93ac1a0f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java @@ -16,19 +16,20 @@ */ package brut.androlib.mod; -import java.io.*; -import java.nio.charset.StandardCharsets; - -import org.antlr.runtime.*; +import org.antlr.runtime.CommonTokenStream; +import org.antlr.runtime.RecognitionException; +import org.antlr.runtime.Token; import org.antlr.runtime.tree.CommonTree; import org.antlr.runtime.tree.CommonTreeNodeStream; import org.apache.commons.io.IOUtils; import org.jf.dexlib2.writer.builder.DexBuilder; -import org.jf.smali.*; +import org.jf.smali.smaliFlexLexer; +import org.jf.smali.smaliParser; +import org.jf.smali.smaliTreeWalker; + +import java.io.*; +import java.nio.charset.StandardCharsets; -/** - * @author Ryszard Wiśniewski - */ public class SmaliMod { public static boolean assembleSmaliFile(String smali, DexBuilder dexBuilder, int apiLevel, boolean verboseErrors, diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java index 90f87dbc..79023d1a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java @@ -44,9 +44,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipOutputStream; -/** - * @author Ryszard Wiśniewski - */ final public class AndrolibResources { public ResTable getResTable(ExtFile apkFile) throws AndrolibException { return getResTable(apkFile, true); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResConfigFlags.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResConfigFlags.java index 40819a7d..5069d496 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResConfigFlags.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResConfigFlags.java @@ -18,9 +18,6 @@ package brut.androlib.res.data; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class ResConfigFlags { public final short mcc; public final short mnc; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java index c487f4a5..a5142ca7 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java @@ -16,9 +16,6 @@ */ package brut.androlib.res.data; -/** - * @author Ryszard Wiśniewski - */ public class ResID { public final int package_; public final int type; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java index 3895abcb..bd1b34f5 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java @@ -25,9 +25,6 @@ import brut.util.Duo; import java.util.*; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class ResPackage { private final ResTable mResTable; private final int mId; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResSpec.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResSpec.java index 37a7b5b5..12fc7f4c 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResSpec.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResSpec.java @@ -18,12 +18,13 @@ package brut.androlib.res.data; import brut.androlib.AndrolibException; import brut.androlib.err.UndefinedResObjectException; -import java.util.*; import org.apache.commons.lang3.StringUtils; -/** - * @author Ryszard Wiśniewski - */ +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + public class ResResSpec { private final ResID mId; private final String mName; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResource.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResource.java index 3d605b12..3323c489 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResource.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResResource.java @@ -19,9 +19,6 @@ package brut.androlib.res.data; import brut.androlib.AndrolibException; import brut.androlib.res.data.value.ResValue; -/** - * @author Ryszard Wiśniewski - */ public class ResResource { private final ResType mConfig; private final ResResSpec mResSpec; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java index c842c32f..fa9d57e9 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java @@ -23,9 +23,6 @@ import brut.androlib.res.AndrolibResources; import brut.androlib.res.data.value.ResValue; import java.util.*; -/** - * @author Ryszard Wiśniewski - */ public class ResTable { private final AndrolibResources mAndRes; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResType.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResType.java index 1c0c6ec8..840c13c2 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResType.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResType.java @@ -20,9 +20,6 @@ import brut.androlib.AndrolibException; import brut.androlib.err.UndefinedResObjectException; import java.util.*; -/** - * @author Ryszard Wiśniewski - */ public class ResType { private final ResConfigFlags mFlags; private final Map mResources = new LinkedHashMap(); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTypeSpec.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTypeSpec.java index 2c000bd3..f1630f00 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTypeSpec.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTypeSpec.java @@ -20,9 +20,6 @@ import brut.androlib.AndrolibException; import brut.androlib.err.UndefinedResObjectException; import java.util.*; -/** - * @author Ryszard Wiśniewski - */ public final class ResTypeSpec { public static final String RES_TYPE_NAME_ARRAY = "array"; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResUnknownFiles.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResUnknownFiles.java index 3a13f972..fb45523b 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResUnknownFiles.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResUnknownFiles.java @@ -19,9 +19,6 @@ package brut.androlib.res.data; import java.util.LinkedHashMap; import java.util.Map; -/** - * @author Connor Tumbleson - */ public class ResUnknownFiles { private final Map mUnknownFiles = new LinkedHashMap<>(); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResValuesFile.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResValuesFile.java index 85f926e4..e41a4896 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResValuesFile.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResValuesFile.java @@ -19,9 +19,6 @@ package brut.androlib.res.data; import java.util.LinkedHashSet; import java.util.Set; -/** - * @author Ryszard Wiśniewski - */ public class ResValuesFile { private final ResPackage mPackage; private final ResTypeSpec mType; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java index c5e174f9..9b9be28b 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java @@ -20,14 +20,11 @@ import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; import brut.util.Duo; +import org.xmlpull.v1.XmlSerializer; + import java.io.IOException; import java.util.Arrays; -import org.xmlpull.v1.XmlSerializer; - -/** - * @author Ryszard Wiśniewski - */ public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializable { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java index c5799cfa..74a8a8e4 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java @@ -21,12 +21,10 @@ import brut.androlib.res.data.ResPackage; import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; import brut.util.Duo; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public class ResAttr extends ResBagValue implements ResValuesXmlSerializable { ResAttr(ResReferenceValue parentVal, int type, Integer min, Integer max, Boolean l10n) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java index f71dc25f..5ef2dcc2 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java @@ -20,12 +20,10 @@ import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; import brut.util.Duo; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public class ResBagValue extends ResValue implements ResValuesXmlSerializable { protected final ResReferenceValue mParent; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java index aa9d84a6..6190a004 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java @@ -16,9 +16,6 @@ */ package brut.androlib.res.data.value; -/** - * @author Ryszard Wiśniewski - */ public class ResBoolValue extends ResScalarValue { private final boolean mValue; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResColorValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResColorValue.java index b7bb7d04..b60a7b95 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResColorValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResColorValue.java @@ -16,9 +16,6 @@ */ package brut.androlib.res.data.value; -/** - * @author Ryszard Wiśniewski - */ public class ResColorValue extends ResIntValue { public ResColorValue(int value, String rawValue) { super(value, rawValue, "color"); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResDimenValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResDimenValue.java index e0178cfc..e04b3216 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResDimenValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResDimenValue.java @@ -19,9 +19,6 @@ package brut.androlib.res.data.value; import android.util.TypedValue; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class ResDimenValue extends ResIntValue { public ResDimenValue(int value, String rawValue) { super(value, rawValue, "dimen"); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResEnumAttr.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResEnumAttr.java index 9571df65..38332503 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResEnumAttr.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResEnumAttr.java @@ -20,14 +20,12 @@ import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResSpec; import brut.androlib.res.data.ResResource; import brut.util.Duo; +import org.xmlpull.v1.XmlSerializer; + import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ public class ResEnumAttr extends ResAttr { ResEnumAttr(ResReferenceValue parent, int type, Integer min, Integer max, Boolean l10n, Duo[] items) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFileValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFileValue.java index 887ffc47..d94ed4e0 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFileValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFileValue.java @@ -18,9 +18,6 @@ package brut.androlib.res.data.value; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class ResFileValue extends ResIntBasedValue { private final String mPath; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFlagsAttr.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFlagsAttr.java index e5f33044..77cb9000 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFlagsAttr.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFlagsAttr.java @@ -19,14 +19,12 @@ package brut.androlib.res.data.value; import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResource; import brut.util.Duo; +import org.xmlpull.v1.XmlSerializer; + import java.io.IOException; import java.util.Arrays; import java.util.Comparator; -import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ public class ResFlagsAttr extends ResAttr { ResFlagsAttr(ResReferenceValue parent, int type, Integer min, Integer max, Boolean l10n, Duo[] items) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFloatValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFloatValue.java index 4463f7de..522be364 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFloatValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFloatValue.java @@ -16,9 +16,6 @@ */ package brut.androlib.res.data.value; -/** - * @author Ryszard Wiśniewski - */ public class ResFloatValue extends ResScalarValue { private final float mValue; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFractionValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFractionValue.java index 0f055100..964bad64 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFractionValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResFractionValue.java @@ -19,9 +19,6 @@ package brut.androlib.res.data.value; import android.util.TypedValue; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class ResFractionValue extends ResIntValue { public ResFractionValue(int value, String rawValue) { super(value, rawValue, "fraction"); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java index d527da53..b362768b 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java @@ -19,12 +19,10 @@ package brut.androlib.res.data.value; import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public class ResIdValue extends ResValue implements ResValuesXmlSerializable { @Override public void serializeToResValuesXml(XmlSerializer serializer, diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntBasedValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntBasedValue.java index ea3d70a8..99ee4e5f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntBasedValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntBasedValue.java @@ -16,9 +16,6 @@ */ package brut.androlib.res.data.value; -/** - * @author Matt Mastracci - */ public class ResIntBasedValue extends ResValue { private final int mRawIntValue; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java index 29be8585..2cf66694 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java @@ -19,9 +19,6 @@ package brut.androlib.res.data.value; import android.util.TypedValue; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public class ResIntValue extends ResScalarValue { protected final int mValue; private int type; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java index e7859ad8..cd24d0b4 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java @@ -21,12 +21,10 @@ import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; import brut.androlib.res.xml.ResXmlEncoders; import brut.util.Duo; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public class ResPluralsValue extends ResBagValue implements ResValuesXmlSerializable { ResPluralsValue(ResReferenceValue parent, diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResReferenceValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResReferenceValue.java index 64d7fbf2..6195272d 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResReferenceValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResReferenceValue.java @@ -21,9 +21,6 @@ import brut.androlib.err.UndefinedResObjectException; import brut.androlib.res.data.ResPackage; import brut.androlib.res.data.ResResSpec; -/** - * @author Ryszard Wiśniewski - */ public class ResReferenceValue extends ResIntValue { private final ResPackage mPackage; private final boolean mTheme; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java index cdcdd5af..6ebdc99f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java @@ -21,12 +21,10 @@ import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; import brut.androlib.res.xml.ResXmlEncodable; import brut.androlib.res.xml.ResXmlEncoders; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public abstract class ResScalarValue extends ResIntBasedValue implements ResXmlEncodable, ResValuesXmlSerializable { protected final String mType; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java index 1c3c61d6..5cc49bbc 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java @@ -19,14 +19,11 @@ package brut.androlib.res.data.value; import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResXmlEncoders; +import org.xmlpull.v1.XmlSerializer; + import java.io.IOException; import java.util.regex.Pattern; -import org.xmlpull.v1.XmlSerializer; - -/** - * @author Ryszard Wiśniewski - */ public class ResStringValue extends ResScalarValue { public ResStringValue(String value, int rawValue) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java index 5be1b7c0..fdf5904f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java @@ -21,13 +21,11 @@ import brut.androlib.res.data.ResResSpec; import brut.androlib.res.data.ResResource; import brut.androlib.res.xml.ResValuesXmlSerializable; import brut.util.Duo; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; + +import java.io.IOException; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class ResStyleValue extends ResBagValue implements ResValuesXmlSerializable { ResStyleValue(ResReferenceValue parent, diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValue.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValue.java index 75cdeedd..89773d05 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValue.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValue.java @@ -16,9 +16,6 @@ */ package brut.androlib.res.data.value; -/** - * @author Ryszard Wiśniewski - */ public class ResValue { } diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java index d3f7a3b1..7f713908 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java @@ -22,9 +22,6 @@ import brut.androlib.res.data.ResPackage; import brut.androlib.res.data.ResTypeSpec; import brut.util.Duo; -/** - * @author Ryszard Wiśniewski - */ public class ResValueFactory { private final ResPackage mPackage; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java index 7913b30d..8bc8a06a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java @@ -31,9 +31,6 @@ import java.util.*; import java.util.logging.Logger; import org.apache.commons.io.input.CountingInputStream; -/** - * @author Ryszard Wiśniewski - */ public class ARSCDecoder { public static ARSCData decode(InputStream arscStream, boolean findFlagsOffsets, boolean keepBroken) throws AndrolibException { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/AXmlResourceParser.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/AXmlResourceParser.java index b2ab81b7..67038930 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/AXmlResourceParser.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/AXmlResourceParser.java @@ -23,28 +23,24 @@ import brut.androlib.res.data.ResID; import brut.androlib.res.xml.ResXmlEncoders; import brut.util.ExtDataInput; import com.google.common.io.LittleEndianDataInputStream; +import org.xmlpull.v1.XmlPullParserException; import java.io.DataInput; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.logging.Level; import java.util.logging.Logger; -import org.xmlpull.v1.XmlPullParserException; /** - * @author Ryszard Wiśniewski - * @author Dmitry Skiba + * Binary xml files parser. * - * Binary xml files parser. - * - * Parser has only two states: (1) Operational state, which parser - * obtains after first successful call to next() and retains until - * open(), close(), or failed call to next(). (2) Closed state, which - * parser obtains after open(), close(), or failed call to next(). In - * this state methods return invalid values or throw exceptions. - * - * TODO: * check all methods in closed state + * Parser has only two states: (1) Operational state, which parser + * obtains after first successful call to next() and retains until + * open(), close(), or failed call to next(). (2) Closed state, which + * parser obtains after open(), close(), or failed call to next(). In + * this state methods return invalid values or throw exceptions. * + * TODO: * check all methods in closed state */ public class AXmlResourceParser implements XmlResourceParser { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/Res9patchStreamDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/Res9patchStreamDecoder.java index efd4dc4d..bf0ab05a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/Res9patchStreamDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/Res9patchStreamDecoder.java @@ -19,17 +19,14 @@ package brut.androlib.res.decoder; import brut.androlib.AndrolibException; import brut.androlib.err.CantFind9PatchChunkException; import brut.util.ExtDataInput; +import org.apache.commons.io.IOUtils; + +import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.awt.image.Raster; import java.awt.image.WritableRaster; import java.io.*; -import javax.imageio.ImageIO; -import org.apache.commons.io.IOUtils; - -/** - * @author Ryszard Wiśniewski - */ public class Res9patchStreamDecoder implements ResStreamDecoder { @Override public void decode(InputStream in, OutputStream out) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResAttrDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResAttrDecoder.java index 6708eb96..b227b9f5 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResAttrDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResAttrDecoder.java @@ -23,9 +23,6 @@ import brut.androlib.res.data.ResResSpec; import brut.androlib.res.data.value.ResAttr; import brut.androlib.res.data.value.ResScalarValue; -/** - * @author Ryszard Wiśniewski - */ public class ResAttrDecoder { public String decode(int type, int value, String rawValue, int attrResId) throws AndrolibException { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResFileDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResFileDecoder.java index 3d26fa56..6f5dd89c 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResFileDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResFileDecoder.java @@ -30,9 +30,6 @@ import java.io.*; import java.util.logging.Level; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class ResFileDecoder { private final ResStreamDecoderContainer mDecoders; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResRawStreamDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResRawStreamDecoder.java index 93db96a0..b429fba4 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResRawStreamDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResRawStreamDecoder.java @@ -17,14 +17,12 @@ package brut.androlib.res.decoder; import brut.androlib.AndrolibException; +import org.apache.commons.io.IOUtils; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import org.apache.commons.io.IOUtils; -/** - * @author Ryszard Wiśniewski - */ public class ResRawStreamDecoder implements ResStreamDecoder { @Override public void decode(InputStream in, OutputStream out) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoder.java index e2f31487..92a9cc13 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoder.java @@ -20,9 +20,6 @@ import brut.androlib.AndrolibException; import java.io.InputStream; import java.io.OutputStream; -/** - * @author Ryszard Wiśniewski - */ public interface ResStreamDecoder { public void decode(InputStream in, OutputStream out) throws AndrolibException; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoderContainer.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoderContainer.java index a9a99bfb..60408b21 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoderContainer.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResStreamDecoderContainer.java @@ -22,9 +22,6 @@ import java.io.OutputStream; import java.util.HashMap; import java.util.Map; -/** - * @author Ryszard Wiśniewski - */ public class ResStreamDecoderContainer { private final Map mDecoders = new HashMap(); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java index a06ff9e2..24682f65 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java @@ -25,20 +25,15 @@ import java.nio.ByteBuffer; import java.nio.charset.*; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - * @author Dmitry Skiba - * - * Block of strings, used in binary xml and arsc. - * - * TODO: - implement get() - * - */ public class StringBlock { /** * Reads whole (including chunk type) string block from stream. Stream must * be at the chunk type. + * @param reader ExtDataInput + * @return StringBlock + * + * @throws IOException Parsing resources.arsc error */ public static StringBlock read(ExtDataInput reader) throws IOException { reader.skipCheckChunkTypeInt(CHUNK_STRINGPOOL_TYPE, CHUNK_NULL_TYPE); @@ -81,6 +76,7 @@ public class StringBlock { /** * Returns number of strings in block. + * @return int */ public int getCount() { return m_stringOffsets != null ? m_stringOffsets.length : 0; @@ -88,6 +84,8 @@ public class StringBlock { /** * Returns raw string (without any styling information) at specified index. + * @param index int + * @return String */ public String getString(int index) { if (index < 0 || m_stringOffsets == null || index >= m_stringOffsets.length) { @@ -108,17 +106,10 @@ public class StringBlock { return decodeString(offset, length); } - /** - * Not yet implemented. - * - * Returns string with style information (if any). - */ - public CharSequence get(int index) { - return getString(index); - } - /** * Returns string with style tags (html-like). + * @param index int + * @return String */ public String getHTML(int index) { String raw = getString(index); @@ -228,6 +219,9 @@ public class StringBlock { /** * Finds index of the string. Returns -1 if the string was not found. + * + * @param string String to index location of + * @return int (Returns -1 if not found) */ public int find(String string) { if (string == null) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/XmlPullStreamDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/XmlPullStreamDecoder.java index 1046f9b2..9d73ff7d 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/XmlPullStreamDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/XmlPullStreamDecoder.java @@ -16,12 +16,11 @@ */ package brut.androlib.res.decoder; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - +import brut.androlib.AndrolibException; import brut.androlib.err.AXmlDecodingException; import brut.androlib.err.RawXmlEncounteredException; +import brut.androlib.res.data.ResTable; +import brut.androlib.res.util.ExtXmlSerializer; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.wrapper.XmlPullParserWrapper; @@ -29,13 +28,10 @@ import org.xmlpull.v1.wrapper.XmlPullWrapperFactory; import org.xmlpull.v1.wrapper.XmlSerializerWrapper; import org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper; -import brut.androlib.AndrolibException; -import brut.androlib.res.data.ResTable; -import brut.androlib.res.util.ExtXmlSerializer; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; -/** - * @author Ryszard Wiśniewski - */ public class XmlPullStreamDecoder implements ResStreamDecoder { public XmlPullStreamDecoder(XmlPullParser parser, ExtXmlSerializer serializer) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtMXSerializer.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtMXSerializer.java index a5ae38ec..fda313dd 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtMXSerializer.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtMXSerializer.java @@ -16,12 +16,12 @@ */ package brut.androlib.res.util; -import java.io.*; import org.xmlpull.renamed.MXSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; +import java.io.OutputStream; +import java.io.Writer; + public class ExtMXSerializer extends MXSerializer implements ExtXmlSerializer { @Override public void startDocument(String encoding, Boolean standalone) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtXmlSerializer.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtXmlSerializer.java index 9c775f25..083e17e3 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtXmlSerializer.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/util/ExtXmlSerializer.java @@ -16,12 +16,10 @@ */ package brut.androlib.res.util; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public interface ExtXmlSerializer extends XmlSerializer { public ExtXmlSerializer newLine() throws IOException; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResValuesXmlSerializable.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResValuesXmlSerializable.java index 8921966e..e8fad090 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResValuesXmlSerializable.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResValuesXmlSerializable.java @@ -18,12 +18,10 @@ package brut.androlib.res.xml; import brut.androlib.AndrolibException; import brut.androlib.res.data.ResResource; -import java.io.IOException; import org.xmlpull.v1.XmlSerializer; -/** - * @author Ryszard Wiśniewski - */ +import java.io.IOException; + public interface ResValuesXmlSerializable { public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncodable.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncodable.java index d57f1d40..4ff601b4 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncodable.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncodable.java @@ -18,9 +18,6 @@ package brut.androlib.res.xml; import brut.androlib.AndrolibException; -/** - * @author Ryszard Wiśniewski - */ public interface ResXmlEncodable { public String encodeAsResXmlAttr() throws AndrolibException; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncoders.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncoders.java index 5c6e002e..3275395a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncoders.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlEncoders.java @@ -17,16 +17,12 @@ package brut.androlib.res.xml; import brut.util.Duo; +import org.apache.commons.lang3.StringUtils; import java.awt.event.KeyEvent; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang3.StringUtils; - -/** - * @author Ryszard Wiśniewski - */ public final class ResXmlEncoders { public static String escapeXmlChars(String str) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java index c980c0fd..2ec9a281 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java @@ -16,10 +16,12 @@ */ package brut.androlib.res.xml; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.logging.Logger; +import brut.androlib.AndrolibException; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -29,27 +31,19 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; +import javax.xml.xpath.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.logging.Logger; -import org.w3c.dom.*; -import org.xml.sax.SAXException; - -import brut.androlib.AndrolibException; - -/** - * @author Connor Tumbleson - */ public final class ResXmlPatcher { /** * Removes "debug" tag from file * * @param file AndroidManifest file - * @throws AndrolibException + * @throws AndrolibException Error reading Manifest file */ public static void removeApplicationDebugTag(File file) throws AndrolibException { if (file.exists()) { @@ -77,9 +71,8 @@ public final class ResXmlPatcher { * Sets "debug" tag in the file to true * * @param file AndroidManifest file - * @throws AndrolibException */ - public static void setApplicationDebugTagTrue(File file) throws AndrolibException { + public static void setApplicationDebugTagTrue(File file) { if (file.exists()) { try { Document doc = loadDocument(file); @@ -105,18 +98,17 @@ public final class ResXmlPatcher { } /** - * Any @string reference in a value in AndroidManifest.xml will break on + * Any @string reference in a provider value in AndroidManifest.xml will break on * build, thus preventing the application from installing. This is from a bug/error * in AOSP where public resources cannot be part of an authorities attribute within - * a tag. + * a provider tag. * * This finds any reference and replaces it with the literal value found in the * res/values/strings.xml file. * * @param file File for AndroidManifest.xml - * @throws AndrolibException */ - public static void fixingPublicAttrsInProviderAttributes(File file) throws AndrolibException { + public static void fixingPublicAttrsInProviderAttributes(File file) { boolean saved = false; if (file.exists()) { try { @@ -177,9 +169,8 @@ public final class ResXmlPatcher { * @param saved boolean on whether we need to save * @param provider Node we are attempting to replace * @return boolean - * @throws AndrolibException setting node value failed */ - private static boolean isSaved(File file, boolean saved, Node provider) throws AndrolibException { + private static boolean isSaved(File file, boolean saved, Node provider) { String reference = provider.getNodeValue(); String replacement = pullValueFromStrings(file.getParentFile(), reference); @@ -196,9 +187,8 @@ public final class ResXmlPatcher { * @param directory Root directory of apk * @param key String reference (ie @string/foo) * @return String|null - * @throws AndrolibException */ - public static String pullValueFromStrings(File directory, String key) throws AndrolibException { + public static String pullValueFromStrings(File directory, String key) { if (key == null || ! key.contains("@")) { return null; } @@ -231,9 +221,8 @@ public final class ResXmlPatcher { * @param directory Root directory of apk * @param key Integer reference (ie @integer/foo) * @return String|null - * @throws AndrolibException */ - public static String pullValueFromIntegers(File directory, String key) throws AndrolibException { + public static String pullValueFromIntegers(File directory, String key) { if (key == null || ! key.contains("@")) { return null; } @@ -264,9 +253,8 @@ public final class ResXmlPatcher { * Removes attributes like "versionCode" and "versionName" from file. * * @param file File representing AndroidManifest.xml - * @throws AndrolibException */ - public static void removeManifestVersions(File file) throws AndrolibException { + public static void removeManifestVersions(File file) { if (file.exists()) { try { Document doc = loadDocument(file); @@ -293,9 +281,8 @@ public final class ResXmlPatcher { * * @param file File for AndroidManifest.xml * @param packageOriginal Package name to replace - * @throws AndrolibException */ - public static void renameManifestPackage(File file, String packageOriginal) throws AndrolibException { + public static void renameManifestPackage(File file, String packageOriginal) { try { Document doc = loadDocument(file); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliBuilder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliBuilder.java index b8590b40..dec23f22 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliBuilder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliBuilder.java @@ -18,19 +18,19 @@ package brut.androlib.src; import brut.androlib.AndrolibException; import brut.androlib.mod.SmaliMod; -import brut.directory.ExtFile; import brut.directory.DirectoryException; -import java.io.*; -import java.util.logging.Logger; - +import brut.directory.ExtFile; import org.antlr.runtime.RecognitionException; import org.jf.dexlib2.Opcodes; import org.jf.dexlib2.writer.builder.DexBuilder; import org.jf.dexlib2.writer.io.FileDataStore; -/** - * @author Ryszard Wiśniewski - */ +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Logger; + public class SmaliBuilder { public static void build(ExtFile smaliDir, File dexFile, int apiLevel) throws AndrolibException { new SmaliBuilder(smaliDir, dexFile, apiLevel).build(); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliDecoder.java index 840a7c5b..b46131c3 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/src/SmaliDecoder.java @@ -29,9 +29,6 @@ import org.jf.dexlib2.iface.MultiDexContainer; import java.io.File; import java.io.IOException; -/** - * @author Ryszard Wiśniewski - */ public class SmaliDecoder { public static void decode(File apkFile, File outDir, String dexName, boolean bakdeb, int api) diff --git a/brut.apktool/apktool-lib/src/main/java/org/xmlpull/renamed/MXSerializer.java b/brut.apktool/apktool-lib/src/main/java/org/xmlpull/renamed/MXSerializer.java index b4982f4d..29a897bf 100644 --- a/brut.apktool/apktool-lib/src/main/java/org/xmlpull/renamed/MXSerializer.java +++ b/brut.apktool/apktool-lib/src/main/java/org/xmlpull/renamed/MXSerializer.java @@ -16,13 +16,13 @@ */ package org.xmlpull.renamed; +import org.xmlpull.v1.XmlSerializer; + import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; -import org.xmlpull.v1.XmlSerializer; - /** * Implementation of XmlSerializer interface from XmlPull V1 API. This * implementation is optimized for performance and low memory footprint. @@ -1009,7 +1009,6 @@ public class MXSerializer implements XmlSerializer { } } - /** simple utility method -- good for debugging */ protected static final String printable(String s) { if (s == null) { return "null"; diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/TestUtils.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/TestUtils.java index 7aabb8cb..7fe355d7 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/TestUtils.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/TestUtils.java @@ -18,7 +18,16 @@ package brut.androlib; import brut.androlib.res.AndrolibResources; import brut.common.BrutException; -import brut.directory.*; +import brut.directory.DirUtil; +import brut.directory.Directory; +import brut.directory.FileDirectory; +import brut.util.OS; +import org.custommonkey.xmlunit.ElementQualifier; +import org.w3c.dom.Element; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlPullParserFactory; + import java.io.*; import java.net.URL; import java.net.URLDecoder; @@ -26,14 +35,6 @@ import java.nio.file.Files; import java.util.HashMap; import java.util.Map; -import brut.util.OS; -import org.custommonkey.xmlunit.ElementQualifier; -import org.w3c.dom.Element; -import org.xmlpull.v1.*; - -/** - * @author Ryszard Wiśniewski - */ public abstract class TestUtils { public static Map parseStringsXml(File file) diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoNotSparseTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoNotSparseTest.java index 8a931d2a..35ff22dc 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoNotSparseTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoNotSparseTest.java @@ -28,9 +28,6 @@ import java.io.File; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class AndroidOreoNotSparseTest extends BaseTest { @BeforeClass public static void beforeClass() throws Exception { diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoSparseTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoSparseTest.java index f232b6ef..fc082e96 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoSparseTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/AndroidOreoSparseTest.java @@ -28,9 +28,6 @@ import java.io.File; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class AndroidOreoSparseTest extends BaseTest { @BeforeClass public static void beforeClass() throws Exception { diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeJarTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeJarTest.java index 26d09cee..c3bed1ee 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeJarTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeJarTest.java @@ -31,9 +31,6 @@ import java.io.File; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class BuildAndDecodeJarTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java index 8a395976..d6afe3eb 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/BuildAndDecodeTest.java @@ -21,25 +21,23 @@ import brut.androlib.ApkDecoder; import brut.androlib.BaseTest; import brut.androlib.TestUtils; import brut.androlib.meta.MetaInfo; -import brut.directory.ExtFile; import brut.common.BrutException; +import brut.directory.ExtFile; import brut.util.OS; - -import java.awt.image.BufferedImage; -import java.io.*; -import java.util.Map; - import brut.util.OSDetection; -import org.junit.*; - -import static org.junit.Assert.*; -import static org.junit.Assume.*; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.util.Map; + +import static org.junit.Assert.*; +import static org.junit.Assume.assumeTrue; -/** - * @author Ryszard Wiśniewski - */ public class BuildAndDecodeTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/DebugTagRetainedTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/DebugTagRetainedTest.java index f251d173..bbcb52ac 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/DebugTagRetainedTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/DebugTagRetainedTest.java @@ -34,9 +34,6 @@ import java.nio.file.Paths; import static org.junit.Assert.assertTrue; import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; -/** - * @author Connor Tumbleson - */ public class DebugTagRetainedTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/EmptyResourcesArscTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/EmptyResourcesArscTest.java index 6f9dff73..6d943fdd 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/EmptyResourcesArscTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/EmptyResourcesArscTest.java @@ -32,9 +32,6 @@ import java.util.logging.Logger; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class EmptyResourcesArscTest { @BeforeClass public static void beforeClass() throws Exception { diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/ReferenceVersionCodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/ReferenceVersionCodeTest.java index 9c59f76e..0ff12f8a 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/ReferenceVersionCodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/ReferenceVersionCodeTest.java @@ -33,9 +33,6 @@ import java.io.IOException; import static org.junit.Assert.assertEquals; -/** - * @author Connor Tumbleson - */ public class ReferenceVersionCodeTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/UnknownCompressionTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/UnknownCompressionTest.java index 35d52153..ecfc44d9 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/UnknownCompressionTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt1/UnknownCompressionTest.java @@ -30,9 +30,6 @@ import java.io.IOException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; -/** - * @author Connor Tumbleson - */ public class UnknownCompressionTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java index 24bb3e4d..ee21d961 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java @@ -30,9 +30,6 @@ import java.io.IOException; import static org.junit.Assert.*; -/** - * @author Ryszard Wiśniewski - */ public class BuildAndDecodeTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableFalseChangeToTrueTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableFalseChangeToTrueTest.java index b02e49f5..18a51f87 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableFalseChangeToTrueTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableFalseChangeToTrueTest.java @@ -20,22 +20,20 @@ import brut.androlib.*; import brut.common.BrutException; import brut.directory.ExtFile; import brut.util.OS; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; import org.custommonkey.xmlunit.XMLUnit; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.xml.sax.SAXException; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class DebuggableFalseChangeToTrueTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueAddedTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueAddedTest.java index c7d88411..520bb0eb 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueAddedTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueAddedTest.java @@ -20,22 +20,20 @@ import brut.androlib.*; import brut.common.BrutException; import brut.directory.ExtFile; import brut.util.OS; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; import org.custommonkey.xmlunit.XMLUnit; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.xml.sax.SAXException; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class DebuggableTrueAddedTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueRetainedTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueRetainedTest.java index 2e2d2360..f87bff0f 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueRetainedTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/DebuggableTrueRetainedTest.java @@ -20,22 +20,20 @@ import brut.androlib.*; import brut.common.BrutException; import brut.directory.ExtFile; import brut.util.OS; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; import org.custommonkey.xmlunit.XMLUnit; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.xml.sax.SAXException; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class DebuggableTrueRetainedTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinCoroutinesTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinCoroutinesTest.java index b623fe09..22685481 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinCoroutinesTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinCoroutinesTest.java @@ -16,6 +16,11 @@ */ package brut.androlib.decode; +import brut.androlib.*; +import brut.common.BrutException; +import brut.directory.DirectoryException; +import brut.directory.ExtFile; +import brut.util.OS; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -25,21 +30,8 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; -import brut.androlib.Androlib; -import brut.androlib.AndrolibException; -import brut.androlib.ApkDecoder; -import brut.androlib.BaseTest; -import brut.androlib.TestUtils; -import brut.common.BrutException; -import brut.directory.DirectoryException; -import brut.directory.ExtFile; -import brut.util.OS; - import static org.junit.Assert.assertTrue; -/** - * @author Adib Faramarzi - */ public class DecodeKotlinCoroutinesTest extends BaseTest { private static String apk = "test-kotlin-coroutines.apk"; diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinTest.java index c07818cd..d0b1ab8d 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DecodeKotlinTest.java @@ -32,9 +32,6 @@ import java.io.IOException; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class DecodeKotlinTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DoubleExtensionUnknownFileTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DoubleExtensionUnknownFileTest.java index 1b3c1a35..40ecde63 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DoubleExtensionUnknownFileTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/DoubleExtensionUnknownFileTest.java @@ -34,9 +34,6 @@ import java.io.IOException; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class DoubleExtensionUnknownFileTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/ExternalEntityTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/ExternalEntityTest.java index 7c282aa6..cf4b7696 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/ExternalEntityTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/ExternalEntityTest.java @@ -34,9 +34,6 @@ import java.nio.file.Paths; import static org.junit.Assert.assertEquals; -/** - * @author Connor Tumbleson - */ public class ExternalEntityTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MinifiedArscTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MinifiedArscTest.java index 892e1462..5f1e355a 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MinifiedArscTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MinifiedArscTest.java @@ -33,9 +33,6 @@ import java.nio.file.Paths; import static org.junit.Assert.assertEquals; -/** - * @author Connor Tumbleson - */ public class MinifiedArscTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MissingVersionManifestTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MissingVersionManifestTest.java index 6b6a72e4..4bba6ceb 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MissingVersionManifestTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/MissingVersionManifestTest.java @@ -33,9 +33,6 @@ import java.io.IOException; import static org.junit.Assert.assertEquals; -/** - * @author Connor Tumbleson - */ public class MissingVersionManifestTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/OutsideOfDirectoryEntryTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/OutsideOfDirectoryEntryTest.java index baf8d648..b24246b4 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/OutsideOfDirectoryEntryTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/decode/OutsideOfDirectoryEntryTest.java @@ -31,9 +31,6 @@ import java.io.File; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class OutsideOfDirectoryEntryTest extends BaseTest { @BeforeClass diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/encoders/PositionalEnumerationTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/encoders/PositionalEnumerationTest.java index 833dcbf1..8c74d75f 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/encoders/PositionalEnumerationTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/encoders/PositionalEnumerationTest.java @@ -22,9 +22,6 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; -/** - * @author Connor Tumbleson - */ public class PositionalEnumerationTest extends BaseTest { @Test diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/util/UnknownDirectoryTraversalTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/util/UnknownDirectoryTraversalTest.java index 98b0ca24..c5e0a286 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/util/UnknownDirectoryTraversalTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/util/UnknownDirectoryTraversalTest.java @@ -35,9 +35,6 @@ import java.io.IOException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -/** - * @author Connor Tumbleson - */ public class UnknownDirectoryTraversalTest extends BaseTest { @BeforeClass diff --git a/brut.j.common/src/main/java/brut/common/BrutException.java b/brut.j.common/src/main/java/brut/common/BrutException.java index 6e7f1039..e9d6ddf1 100644 --- a/brut.j.common/src/main/java/brut/common/BrutException.java +++ b/brut.j.common/src/main/java/brut/common/BrutException.java @@ -16,9 +16,6 @@ */ package brut.common; -/** - * @author Ryszard Wiśniewski - */ public class BrutException extends Exception { public BrutException(Throwable cause) { super(cause); diff --git a/brut.j.dir/src/main/java/brut/directory/DirUtil.java b/brut.j.dir/src/main/java/brut/directory/DirUtil.java index b8adb2ec..c7e96e4e 100644 --- a/brut.j.dir/src/main/java/brut/directory/DirUtil.java +++ b/brut.j.dir/src/main/java/brut/directory/DirUtil.java @@ -25,9 +25,6 @@ import brut.util.OS; import java.io.*; import java.util.logging.Logger; -/** - * @author Ryszard Wiśniewski - */ public class DirUtil { private static final Logger LOGGER = Logger.getLogger(""); diff --git a/brut.j.dir/src/main/java/brut/directory/ExtFile.java b/brut.j.dir/src/main/java/brut/directory/ExtFile.java index f9c47d07..14c02e06 100644 --- a/brut.j.dir/src/main/java/brut/directory/ExtFile.java +++ b/brut.j.dir/src/main/java/brut/directory/ExtFile.java @@ -20,9 +20,6 @@ import java.io.File; import java.io.IOException; import java.net.URI; -/** - * @author Ryszard Wiśniewski - */ public class ExtFile extends File { public ExtFile(File file) { super(file.getPath()); diff --git a/brut.j.util/src/main/java/brut/util/BrutIO.java b/brut.j.util/src/main/java/brut/util/BrutIO.java index b9a156fd..e98e86a7 100644 --- a/brut.j.util/src/main/java/brut/util/BrutIO.java +++ b/brut.j.util/src/main/java/brut/util/BrutIO.java @@ -16,21 +16,18 @@ */ package brut.util; -import java.io.*; -import java.util.zip.CRC32; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; -import java.util.zip.ZipOutputStream; - import brut.common.BrutException; import brut.common.InvalidUnknownFileException; import brut.common.RootUnknownFileException; import brut.common.TraversalUnknownFileException; import org.apache.commons.io.IOUtils; -/** - * @author Ryszard Wiśniewski - */ +import java.io.*; +import java.util.zip.CRC32; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; +import java.util.zip.ZipOutputStream; + public class BrutIO { public static void copyAndClose(InputStream in, OutputStream out) throws IOException { diff --git a/brut.j.util/src/main/java/brut/util/DataInputDelegate.java b/brut.j.util/src/main/java/brut/util/DataInputDelegate.java index 08b3048c..4b511961 100644 --- a/brut.j.util/src/main/java/brut/util/DataInputDelegate.java +++ b/brut.j.util/src/main/java/brut/util/DataInputDelegate.java @@ -19,9 +19,6 @@ package brut.util; import java.io.DataInput; import java.io.IOException; -/** - * @author Ryszard Wiśniewski - */ abstract public class DataInputDelegate implements DataInput { protected final DataInput mDelegate; diff --git a/brut.j.util/src/main/java/brut/util/Duo.java b/brut.j.util/src/main/java/brut/util/Duo.java index 10158cbe..b10c4286 100644 --- a/brut.j.util/src/main/java/brut/util/Duo.java +++ b/brut.j.util/src/main/java/brut/util/Duo.java @@ -16,9 +16,6 @@ */ package brut.util; -/** - * @author Ryszard Wiśniewski - */ public class Duo { public final T1 m1; public final T2 m2; diff --git a/brut.j.util/src/main/java/brut/util/ExtDataInput.java b/brut.j.util/src/main/java/brut/util/ExtDataInput.java index a05412d3..89cb9ead 100644 --- a/brut.j.util/src/main/java/brut/util/ExtDataInput.java +++ b/brut.j.util/src/main/java/brut/util/ExtDataInput.java @@ -18,9 +18,6 @@ package brut.util; import java.io.*; -/** - * @author Ryszard Wiśniewski - */ public class ExtDataInput extends DataInputDelegate { public ExtDataInput(InputStream in) { this((DataInput) new DataInputStream(in)); diff --git a/brut.j.util/src/main/java/brut/util/Jar.java b/brut.j.util/src/main/java/brut/util/Jar.java index 96499001..f3185816 100644 --- a/brut.j.util/src/main/java/brut/util/Jar.java +++ b/brut.j.util/src/main/java/brut/util/Jar.java @@ -16,25 +16,16 @@ */ package brut.util; +import brut.common.BrutException; import org.apache.commons.io.IOUtils; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; +import java.io.*; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ThreadLocalRandom; -import brut.common.BrutException; - -/** - * @author Ryszard Wiśniewski - */ abstract public class Jar { private final static Set mLoaded = new HashSet(); private final static Map mExtracted = new HashMap(); diff --git a/brut.j.util/src/main/java/brut/util/OS.java b/brut.j.util/src/main/java/brut/util/OS.java index 75237277..c70c797c 100644 --- a/brut.j.util/src/main/java/brut/util/OS.java +++ b/brut.j.util/src/main/java/brut/util/OS.java @@ -17,6 +17,8 @@ package brut.util; import brut.common.BrutException; +import org.apache.commons.io.IOUtils; + import java.io.*; import java.util.Arrays; import java.util.concurrent.ExecutorService; @@ -24,11 +26,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.logging.Logger; -import org.apache.commons.io.IOUtils; - -/** - * @author Ryszard Wiśniewski - */ public class OS { private static final Logger LOGGER = Logger.getLogger("");