siis / ic3

IC3: Inter-Component Communication Analysis in Android
http://siis.cse.psu.edu/ic3/
Apache License 2.0
36 stars 20 forks source link

ic3-0.2.0 can not parse intent in the callback method in the layout XML files. #22

Open g252691665 opened 7 years ago

g252691665 commented 7 years ago

Dear developers: I download source code of ic3-0.2.0 and build it ,I found that ic3-0.2.0 can not parse intent in the callback method in the layout XML files.

MainActivity.java

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void startFoo(View view) {
        TelephonyManager tel = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
        String deviceID = tel.getDeviceId();
        Intent intent = new Intent(MainActivity.this,FooActivity.class);
        intent.putExtra("deviceID", deviceID);
        startActivity(intent);
    }

}

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <Button
        android:text="显示启动FooActivity"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="startFoo"
        />

</RelativeLayout>

The result:the Intents table is null,but I used ic3-0.1.0-full.jar ,it does work,the Intents table is not null, can you give me some answers.

Best wishes.

g252691665 commented 7 years ago

@docteau ,can you give some advice?

g252691665 commented 7 years ago

@docteau @aegiryy @hvijay @npapernot can you give me some advice,thank you.

docteau commented 7 years ago

Since the parsing of layout files is done by Soot code, this is probably due to the version of the Soot code used in IC3 0.2.0, since if I remember correctly it was updated between IC3 0.1.0 and 0.2.0.

g252691665 commented 7 years ago

@docteau ,thanks for your question,I found the code you updated,but I did some expermients,It did not work.