Konloch / Konloch/bytecode-viewer

UTF8 string too large

Open
#568 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Android Bug Dependency Related
Dominant language
Java
Stars
15.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I got the following error when importing the latest APK for Instagram (537.0.0.52.109):

Bytecode Viewer Version: 2.12 [Fat Jar], OS: Linux, Java: 21.0.9

java.lang.IllegalArgumentException: UTF8 string too large
	at org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:255)
	at org.objectweb.asm.SymbolTable.addConstantUtf8(SymbolTable.java:798)
	at org.objectweb.asm.SymbolTable.addConstantUtf8Reference(SymbolTable.java:1031)
	at org.objectweb.asm.SymbolTable.addConstantString(SymbolTable.java:628)
	at org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:498)
	at org.objectweb.asm.FieldWriter.<init>(FieldWriter.java:136)
	at org.objectweb.asm.ClassWriter.visitField(ClassWriter.java:452)
	at org.objectweb.asm.ClassVisitor.visitField(ClassVisitor.java:356)
	at org.objectweb.asm.commons.ClassRemapper.visitField(ClassRemapper.java:169)
	at org.objectweb.asm.ClassVisitor.visitField(ClassVisitor.java:356)
	at com.googlecode.d2j.dex.Dex2Asm.convertField(Dex2Asm.java:675)
	at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:560)
	at com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:468)
	at com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:633)
	at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:181)
	at com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:53)
	at com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:281)
	at the.bytecode.club.bytecodeviewer.util.Dex2Jar.dex2Jar(Dex2Jar.java:55)
	at the.bytecode.club.bytecodeviewer.resources.importing.impl.APKResourceImporter.open(APKResourceImporter.java:66)
	at the.bytecode.club.bytecodeviewer.resources.importing.ImportResource.importKnownFile(ImportResource.java:87)
	at the.bytecode.club.bytecodeviewer.resources.importing.ImportResource.run(ImportResource.java:59)
	at java.base/java.lang.Thread.run(Thread.java:1583)

This also occurs with version 2.13.2 of bytecoder-viewer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at APKResourceImporter.open and follow the stack trace through Dex2Jar.dex2Jar, Dex2Asm.convertField, and the ASM UTF-8 handling. Reproduce the failure with the reported Instagram APK and determine the relevant conversion boundary; done means the APK import no longer fails with the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.