Skip to content

Analysis Failed when handling APK with the old Android support library . #785

Open
@Jennie2hang

Description

@Jennie2hang

When I use FlowDroid to analyze some older versions of APK files, it ignores all the calls within the onCreate function. The output call graph only contains some simple dummy main methods, and the Jimple file does not include the body of onCreate. Could you please explain why this happens? Below is the simple source code of this APK file.

import android.Manifest;
import android.content.Context;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.Toast;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Context context = getApplicationContext();

        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.SEND_SMS}, 1);

        SmsManager sms = SmsManager.getDefault();
        sms.sendTextMessage("123456", null, "message", null, null);
        Toast.makeText(context, "Test!", Toast.LENGTH_LONG).show();
     
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions