You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I: Using Apktool 2.8.1
Exception in thread "main" org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 2
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:211)
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:169)
at org.yaml.snakeyaml.reader.StreamReader.prefix(StreamReader.java:141)
at org.yaml.snakeyaml.scanner.ScannerImpl.scanPlainSpaces(ScannerImpl.java:2135)
at org.yaml.snakeyaml.scanner.ScannerImpl.scanPlain(ScannerImpl.java:2070)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchPlain(ScannerImpl.java:1092)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:450)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:256)
at org.yaml.snakeyaml.parser.ParserImpl$ParseIndentlessSequenceEntryValue.produce(ParserImpl.java:621)
at org.yaml.snakeyaml.parser.ParserImpl$ParseIndentlessSequenceEntryKey.produce(ParserImpl.java:603)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:171)
at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:57)
at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:43)
at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:136)
at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:116)
at org.yaml.snakeyaml.composer.Composer.composeScalarNode(Composer.java:221)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:190)
at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:252)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:192)
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:321)
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:312)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:293)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:194)
at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:116)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:142)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:155)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:470)
at brut.androlib.apk.ApkInfo.load(ApkInfo.java:171)
at brut.androlib.apk.ApkInfo.load(ApkInfo.java:179)
at brut.androlib.ApkBuilder.build(ApkBuilder.java:82)
at brut.apktool.Main.cmdBuild(Main.java:268)
at brut.apktool.Main.main(Main.java:96)
Caused by: java.nio.charset.MalformedInputException: Input length = 2
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:274)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:177)
at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:118)
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:176)
... 32 more
PS F:\Some\libraries>
Steps to Reproduce
apktool d
apktool b
Just decompile the apk and then compile it.
Because line 780 of the yaml file contains a lot of assets files. And the names of these files contain Chinese characters. For example TX_1001_红土地.
As long as the compiler will report an error, the reason is this Chinese. I have checked that the file format is also Utf-8, which is theoretically supported. But something went wrong when yam was resolved.
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)
NO.
➜ 3212 apktool d 3212.apk
I: Using Apktool 2.8.2-22eb80-SNAPSHOT on 3212.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling assets/audience_network.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜ 3212 apktool b 3212
I: Using Apktool 2.8.2-22eb80-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_assets folder into assets.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Copying libs... (/kotlin)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk into: 3212/dist/3212.apk
This isn't reproducible on Linux, so must be part of the non-printable characters we hit on Windows with some charsets in play. I'm guessing its the set of these
@sv99 is currently working to remove our dependency on SnakeYAML which may help resolve this character issue in the parser. We are tracking this in an existing issue: #3145
If we upgrade/swap our YAML parser and the issue remains - I'm guessing we have to make a mapping table of unprintable filenames for Windows, which we have an existing issue for here: #1460
So I'll close this one as every avenue this ticket would take is already in process.
Information
apktool -version
) - 2.8.1java --version
) - 17.0.1Stacktrace/Logcat
Steps to Reproduce
apktool
dBecause line 780 of the yaml file contains a lot of assets files. And the names of these files contain Chinese characters. For example TX_1001_红土地.
As long as the compiler will report an error, the reason is this Chinese. I have checked that the file format is also Utf-8, which is theoretically supported. But something went wrong when yam was resolved.
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(
.apks
that live in/system/framework
or/system/priv-app
)NO.
APK
If this APK can be freely shared, please upload/attach a link to it.
https://apkcombo.com/zh/idle-energy-tycoon/com.oneorwa.idleenergytycoon/
Questions to ask before submission
apktool d
,apktool b
without changing anything? yes, tried.The text was updated successfully, but these errors were encountered: