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 heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: Trying to get a static field which is non-static #628

Open
2048li opened this Issue Aug 19, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@2048li

2048li commented Aug 19, 2016

Hi,
When I use soot to analyze one APK and transform it into wjtp, I encounter this problem:

[Thread-6] ERROR heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: Trying to get a static field which is non-static: <com.parse.PushService: com.parse.PushConnection connection>
Trying to get a static field which is non-static: <com.parse.PushService: com.parse.PushConnection connection>
in unit: $r8 = <com.parse.PushService: com.parse.PushConnection connection>
in body:
protected transient java.lang.String doInBackground(java.lang.Void[])
{
com.parse.PushService$3 $r0;
java.lang.Void[] $r1;
boolean $z0;
int $i0;
java.lang.StringBuilder $r2;
java.lang.String $r3;
com.parse.PushService $r4;
com.parse.PushService$ServiceState $r5, $r6;
java.lang.InterruptedException $r7;
com.parse.PushConnection $r8;
java.lang.Thread $r9;
java.io.IOException $r10;

    $r0 := @this: com.parse.PushService$3;

    $r1 := @parameter0: java.lang.Void[];

    $z0 = $r0.\<com.parse.PushService$3: boolean val$forceReconnect\>;

    if $z0 == 0 goto label05;

    $i0 = staticinvoke \<com.parse.PushService: int access$2()\>();

    if $i0 <= 0 goto label04;

    $r2 = new java.lang.StringBuilder;

 label01:
    specialinvoke $r2.\<java.lang.StringBuilder: void <init>(java.lang.String)\>("sleeping for ");

    $i0 = staticinvoke <com.parse.PushService: int access$2()>();

    $r2 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.StringBuilder append(int)>($i0);

    $r2 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(" seconds");

    $r3 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.String toString()>();

    staticinvoke <com.parse.Parse: void logI(java.lang.String,java.lang.String)>("com.parse.PushService", $r3);

    $i0 = staticinvoke <com.parse.PushService: int access$2()>();

 label02:
    $i0 = $i0 * 1000;

 label03:
    staticinvoke <com.parse.PushService: void sleep(int)>($i0);

 label04:
    $r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

    staticinvoke <com.parse.PushService: void access$3(com.parse.PushService)>($r4);

 label05:
    $r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

    $r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

    $r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

    if $r5 != $r6 goto label07;

    return null;

 label06:
    $r7 := @caughtexception;

    staticinvoke <com.parse.Parse: void logV(java.lang.String,java.lang.String,java.lang.Throwable)>("com.parse.PushService", "Push backoff sleep interrupted", $r7);

    return null;

 label07:
    $r8 = <com.parse.PushService: com.parse.PushConnection connection>;

    $r3 = staticinvoke <com.parse.PushService: java.lang.String access$5()>();

    $i0 = staticinvoke <com.parse.PushService: int access$6()>();

    $z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

    virtualinvoke $r8.<com.parse.PushConnection: void connect(java.lang.String,int,boolean)>($r3, $i0, $z0);

    $r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

    $r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

    $r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

    if $r5 != $r6 goto label08;

    return null;

 label08:
    $z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

    if $z0 == 0 goto label09;

    $r4 = $r0.<com.parse.PushService$3: com.parse.PushService val$finalService>;

    $z0 = staticinvoke <com.parse.PushService: boolean access$7(android.content.Context)>($r4);

    if $z0 != 0 goto label09;

    return null;

 label09:
    $r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

    $r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

    $r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

    if $r5 != $r6 goto label10;

    return null;

 label10:
    staticinvoke <com.parse.Parse: void logD(java.lang.String,java.lang.String)>("com.parse.PushService", "waiting for a push");

    $r9 = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();

    $z0 = virtualinvoke $r9.<java.lang.Thread: boolean isInterrupted()>();

 label11:
    if $z0 == 0 goto label12;

    return null;

 label12:
    $r8 = <com.parse.PushService: com.parse.PushConnection connection>;

 label13:
    $r3 = virtualinvoke $r8.<com.parse.PushConnection: java.lang.String readLine()>();

    staticinvoke <com.parse.PushService: void resetDelay()>();

 label14:
    return $r3;

 label15:
    $r10 := @caughtexception;

    staticinvoke <com.parse.Parse: void logV(java.lang.String,java.lang.String,java.lang.Throwable)>("com.parse.PushService", "Network disconnect; will reconnect to the push service shortly.", $r10);

    return null;

    catch java.lang.InterruptedException from label01 to label02 with label06;
    catch java.lang.InterruptedException from label03 to label04 with label06;
    catch java.io.IOException from label10 to label11 with label15;
    catch java.io.IOException from label13 to label14 with label15;
}


