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

Error: jar2dex This is symptomatic of .class transformation tools that ignore local variable information. #22

Open
gsmartins96 opened this issue Jul 20, 2022 · 3 comments
Labels
bug Something isn't working hacktoberfest

Comments

@gsmartins96
Copy link

I'm trying to use jar2dex having the following errors:

jar2dex tmp/monitored_app-converter.apk.jar -> tmp/classes.dex
call com.android.dx.command.Main.main[--dex, --no-strict, --output=/Users/gabrielmartins/Desktop/UnB/TCC/RuntimeVerification/rv-android/beta/cli/tmp/classes.dex, --min-sdk-version=13, /Users/gabrielmartins/Desktop/UnB/TCC/RuntimeVerification/rv-android/beta/cli/tmp/monitored_app-converter.apk.jar]
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.String[] using a local variable of type androidx.activity.result.contract.ActivityResultContract. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type int[] using a local variable of type android.content.Intent. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object[] using a local variable of type java.lang.String. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.reflect.Constructor using a local variable of type java.lang.Class[]. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.io.FileOutputStream using a local variable of type java.lang.Object[]. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type int[] using a local variable of type android.content.Context. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type android.graphics.drawable.Drawable[] using a local variable of type android.graphics.drawable.Drawable. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type android.graphics.drawable.Drawable[] using a local variable of type android.graphics.drawable.Drawable. This is symptomatic of .class transformation tools that ignore local variable information.
Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.String[] using a local variable of type android.app.SearchableInfo. This is symptomatic of .class transformation tools that ignore local variable information.

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:614)
	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:310)
	at com.android.dx.command.dexer.Main.runDx(Main.java:288)
	at com.android.dx.command.dexer.Main.main(Main.java:244)
	at com.android.dx.command.Main.main(Main.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.googlecode.dex2jar.tools.Jar2Dex.doCommandLine(Jar2Dex.java:84)
	at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:297)
	at com.googlecode.dex2jar.tools.Jar2Dex.main(Jar2Dex.java:14)
Caused by: java.lang.InterruptedException: Too many errors
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:606)
	... 11 more

What I'm doing is using the rv-android tool to instrument an android app apk and check when the app accesses some android API.

When converting the Jar to Dex I'm having these errors.
Do you know what it could be and how to fix it?

@ThexXTURBOXx
Copy link
Owner

Thanks for reporting! I will look into the cause of the issue as soon as I am done with my exams at the University :)

@gsmartins96
Copy link
Author

I'm having the same error using android build tools 30.0.3 dx to convert .jar to .dex

@ThexXTURBOXx
Copy link
Owner

I tagged this PR as being part of Hacktoberfest.
So, if someone is able to fix and properly test this issue, he is one step closer to completing Hacktoberfest 2022 :)

@ThexXTURBOXx ThexXTURBOXx added the bug Something isn't working label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants