APKEditor icon indicating copy to clipboard operation
APKEditor copied to clipboard

APK Decompiling Issue in APKEditor 1.4.5

Open TechnoIndian opened this issue 3 months ago • 1 comments

Describe the bug When attempting to decompile the APK file Yuka_4.52.apk using APKEditor version 1.4.5, the process fails with a java.io.IOException and a negative chunk size error (Negative chunk size: -901226436).

To Reproduce Steps to reproduce the behavior:

  1. APKEditor version 1.4.5
  2. ColorOS 13.1
  3. java -jar APKEditor-1.4.5.jar d -i Yuka_4.52.apk

Log/Stacktrace

00.000 I: [DECOMPILE] Using: APKEditor version 1.4.5, ARSCLib version 1.3.8
                  -t = xml
           -load-dex = 3
            -dex-lib = internal
      -comment-level = detail
                  -i = Yuka_4.52.apk
                  -o = Yuka_4.52_decompile_xml
 ____________________________________________
00.038 I: [DECOMPILE] Loading ...
00.325 I: [DECOMPILE] Decompiling to xml ...
00.795 I: [DECOMPILE] Initializing android framework ...
00.796 I: [DECOMPILE] Loading android framework for version: 35
00.897 I: [DECOMPILE] Initialized framework: android-35 (15)
00.947 I: [DECOMPILE] [SANITIZE]: Sanitizing paths ...
00.961 I: [DECOMPILE] Validating resource names ...
01.091 I: [DECOMPILE] Spec names validated, duplicates = 0, bad = 8, removed specs
01.092 I: [DECOMPILE] Decode: archive-info.json
01.098 I: [DECOMPILE] Decode: uncompressed-files.json
01.177 I: [DECOMPILE] Decoding: AndroidManifest.xml
01.282 I: [DECOMPILE] public.xml: io.yuka.android -> package_1
01.340 I: [DECOMPILE] Res files: resources
04.541 I: [DECOMPILE] Ignore non bin xml: res/raw/firebase_common_keep.xml
04.542 I: [DECOMPILE] Ignore non bin xml: res/raw/firebase_crashlytics_keep.xml
 04.542 [DECOMPILE] res/raw/local.xml
ERROR:
java.io.IOException: Negative chunk size: -901226436
        at com.reandroid.arsc.chunk.xml.ResXmlDocumentChunk.onReadBytes(ResXmlDocumentChunk.java:76)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:45)
        at com.reandroid.arsc.container.WrappedBlock.onReadBytes(WrappedBlock.java:67)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:45)
        at com.reandroid.arsc.chunk.xml.ResXmlDocument.readBytes(ResXmlDocument.java:123)
        at com.reandroid.apk.ApkModuleXmlDecoder.serializeXml(ApkModuleXmlDecoder.java:260)
        at com.reandroid.apk.ApkModuleXmlDecoder.decodeResXml(ApkModuleXmlDecoder.java:139)
        at com.reandroid.apk.ApkModuleXmlDecoder.decodeResFile(ApkModuleXmlDecoder.java:102)
        at com.reandroid.apk.ApkModuleXmlDecoder.decodeResFiles(ApkModuleXmlDecoder.java:95)
        at com.reandroid.apk.ApkModuleXmlDecoder.decodeResourceTable(ApkModuleXmlDecoder.java:63)
        at com.reandroid.apk.ApkModuleDecoder.decode(ApkModuleDecoder.java:58)
        at com.reandroid.apkeditor.decompile.Decompiler.runCommand(Decompiler.java:63)
        at com.reandroid.apkeditor.Options.runCommand(Options.java:59)
        at com.reandroid.apkeditor.Main.run(Main.java:136)
        at com.reandroid.apkeditor.Main.execute(Main.java:72)
        at com.reandroid.apkeditor.Main.main(Main.java:57)

Used apk file Attach/share your apk

TechnoIndian avatar Sep 23 '25 02:09 TechnoIndian

Fixed on this commit:https://github.com/REAndroid/ARSCLib/commit/b2a4bd60054f7baae0d158ec56b325e032d8ab8f

Thank you for reporting !

REAndroid avatar Sep 23 '25 18:09 REAndroid