LeakScope: Android Lifecycle & Memory Leak Violations
About this report: This issue was automatically generated by LeakScope, a static analysis tool for Android lifecycle violations and memory leaks built on the Soot framework. This is part of an ongoing academic research study targeting ICSE 2027. No immediate action is required — we would greatly appreciate your feedback on whether these findings are accurate.
Summary
LeakScope detected 2 potential issue(s) across 1 detector type(s):
| Severity |
Count |
| 🔴 High |
2 |
| 🟡 Medium |
0 |
| 🟢 Low (improvement opportunity) |
0 |
| Detector |
Count |
Severity |
Description |
ThreadedUIReference |
2 |
🔴 High |
Worker thread captures Activity/Fragment/View reference |
Detailed Findings
🔴 ThreadedUIReference
Worker thread captures Activity/Fragment/View reference
Finding #1 — MainActivity\n// (Full source code omitted for brevity)\n"
{
"text_input": "package com.hmdm.launcher.ui;\n\n// Class: com.hmdm.launcher.ui.MainActivity\n// (Full source code omitted for brevity)\n",
"output": "Yes",
"project": "launcher",
"explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.hmdm.launcher.ui.MainActivity\nMethod: void sendDeviceInfoAfterReconfigure()\nStatement: r1 \u003d new com.hmdm.launcher.task.SendDeviceInfoTask\nCaptured UI objects:\n - r0 : com.hmdm.launcher.ui.MainActivity\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
}
{
"text_input": "package com.hmdm.launcher.ui;\n\n// Class: com.hmdm.launcher.ui.MainActivity\n// (Full source code omitted for brevity)\n",
"output": "Yes",
"project": "launcher",
"explanation": "Scenario 1: Worker thread holds UI object reference\nClass: com.hmdm.launcher.ui.MainActivity\nMethod: void setDefaultLauncherEarly()\nStatement: $r1 \u003d new com.hmdm.launche
… (truncated for brevity)
Finding #2 — InitialSetupActivity
Scenario 1: Worker thread holds UI object reference
Class: com.hmdm.launcher.ui.InitialSetupActivity
Method: void onConfigLoaded()
Statement: $r9 = new com.hmdm.launcher.ui.InitialSetupActivity$1
Captured UI objects:
- r0 : com.hmdm.launcher.ui.InitialSetupActivity
Risk: UI object will be kept in memory until thread completes
Fix: Use WeakReference or avoid passing UI objects to worker threads
How to respond to this issue:
- If a finding is a true positive: consider applying the recommended fix and closing this issue.
- If a finding is a false positive: please leave a comment explaining why — your feedback directly improves our research.
- If you have questions: reply here or open a discussion.
This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on hmdm-android.
LeakScope: Android Lifecycle & Memory Leak Violations
Summary
LeakScope detected 2 potential issue(s) across 1 detector type(s):
ThreadedUIReferenceDetailed Findings
🔴
ThreadedUIReferenceWorker thread captures Activity/Fragment/View reference
Finding #1 —
MainActivity\n// (Full source code omitted for brevity)\n"Finding #2 —
InitialSetupActivityHow to respond to this issue:
This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on hmdm-android.