diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java index 95096d9d..e1d78e84 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/MetaInfo.java @@ -1,3 +1,18 @@ +/** + * Copyright 2014 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package brut.androlib.meta; import org.yaml.snakeyaml.DumperOptions; @@ -9,9 +24,6 @@ import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.Map; -/** - * Created by rover12421 on 1/6/16. - */ public class MetaInfo { public String version; public String apkFileName; @@ -47,7 +59,7 @@ public class MetaInfo { FileOutputStream fos = new FileOutputStream(file); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fos, StandardCharsets.UTF_8); Writer writer = new BufferedWriter(outputStreamWriter) - ){ + ){ save(writer); } } diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/PackageInfo.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/PackageInfo.java index fff48594..b9fc3f3f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/PackageInfo.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/PackageInfo.java @@ -1,8 +1,20 @@ +/** + * Copyright 2014 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package brut.androlib.meta; -/** - * Created by rover12421 on 1/6/16. - */ public class PackageInfo { public String forcedPackageId; public String renameManifestPackage; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExConstructor.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExConstructor.java index 665c0a20..bcb09771 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExConstructor.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExConstructor.java @@ -1,3 +1,18 @@ +/** + * Copyright 2014 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package brut.androlib.meta; import org.yaml.snakeyaml.constructor.AbstractConstruct; @@ -6,9 +21,6 @@ import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.nodes.ScalarNode; import org.yaml.snakeyaml.nodes.Tag; -/** - * Created by rover12421 on 1/7/16. - */ public class StringExConstructor extends Constructor { public StringExConstructor() { this.yamlConstructors.put(Tag.STR, new ConstructStringEx()); @@ -16,7 +28,7 @@ public class StringExConstructor extends Constructor { private class ConstructStringEx extends AbstractConstruct { public Object construct(Node node) { - String val = (String) constructScalar((ScalarNode)node); + String val = (String) constructScalar((ScalarNode) node); return YamlStringEscapeUtils.unescapeString(val); } } diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExRepresent.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExRepresent.java index 5f7708c0..a0499e9a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExRepresent.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/StringExRepresent.java @@ -1,11 +1,23 @@ +/** + * Copyright 2014 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package brut.androlib.meta; import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.representer.Representer; -/** - * Created by rover12421 on 1/7/16. - */ public class StringExRepresent extends Representer { public StringExRepresent() { RepresentStringEx representStringEx = new RepresentStringEx(); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/UsesFramework.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/UsesFramework.java index eac37534..3184d7da 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/UsesFramework.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/UsesFramework.java @@ -1,10 +1,22 @@ +/** + * Copyright 2014 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package brut.androlib.meta; import java.util.List; -/** - * Created by rover12421 on 1/6/16. - */ public class UsesFramework { public List ids; public String tag; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/VersionInfo.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/VersionInfo.java index ae1a4f91..2e9ff3fe 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/VersionInfo.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/VersionInfo.java @@ -1,8 +1,20 @@ +/** + * Copyright 2014 Ryszard Wiśniewski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package brut.androlib.meta; -/** - * Created by rover12421 on 1/6/16. - */ public class VersionInfo { public String versionCode; public String versionName; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/YamlStringEscapeUtils.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/YamlStringEscapeUtils.java index 86e1de6b..eb5e188c 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/YamlStringEscapeUtils.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/meta/YamlStringEscapeUtils.java @@ -68,7 +68,7 @@ public class YamlStringEscapeUtils { sz = str.length(); for (int i = 0; i < sz; i++) { char ch = str.charAt(i); -// "[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFD]" + // "[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFD]" // handle unicode if (ch > 0xFFFD) { out.write("\\u" + CharSequenceTranslator.hex(ch)); 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 0ac4d25b..497433f3 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 @@ -21,19 +21,14 @@ import brut.androlib.AndrolibException; import brut.androlib.res.data.*; import brut.androlib.res.data.value.*; import brut.util.Duo; +import brut.androlib.res.data.ResTable; import brut.util.ExtDataInput; import com.mindprod.ledatastream.LEDataInputStream; -import org.apache.commons.io.input.CountingInputStream; - -import java.io.EOFException; -import java.io.IOException; -import java.io.InputStream; +import java.io.*; import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; +import java.util.*; import java.util.logging.Logger; +import org.apache.commons.io.input.CountingInputStream; /** * @author Ryszard Wiśniewski 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 bbdb7788..c497f442 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 @@ -20,19 +20,17 @@ import brut.androlib.AndrolibException; import brut.androlib.mod.SmaliMod; import brut.androlib.res.util.ExtFile; import brut.directory.DirectoryException; +import java.io.*; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.logging.Logger; + import org.antlr.runtime.RecognitionException; import org.apache.commons.io.IOUtils; import org.jf.dexlib2.writer.builder.DexBuilder; import org.jf.dexlib2.writer.io.FileDataStore; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import java.util.ListIterator; -import java.util.logging.Logger; - /** * @author Ryszard Wiśniewski */