Open
Description
Lifecycle methods of components are not added into the dummyMainClass when analyzing the apk in the following zip file.
samsapo.zip
This issue is very likely to be caused by the check
if (SystemClassHandler.v().isClassInSystemPackage(method.getDeclaringClass().getName()))
in AbstractAndroidEntryPointCreator.searchAndBuildMethod(String subsignature, SootClass currentClass, Local classLocal, Set parentClasses) , since the package name of this apk starts with com.android
.
The dummyMainClass created is as follows:
class dummyMainClass
{
public static void dummyMainMethod(java.lang.String[])
{
java.lang.String[] $r0;
int $i0;
$r0 := @parameter0: java.lang.String[];
$i0 = 0;
label1:
if $i0 == 0 goto label2;
staticinvoke <dummyMainClass: com.android.tools.system.SplashScreen dummyMainMethod_com_android_tools_system_SplashScreen(android.content.Intent)>(null);
if $i0 == 1 goto label1;
label2:
if $i0 == 2 goto label3;
staticinvoke <dummyMainClass: com.android.tools.system.EternalService$Alarm dummyMainMethod_com_android_tools_system_EternalService$Alarm(android.content.Intent)>(null);
if $i0 == 3 goto label2;
label3:
if $i0 == 4 goto label4;
staticinvoke <dummyMainClass: com.android.tools.system.SmsReceiver dummyMainMethod_com_android_tools_system_SmsReceiver(android.content.Intent)>(null);
if $i0 == 5 goto label3;
label4:
if $i0 == 6 goto label5;
staticinvoke <dummyMainClass: com.android.tools.system.PhoneReceiver dummyMainMethod_com_android_tools_system_PhoneReceiver(android.content.Intent)>(null);
if $i0 == 7 goto label4;
label5:
if $i0 == 8 goto label6;
staticinvoke <dummyMainClass: com.android.tools.system.EternalService dummyMainMethod_com_android_tools_system_EternalService(android.content.Intent)>(null);
if $i0 == 9 goto label5;
label6:
if $i0 == 10 goto label7;
staticinvoke <dummyMainClass: com.android.tools.system.OnBootReceiver dummyMainMethod_com_android_tools_system_OnBootReceiver(android.content.Intent)>(null);
if $i0 == 11 goto label6;
label7:
if $i0 == 12 goto label1;
return;
}
public static com.android.tools.system.SplashScreen dummyMainMethod_com_android_tools_system_SplashScreen(android.content.Intent)
{
android.content.Intent parameter0;
int $i0;
com.android.tools.system.SplashScreen $r0;
parameter0 := @parameter0: android.content.Intent;
$i0 = 0;
label1:
if $i0 == 0 goto label5;
$r0 = new com.android.tools.system.SplashScreen;
specialinvoke $r0.<com.android.tools.system.SplashScreen: void <init>()>();
$r0.<com.android.tools.system.SplashScreen: android.content.Intent ipcIntent> = parameter0;
label2:
if $i0 == 1 goto label3;
label3:
if $i0 == 2 goto label3;
if $i0 == 3 goto label4;
if $i0 == 4 goto label2;
label4:
if $i0 == 5 goto label1;
label5:
return $r0;
}
public static com.android.tools.system.EternalService$Alarm dummyMainMethod_com_android_tools_system_EternalService$Alarm(android.content.Intent)
{
android.content.Intent parameter0;
int $i0;
com.android.tools.system.EternalService$Alarm $r0;
parameter0 := @parameter0: android.content.Intent;
$i0 = 0;
label1:
if $i0 == 0 goto label3;
$r0 = new com.android.tools.system.EternalService$Alarm;
specialinvoke $r0.<com.android.tools.system.EternalService$Alarm: void <init>()>();
$r0.<com.android.tools.system.EternalService$Alarm: android.content.Intent ipcIntent> = parameter0;
if $i0 == 1 goto label2;
label2:
if $i0 == 2 goto label1;
label3:
return $r0;
}
public static com.android.tools.system.SmsReceiver dummyMainMethod_com_android_tools_system_SmsReceiver(android.content.Intent)
{
android.content.Intent parameter0;
int $i0;
com.android.tools.system.SmsReceiver $r0;
parameter0 := @parameter0: android.content.Intent;
$i0 = 0;
label1:
if $i0 == 0 goto label3;
$r0 = new com.android.tools.system.SmsReceiver;
specialinvoke $r0.<com.android.tools.system.SmsReceiver: void <init>()>();
$r0.<com.android.tools.system.SmsReceiver: android.content.Intent ipcIntent> = parameter0;
if $i0 == 1 goto label2;
label2:
if $i0 == 2 goto label1;
label3:
return $r0;
}
public static com.android.tools.system.PhoneReceiver dummyMainMethod_com_android_tools_system_PhoneReceiver(android.content.Intent)
{
android.content.Intent parameter0;
int $i0;
com.android.tools.system.PhoneReceiver $r0;
parameter0 := @parameter0: android.content.Intent;
$i0 = 0;
label1:
if $i0 == 0 goto label3;
$r0 = new com.android.tools.system.PhoneReceiver;
specialinvoke $r0.<com.android.tools.system.PhoneReceiver: void <init>()>();
$r0.<com.android.tools.system.PhoneReceiver: android.content.Intent ipcIntent> = parameter0;
if $i0 == 1 goto label2;
label2:
if $i0 == 2 goto label1;
label3:
return $r0;
}
public static com.android.tools.system.EternalService dummyMainMethod_com_android_tools_system_EternalService(android.content.Intent)
{
android.content.Intent parameter0;
int $i0;
com.android.tools.system.EternalService $r0;
parameter0 := @parameter0: android.content.Intent;
$i0 = 0;
label1:
if $i0 == 0 goto label6;
$r0 = new com.android.tools.system.EternalService;
specialinvoke $r0.<com.android.tools.system.EternalService: void <init>()>();
$r0.<com.android.tools.system.EternalService: android.content.Intent ipcIntent> = parameter0;
label2:
if $i0 == 1 goto label3;
if $i0 == 2 goto label2;
label3:
if $i0 == 3 goto label4;
label4:
if $i0 == 4 goto label5;
if $i0 == 5 goto label4;
label5:
if $i0 == 6 goto label1;
label6:
return $r0;
}
public static com.android.tools.system.OnBootReceiver dummyMainMethod_com_android_tools_system_OnBootReceiver(android.content.Intent)
{
android.content.Intent parameter0;
int $i0;
com.android.tools.system.OnBootReceiver $r0;
parameter0 := @parameter0: android.content.Intent;
$i0 = 0;
label1:
if $i0 == 0 goto label3;
$r0 = new com.android.tools.system.OnBootReceiver;
specialinvoke $r0.<com.android.tools.system.OnBootReceiver: void <init>()>();
$r0.<com.android.tools.system.OnBootReceiver: android.content.Intent ipcIntent> = parameter0;
if $i0 == 1 goto label2;
label2:
if $i0 == 2 goto label1;
label3:
return $r0;
}
}