at soot.jimple.validation.FieldRefValidator.validate(FieldRefValidator.java:53)
at soot.jimple.JimpleBody.validate(JimpleBody.java:125)
at soot.jimple.JimpleBody.validate(JimpleBody.java:110)
at soot.PackManager.runBodyPacks(PackManager.java:980)
at soot.PackManager.access$000(PackManager.java:137)
at soot.PackManager$1.run(PackManager.java:625)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

But when I look into the source code of this APK, I notice that the connection is not declared as static:

_private static final String START_ACTION = "com.parse.PushService.start";
private static final String START_IF_REQUIRED_ACTION = "com.parse.PushService.startIfRequired";
private static final String TAG = "com.parse.PushService";
private PushConnection connection;
private static AtomicBoolean hasWakeLockPermission;
private static String host;
private static int port;_

the APK can be downloaded from here: https://pan.baidu.com/s/1qYpLwlQ

Thanks!

@ericbodden

This comment has been minimized.

Show comment
Hide comment
@ericbodden

ericbodden Aug 19, 2016

Member

Hmm, this is odd.

Could you do us a favor and look into the bytecode if the method doInBackground to see whether this contains a static or non-static call? Maybe the APK is just messed up.

Cheers
Eric

On 19.08.2016, at 11:48, shentanli notifications@github.com wrote:

Hi,
When I use soot to analyze one APK and transform it into wjtp, I encounter this problem:

[Thread-6] ERROR heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: Trying to get a static field which is non-static:
Trying to get a static field which is non-static:
in unit: $r8 =
in body:
protected transient java.lang.String doInBackground(java.lang.Void[])
{
com.parse.PushService$3 $r0;
java.lang.Void[] $r1;
boolean $z0;
int $i0;
java.lang.StringBuilder $r2;
java.lang.String $r3;
com.parse.PushService $r4;
com.parse.PushService$ServiceState $r5, $r6;
java.lang.InterruptedException $r7;
com.parse.PushConnection $r8;
java.lang.Thread $r9;
java.io.IOException $r10;

$r0 := @this: com.parse.PushService$3;

$r1 := @parameter0: java.lang.Void[];

$z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

if $z0 == 0 goto label05;

$i0 = staticinvoke <com.parse.PushService: int access$2()>();

if $i0 <= 0 goto label04;

$r2 = new java.lang.StringBuilder;

label01:
specialinvoke $r2.<java.lang.StringBuilder: void (java.lang.String)>("sleeping for ");

$i0 = staticinvoke <com.parse.PushService: int access$2()>();

$r2 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.StringBuilder append(int)>($i0);

$r2 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(" seconds");

$r3 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.String toString()>();

staticinvoke <com.parse.Parse: void logI(java.lang.String,java.lang.String)>("com.parse.PushService", $r3);

$i0 = staticinvoke <com.parse.PushService: int access$2()>();

label02:
$i0 = $i0 * 1000;

label03:
staticinvoke <com.parse.PushService: void sleep(int)>($i0);

label04:
$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

staticinvoke <com.parse.PushService: void access$3(com.parse.PushService)>($r4);

label05:
$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

$r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

$r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

if $r5 != $r6 goto label07;

return null;

label06:
$r7 := @caughtexception;

staticinvoke <com.parse.Parse: void logV(java.lang.String,java.lang.String,java.lang.Throwable)>("com.parse.PushService", "Push backoff sleep interrupted", $r7);

return null;

label07:
$r8 = <com.parse.PushService: com.parse.PushConnection connection>;

$r3 = staticinvoke <com.parse.PushService: java.lang.String access$5()>();

$i0 = staticinvoke <com.parse.PushService: int access$6()>();

$z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

virtualinvoke $r8.<com.parse.PushConnection: void connect(java.lang.String,int,boolean)>($r3, $i0, $z0);

$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

$r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

$r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

if $r5 != $r6 goto label08;

return null;

label08:
$z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

if $z0 == 0 goto label09;

$r4 = $r0.<com.parse.PushService$3: com.parse.PushService val$finalService>;

$z0 = staticinvoke <com.parse.PushService: boolean access$7(android.content.Context)>($r4);

if $z0 != 0 goto label09;

return null;

label09:
$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

$r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

$r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

if $r5 != $r6 goto label10;

return null;

label10:
staticinvoke <com.parse.Parse: void logD(java.lang.String,java.lang.String)>("com.parse.PushService", "waiting for a push");

$r9 = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();

$z0 = virtualinvoke $r9.<java.lang.Thread: boolean isInterrupted()>();

label11:
if $z0 == 0 goto label12;

return null;

label12:
$r8 = <com.parse.PushService: com.parse.PushConnection connection>;

label13:
$r3 = virtualinvoke $r8.<com.parse.PushConnection: java.lang.String readLine()>();

staticinvoke <com.parse.PushService: void resetDelay()>();

label14:
return $r3;

label15:
$r10 := @caughtexception;

staticinvoke <com.parse.Parse: void logV(java.lang.String,java.lang.String,java.lang.Throwable)>("com.parse.PushService", "Network disconnect; will reconnect to the push service shortly.", $r10);

return null;

catch java.lang.InterruptedException from label01 to label02 with label06;
catch java.lang.InterruptedException from label03 to label04 with label06;
catch java.io.IOException from label10 to label11 with label15;
catch java.io.IOException from label13 to label14 with label15;

}

