Open totoR13 opened 3 years ago
Hi, I used this piece of code to instrument the apk you provided https://github.com/secure-software-engineering/COVA/blob/26743ea5f8b8214d50959a8faaebe2c479bb6007/cova_automatic/src/main/java/cova/automatic/instrument/SootInstrumenter.java#L35 Then the TypeResolver threw an exception.
So you might take a look at this method https://github.com/soot-oss/soot/blob/3966f565db6dc2882c3538ffc39e44f4c14b5bcf/src/main/java/soot/dexpler/DexBody.java#L473 A lot of transformations are happening there and they can not be disabled with options, unless you comment them
Hi, Is the problem related to the transformation from bytecode to Jimple and vice-versa?
Thank you. Regards,
Did you set up all the soot options correctly? If so, it can be that there is a bug in the transformation.
Hello,
I’m leveraging Soot to modify some classes in an apk (specifically only classes in the AndroidManifest’s package name). This is a snippet of my code:
The tool works correctly and Soot create an output apk file with the modification. When I sign the output apk file with a certificate, install it on an emulator/device and try to run it, I'll receive several errors on classes belonging to third party libraries (that are not contained into the app's package name).
For example, if I modify this apk, Soot works fine and create an output apk file. After the installation on a device/emulator, when I try to run the output apk file, I receive the following stack trace:
The strange thing is that I receive that stack trace from classes that are not modified because they belong to a different package (the initial check of the internalTransform function). This seems that Soot modifies also library classes that don't belong to the app's package.
You can find an example of modified app at this link. In this file I only injected a new java class ('embedded.Test'), with the following code:
The execution of this apk file raises the same exception detailed before.
Is there a way to avoid this problem? Do you have an idea of the motivation behind this behavior?
Thank you in advance. Regards,