Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to decompile API 35 framework-res.apk #93

Closed
someone5678 opened this issue Mar 23, 2024 · 2 comments
Closed

Failed to decompile API 35 framework-res.apk #93

someone5678 opened this issue Mar 23, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@someone5678
Copy link

Describe the bug
Can't decompile API 35 (Android 14 QPR2) framework-res.apk

To Reproduce
Steps to reproduce the behavior:

  1. Used version 'APKEditor 1.3.6'
  2. Operating system 'debian'
  3. Command 'java -jar APKEditor.jar d -i framework-res.apk -o framework-res'

Log/Stacktrace

00.000 I: [DECOMPILE] Decompiling ...
   Input: framework-res.apk
 Output: framework-res
 Type: xml
 ---------------------------- 
00.037 I: [DECOMPILE] Loading ...
00.578 I: [DECOMPILE] Looks like framework apk, skip loading framework
01.272 I: [DECOMPILE] Decompiling to xml ...
Exception in thread "main" java.lang.IllegalArgumentException: java.io.EOFException: Finished reading: 60224
        at com.reandroid.apk.ApkModule.getTableBlock(ApkModule.java:808)
        at com.reandroid.apk.ApkModule.getTableBlock(ApkModule.java:869)
        at com.reandroid.apk.ApkModule.listResFiles(ApkModule.java:596)
        at com.reandroid.apk.ApkModule.listResFiles(ApkModule.java:592)
        at com.reandroid.apk.PathSanitizer.create(PathSanitizer.java:299)
        at com.reandroid.apk.ApkModuleDecoder.sanitizeFilePaths(ApkModuleDecoder.java:145)
        at com.reandroid.apkeditor.decompile.Decompiler.getApkModuleDecoder(Decompiler.java:81)
        at com.reandroid.apkeditor.decompile.Decompiler.run(Decompiler.java:61)
        at com.reandroid.apkeditor.decompile.Decompiler.execute(Decompiler.java:127)
        at com.reandroid.apkeditor.Main.execute(Main.java:81)
        at com.reandroid.apkeditor.Main.execute(Main.java:64)
        at com.reandroid.apkeditor.Main.main(Main.java:36)
Caused by: java.io.EOFException: Finished reading: 60224
        at com.reandroid.arsc.io.BlockReader.readFully(BlockReader.java:214)
        at com.reandroid.arsc.io.BlockReader.readFully(BlockReader.java:197)
        at com.reandroid.arsc.io.BlockReader.readShort(BlockReader.java:57)
        at com.reandroid.arsc.value.Entry.createTableEntry(Entry.java:526)
        at com.reandroid.arsc.value.Entry.onReadBytes(Entry.java:477)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:43)
        at com.reandroid.arsc.array.OffsetBlockArray.onReadBytes(OffsetBlockArray.java:178)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:43)
        at com.reandroid.arsc.base.BlockContainer.onReadBytes(BlockContainer.java:148)
        at com.reandroid.arsc.chunk.Chunk.onReadChildes(Chunk.java:65)
        at com.reandroid.arsc.chunk.Chunk.onReadBytes(Chunk.java:59)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:43)
        at com.reandroid.arsc.container.PackageBody.readTypeBlock(PackageBody.java:130)
        at com.reandroid.arsc.container.PackageBody.readNextBlock(PackageBody.java:107)
        at com.reandroid.arsc.container.PackageBody.onReadBytes(PackageBody.java:94)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:43)
        at com.reandroid.arsc.base.BlockContainer.onReadBytes(BlockContainer.java:148)
        at com.reandroid.arsc.chunk.Chunk.onReadChildes(Chunk.java:65)
        at com.reandroid.arsc.chunk.Chunk.onReadBytes(Chunk.java:59)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:43)
        at com.reandroid.arsc.chunk.TableBlock.onReadBytes(TableBlock.java:627)
        at com.reandroid.arsc.base.Block.readBytes(Block.java:43)
        at com.reandroid.arsc.chunk.TableBlock.readBytes(TableBlock.java:644)
        at com.reandroid.arsc.chunk.TableBlock.load(TableBlock.java:785)
        at com.reandroid.apk.ApkModule.loadTableBlock(ApkModule.java:980)
        at com.reandroid.apk.ApkModule.getTableBlock(ApkModule.java:801)
        ... 11 more

Used apk file
framework-res.apk

@REAndroid REAndroid added the bug Something isn't working label Mar 26, 2024
@REAndroid
Copy link
Owner

I am surprised this was not implemented, fixed on ARSCLib side , you can build yourself or wait for next release.

Thank you for reporting

@REAndroid REAndroid added the good first issue Good for newcomers label Mar 26, 2024
REAndroid added a commit to REAndroid/ARSCLib that referenced this issue Mar 26, 2024
@REAndroid
Copy link
Owner

REAndroid commented Apr 5, 2024

Fixed with 1.3.7, you can re-open this issue if not fully resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants