Closed Xiangxingqian closed 6 years ago
Which Android version are you using? If you are using a version with art runtime, your suggested error cannot happen with our current implementation. Soot will write out dex files so that they are below the 65535 method threshold. It will take no effort to place methods in dex files corresponding to the original ones (i.e., dex content ist arbitrarily distributed among dex files) since art will unpack and compile the dex files all together anyway.
Is this error happening when you are trying to call the stated method? Maybe it is not correctly added to the corresponding class.
Hi @mbenz89
Thank you for your reply, I have solved the problem.
It seems that this problem is caused by setting android classes as application classes, like Scene.v().getSootClass("android.view.Menu").setApplicationClass()
. I exclude the android classes, the instrumented apk runs well.
Hi all,
Problem
I use soot to instrument mutilple dex android apk. I insert some methods and a few classes into apk, the apk is instrumented successfully, but fail to launch it. The error message is shown below:
Then I do some expriments:
Scene 1:
a new version of apk & same inserted methods
Still the error
java.lang.ClassNotFoundException
, but the not found class is different.Scene 2:
apk & insert some statements, no any methods
Success
Thinking
What if dex1 has been over 65535 methods after instrumenting some methods?
Thank you for your reply.