How liankee/cldroid works
Project type and purpose
• This is a Java‐based static analysis tool (“CLDroid”) for Android apps, built on top of the Soot framework.
• It is a command-line application that takes an APK as input, parses its manifest/components, generates program representations (call graph, CFG), performs multi‐stage dataflow analyses (forward/backward), applies security “sinks” definitions, and emits threat reports.
File structure
• Top‐level:
• lib/ – third‐party JARs (soot, infoflow, trove4j)
• sinks/ – definitions of sensitive APIs or data‐flow “sinks”
• pom.xml – Maven build descriptor
• src/main/java/… – Java packages:
– analyze/ – entry points (Main.java, AnalyzeService.java, database & NIO analyzers)
– cfg/ – control‐flow graph factory & path utilities
– cg/ – call‐graph utilities
– component/ – Android manifest resolution & fragment creation
– constant/ – configuration: entry points, IPC points, file/db semantics
– dataflow/ – core data‐flow engine, detectors, rules, taint wrapper
– timeout/ – task scheduling for timeouts
– util/ – helper modules (Soot initialisation, logging, directory traversal)
README for additional insights
• Describes a three-step pipeline:
1. External data pools (shared prefs, databases) via exported components.
2. Track data‐flows of items across those pools.
3. Learn app‐specific semantics and assess risk w.r.t. data loading & consuming.
• References Soot‐based implementation and a FSE 2024 paper.