Konloch / Konloch/bytecode-viewer

Code decompilation fails in 2.10.12

Open
#310 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

2.9.22 is able to decompile the code, but 2.10.12 throws an exception

com.googlecode.d2j.DexException: fail convert code for Landroidx/constraintlayout/solver/widgets/ConstraintWidget;.applyConstraints(Landroidx/constraintlayout/solver/LinearSystem;ZZZZLandroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/SolverVariable;Landroidx/constraintlayout/solver/widgets/ConstraintWidget$DimensionBehaviour;ZLandroidx/constraintlayout/solver/widgets/ConstraintAnchor;Landroidx/constraintlayout/solver/widgets/ConstraintAnchor;IIIIFZZZZZIIIIFZ)V
	at com.googlecode.d2j.dex.ExDex2Asm.convertCode(Unknown Source)
	at com.googlecode.d2j.dex.Dex2jar$2.convertCode(Unknown Source)
	at com.googlecode.d2j.dex.Dex2Asm.convertMethod(Unknown Source)
	at com.googlecode.d2j.dex.Dex2Asm.convertClass(Unknown Source)
	at com.googlecode.d2j.dex.Dex2Asm.convertDex(Unknown Source)
	at com.googlecode.d2j.dex.Dex2jar.doTranslate(Unknown Source)
	at com.googlecode.d2j.dex.Dex2jar.to(Unknown Source)
	at the.bytecode.club.bytecodeviewer.util.Dex2Jar.dex2Jar(Dex2Jar.java:44)
	at the.bytecode.club.bytecodeviewer.resources.importing.impl.APKResourceImporter.open(APKResourceImporter.java:47)
	at the.bytecode.club.bytecodeviewer.resources.importing.ImportResource.run(ImportResource.java:78)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException
	at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.mergeProviderType(Unknown Source)
	at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.mergeTypeToSubRef(Unknown Source)
	at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.copyTypes(Unknown Source)
	at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.fixTypes(Unknown Source)
	at com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(Unknown Source)
	at com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(Unknown Source)
	at com.googlecode.d2j.dex.Dex2jar$2.optimize(Unknown Source)
	at com.googlecode.d2j.dex.Dex2Asm.convertCode(Unknown Source)
	... 11 more

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 with Dex2Jar.java and APKResourceImporter.java, then reproduce the failure using the reported Android code and compare behavior between versions 2.9.22 and 2.10.12. Trace the TypeTransformer failure in dex2jar and verify that the affected code decompiles without 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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.