at soot.jimple.validation.FieldRefValidator.validate(FieldRefValidator.java:53)
at soot.jimple.JimpleBody.validate(JimpleBody.java:125)
at soot.jimple.JimpleBody.validate(JimpleBody.java:110)
at soot.PackManager.runBodyPacks(PackManager.java:980)
at soot.PackManager.access$000(PackManager.java:137)
at soot.PackManager$1.run(PackManager.java:625)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

But when I look into the source code of this APK, I notice that the connection is not declared as static:

private static final String START_ACTION = "com.parse.PushService.start";
private static final String START_IF_REQUIRED_ACTION = "com.parse.PushService.startIfRequired";
private static final String TAG = "com.parse.PushService";
private PushConnection connection;
private static AtomicBoolean hasWakeLockPermission;
private static String host;
private static int port;

the APK can be downloaded from here: https://pan.baidu.com/s/1qYpLwlQ

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Member

ericbodden commented Aug 19, 2016

Hmm, this is odd.

Could you do us a favor and look into the bytecode if the method doInBackground to see whether this contains a static or non-static call? Maybe the APK is just messed up.

Cheers
Eric

On 19.08.2016, at 11:48, shentanli notifications@github.com wrote:

Hi,
When I use soot to analyze one APK and transform it into wjtp, I encounter this problem:

