<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Hi all,
<div><br /></div>
<div>I’m currently using SOOT + FlowDroid to analyse Android applications which works fine, except for one API call:</div>
<div><br /></div>
<div>
<pre style="background-color: rgb(255, 255, 255); font-family: Menlo; font-size: 9pt;">
PowerManager powerManager = (PowerManager) <span style="color:#000080;font-weight:bold;">this</span>.getSystemService(Context.<span style="color:#660e7a;font-weight:bold;font-style:italic;">POWER_SERVICE</span>);<br /><span style="color:#660e7a;font-weight:bold;">wakeLock </span>= powerManager.newWakeLock(<br /> PowerManager.<span style="color:#660e7a;font-weight:bold;font-style:italic;">ACQUIRE_CAUSES_WAKEUP</span>,<br /> <span style="color:#008000;font-weight:bold;">"my wakelock"</span>);
</pre></div>
<div>While the callgraph contains every other call, it does NOT contain <span style="font-family: Menlo; font-size: 9pt; background-color: rgb(255, 255, 255);">powerManager.newWakeLock</span>. Because of this, SPARK determines that the points-to set of <span style="color: rgb(102, 14, 122); font-weight: bold; font-family: Menlo; font-size: 9pt; background-color: rgb(255, 255, 255);">wakeLock</span> is empty, while it shouldn’t!<br /></div>
<div><br /></div>
<div>I’ve found two messages on the mailing list that have the same problem:</div>
<div><a href="https://mailman.cs.mcgill.ca/pipermail/soot-list/2016-April/008443.html">https://mailman.cs.mcgill.ca/pipermail/soot-list/2016-April/008443.html</a><br /></div>
<div><a href="https://mailman.cs.mcgill.ca/pipermail/soot-list/2015-February/007734.html">https://mailman.cs.mcgill.ca/pipermail/soot-list/2015-February/007734.html</a><br /></div>
<div><br /></div>
<div>I tried to analyse the application by using the source code of Android (android-all-5.0.0_r2-robolectric-0.jar, from <a href="http://central.maven.org/maven2/org/robolectric/android-all/5.0.0_r2-robolectric-0/">http://central.maven.org/maven2/org/robolectric/android-all/5.0.0_r2-robolectric-0/</a>) instead of the default stub android.jar. I manually checked that the JAR contains the implementation of the <span style="font-family: Menlo; font-size: 9pt; background-color: rgb(255, 255, 255);">powerManager.newWakeLock.</span></div>
<div><br /></div>
<div>Unfortunately, this gives the same results (i.e., empty points-to set for <span style="color: rgb(102, 14, 122); font-family: Menlo; font-size: 12px; font-weight: bold; background-color: rgb(255, 255, 255);">wakeLock</span>) and I’m clueless on how to solve this problem. I need to know the points-to sets of every WakeLock instance.</div>
<div><br /></div>
<div>Thanks!</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br /></div>
</body>
</html>