You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'm pretty inexperienced with sootUp. Could you please help with the problem. I'm trying to analyze apk file with such inputLocation:
AnalysisInputLocation apkInputLocation = new ApkAnalysisInputLocation(
apk_path, "jars", Collections.singletonList(new MyCustomInterceptor(this)));
There is a problem with view.getMethod() in my custom bodyInterceptor class: @OverRide
public void interceptBody(@nonnull Body.BodyBuilder bodyBuilder, @nonnull View view) {
MethodSignature mymethodSignature = bodyBuilder.getMethodSignature();
JavaSootMethod method = (JavaSootMethod) view.getMethod(mymethodSignature).get();
As i understand, view.getMethod(mymethodSignature) calls interceptBody() recursively itself, because of resolveBody() method in DexMethodSource class, which leads to StackOverflowError;
@OverRide
public Body resolveBody(@nonnull Iterable modifiers)
throws ResolveException, IOException {
//
...
//
for (BodyInterceptor bodyInterceptor : bodyInterceptors) {
bodyInterceptor.interceptBody(bodyBuilder, view);
}
return bodyBuilder.build();
}
Please tell, how can i correctly get SootMethod from view or BodyBuilder in MyCustomInterceptor?
I use a build from develop branch that i built locally.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello. I'm pretty inexperienced with sootUp. Could you please help with the problem. I'm trying to analyze apk file with such inputLocation:
AnalysisInputLocation apkInputLocation = new ApkAnalysisInputLocation(
apk_path, "jars", Collections.singletonList(new MyCustomInterceptor(this)));
There is a problem with view.getMethod() in my custom bodyInterceptor class:
@OverRide
public void interceptBody(@nonnull Body.BodyBuilder bodyBuilder, @nonnull View view) {
MethodSignature mymethodSignature = bodyBuilder.getMethodSignature();
JavaSootMethod method = (JavaSootMethod) view.getMethod(mymethodSignature).get();
As i understand, view.getMethod(mymethodSignature) calls interceptBody() recursively itself, because of resolveBody() method in DexMethodSource class, which leads to StackOverflowError;
@OverRide
public Body resolveBody(@nonnull Iterable modifiers)
throws ResolveException, IOException {
//
...
//
for (BodyInterceptor bodyInterceptor : bodyInterceptors) {
bodyInterceptor.interceptBody(bodyBuilder, view);
}
return bodyBuilder.build();
}
Please tell, how can i correctly get SootMethod from view or BodyBuilder in MyCustomInterceptor?
I use a build from develop branch that i built locally.
Beta Was this translation helpful? Give feedback.
All reactions