[Thread-6] ERROR heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: Trying to get a static field which is non-static:
Trying to get a static field which is non-static:
in unit: $r8 =
in body:
protected transient java.lang.String doInBackground(java.lang.Void[])
{
com.parse.PushService$3 $r0;
java.lang.Void[] $r1;
boolean $z0;
int $i0;
java.lang.StringBuilder $r2;
java.lang.String $r3;
com.parse.PushService $r4;
com.parse.PushService$ServiceState $r5, $r6;
java.lang.InterruptedException $r7;
com.parse.PushConnection $r8;
java.lang.Thread $r9;
java.io.IOException $r10;

$r0 := @this: com.parse.PushService$3;

$r1 := @parameter0: java.lang.Void[];

$z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

if $z0 == 0 goto label05;

$i0 = staticinvoke <com.parse.PushService: int access$2()>();

if $i0 <= 0 goto label04;

$r2 = new java.lang.StringBuilder;

label01:
specialinvoke $r2.<java.lang.StringBuilder: void (java.lang.String)>("sleeping for ");

$i0 = staticinvoke <com.parse.PushService: int access$2()>();

$r2 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.StringBuilder append(int)>($i0);

$r2 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(" seconds");

$r3 = virtualinvoke $r2.<java.lang.StringBuilder: java.lang.String toString()>();

staticinvoke <com.parse.Parse: void logI(java.lang.String,java.lang.String)>("com.parse.PushService", $r3);

$i0 = staticinvoke <com.parse.PushService: int access$2()>();

label02:
$i0 = $i0 * 1000;

label03:
staticinvoke <com.parse.PushService: void sleep(int)>($i0);

label04:
$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

staticinvoke <com.parse.PushService: void access$3(com.parse.PushService)>($r4);

label05:
$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

$r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

$r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

if $r5 != $r6 goto label07;

return null;

label06:
$r7 := @caughtexception;

staticinvoke <com.parse.Parse: void logV(java.lang.String,java.lang.String,java.lang.Throwable)>("com.parse.PushService", "Push backoff sleep interrupted", $r7);

return null;

label07:
$r8 = <com.parse.PushService: com.parse.PushConnection connection>;

$r3 = staticinvoke <com.parse.PushService: java.lang.String access$5()>();

$i0 = staticinvoke <com.parse.PushService: int access$6()>();

$z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

virtualinvoke $r8.<com.parse.PushConnection: void connect(java.lang.String,int,boolean)>($r3, $i0, $z0);

$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

$r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

$r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

if $r5 != $r6 goto label08;

return null;

label08:
$z0 = $r0.<com.parse.PushService$3: boolean val$forceReconnect>;

if $z0 == 0 goto label09;

$r4 = $r0.<com.parse.PushService$3: com.parse.PushService val$finalService>;

$z0 = staticinvoke <com.parse.PushService: boolean access$7(android.content.Context)>($r4);

if $z0 != 0 goto label09;

return null;

label09:
$r4 = $r0.<com.parse.PushService$3: com.parse.PushService this$0>;

$r5 = staticinvoke <com.parse.PushService: com.parse.PushService$ServiceState access$4(com.parse.PushService)>($r4);

$r6 = <com.parse.PushService$ServiceState: com.parse.PushService$ServiceState DESTRUCTING>;

if $r5 != $r6 goto label10;

return null;

label10:
staticinvoke <com.parse.Parse: void logD(java.lang.String,java.lang.String)>("com.parse.PushService", "waiting for a push");

$r9 = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();

$z0 = virtualinvoke $r9.<java.lang.Thread: boolean isInterrupted()>();

label11:
if $z0 == 0 goto label12;

return null;

label12:
$r8 = <com.parse.PushService: com.parse.PushConnection connection>;

label13:
$r3 = virtualinvoke $r8.<com.parse.PushConnection: java.lang.String readLine()>();

staticinvoke <com.parse.PushService: void resetDelay()>();

label14:
return $r3;

label15:
$r10 := @caughtexception;

staticinvoke <com.parse.Parse: void logV(java.lang.String,java.lang.String,java.lang.Throwable)>("com.parse.PushService", "Network disconnect; will reconnect to the push service shortly.", $r10);

return null;

catch java.lang.InterruptedException from label01 to label02 with label06;
catch java.lang.InterruptedException from label03 to label04 with label06;
catch java.io.IOException from label10 to label11 with label15;
catch java.io.IOException from label13 to label14 with label15;

}

at soot.jimple.validation.FieldRefValidator.validate(FieldRefValidator.java:53)
at soot.jimple.JimpleBody.validate(JimpleBody.java:125)
at soot.jimple.JimpleBody.validate(JimpleBody.java:110)
at soot.PackManager.runBodyPacks(PackManager.java:980)
at soot.PackManager.access$000(PackManager.java:137)
at soot.PackManager$1.run(PackManager.java:625)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

But when I look into the source code of this APK, I notice that the connection is not declared as static:

private static final String START_ACTION = "com.parse.PushService.start";
private static final String START_IF_REQUIRED_ACTION = "com.parse.PushService.startIfRequired";
private static final String TAG = "com.parse.PushService";
private PushConnection connection;
private static AtomicBoolean hasWakeLockPermission;
private static String host;
private static int port;

the APK can be downloaded from here: https://pan.baidu.com/s/1qYpLwlQ

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@2048li

This comment has been minimized.

Show comment
Hide comment
@2048li

2048li Aug 19, 2016

Thanks first!
You mean "whether doInBackground contains a static or non-static call?" ?[I update the error message because "<>" is not shown]
The piece of code from doInBackground is shown before.

2048li commented Aug 19, 2016

Thanks first!
You mean "whether doInBackground contains a static or non-static call?" ?[I update the error message because "<>" is not shown]
The piece of code from doInBackground is shown before.

@ericbodden

This comment has been minimized.

Show comment
Hide comment
@ericbodden

ericbodden Aug 19, 2016

Member

Hello.

You mean "whether doInBackground contains a static or non-static call?" ?[I update the error message because "<>" is not shown]

Yes exactly.

The piece of code from doInBackground is shown before.

You showed us the Jimple code. But the question is what the bytecode looks like. That’s what we need to know to determine whether Soot translates the bytecode into Jimple incorrectly or whether the bytecode was broken all along.

Try using "javap -c” to look at the bytecode of the class.

Cheers
Eric

Member

ericbodden commented Aug 19, 2016

Hello.

You mean "whether doInBackground contains a static or non-static call?" ?[I update the error message because "<>" is not shown]

Yes exactly.

The piece of code from doInBackground is shown before.

You showed us the Jimple code. But the question is what the bytecode looks like. That’s what we need to know to determine whether Soot translates the bytecode into Jimple incorrectly or whether the bytecode was broken all along.

Try using "javap -c” to look at the bytecode of the class.

Cheers
Eric

@2048li

This comment has been minimized.

Show comment
Hide comment
@2048li

2048li Aug 19, 2016

Actually I do not have the source code of the APK, I can decompile it and get the smali code but not the class code.
I can also get the java code but cannot compile it as .class.
And I want to know how soot deal with one APK and transform it.[Maybe I should step in the soot Pack]

java code[doInbackground method not a class]:

package com.parse;

import android.os.AsyncTask;

abstract class BackgroundTask extends AsyncTask {
private ParseCallback callback;
private ParseException exception;
private Object result;

BackgroundTask(ParseCallback arg2) {
    super();
    this.result = null;
    this.exception = null;
    this.callback = arg2;
}

protected Object doInBackground(Object[] arg2) {
    return this.doInBackground(((Void[])arg2));
}

protected Void doInBackground(Void[] params) {
    Void v2 = null;
    try {
        this.result = this.run();
    }
    catch(ParseException v0) {
        this.exception = v0;
    }

    return v2;
}

void executeInThisThread() {
    this.doInBackground(new Void[0]);
    this.onPostExecute(null);
}

static int executeTask(BackgroundTask arg2) {
    arg2.execute(new Void[0]);
    return 0;
}

protected void onPostExecute(Void v) {
    if(this.callback != null) {
        this.callback.internalDone(this.result, this.exception);
    }
}

protected void onPostExecute(Object arg1) {
    this.onPostExecute(((Void)arg1));
}

public abstract Object run() throws ParseException;

}

On Aug 20, 2016, at 12:58 AM, Eric Bodden notifications@github.com wrote:

Hello.

You mean "whether doInBackground contains a static or non-static call?" ?[I update the error message because "<>" is not shown]

Yes exactly.

The piece of code from doInBackground is shown before.

You showed us the Jimple code. But the question is what the bytecode looks like. That’s what we need to know to determine whether Soot translates the bytecode into Jimple incorrectly or whether the bytecode was broken all along.

Try using "javap -c” to look at the bytecode of the class.

Cheers
Eric

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #628 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AHDMf602_KxSIcJNyIizeYO6Ag3takMLks5qheDFgaJpZM4JoUQs.

2048li commented Aug 19, 2016

Actually I do not have the source code of the APK, I can decompile it and get the smali code but not the class code.
I can also get the java code but cannot compile it as .class.
And I want to know how soot deal with one APK and transform it.[Maybe I should step in the soot Pack]

java code[doInbackground method not a class]:

package com.parse;

import android.os.AsyncTask;

abstract class BackgroundTask extends AsyncTask {
private ParseCallback callback;
private ParseException exception;
private Object result;

BackgroundTask(ParseCallback arg2) {
    super();
    this.result = null;
    this.exception = null;
    this.callback = arg2;
}

protected Object doInBackground(Object[] arg2) {
    return this.doInBackground(((Void[])arg2));
}

protected Void doInBackground(Void[] params) {
    Void v2 = null;
    try {
        this.result = this.run();
    }
    catch(ParseException v0) {
        this.exception = v0;
    }

    return v2;
}

void executeInThisThread() {
    this.doInBackground(new Void[0]);
    this.onPostExecute(null);
}

static int executeTask(BackgroundTask arg2) {
    arg2.execute(new Void[0]);
    return 0;
}

protected void onPostExecute(Void v) {
    if(this.callback != null) {
        this.callback.internalDone(this.result, this.exception);
    }
}

protected void onPostExecute(Object arg1) {
    this.onPostExecute(((Void)arg1));
}

public abstract Object run() throws ParseException;

}

On Aug 20, 2016, at 12:58 AM, Eric Bodden notifications@github.com wrote:

Hello.

You mean "whether doInBackground contains a static or non-static call?" ?[I update the error message because "<>" is not shown]

Yes exactly.

The piece of code from doInBackground is shown before.

You showed us the Jimple code. But the question is what the bytecode looks like. That’s what we need to know to determine whether Soot translates the bytecode into Jimple incorrectly or whether the bytecode was broken all along.

Try using "javap -c” to look at the bytecode of the class.

Cheers
Eric

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #628 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AHDMf602_KxSIcJNyIizeYO6Ag3takMLks5qheDFgaJpZM4JoUQs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment