Introduction
Third-party libraries (TPLs) are the building blocks of modern Android applications, often accounting for over 60% of an app's code. While they significantly accelerate development, they also introduce "noise" for security researchers and can harbor vulnerabilities or malicious code. Detecting these libraries is a foundational task for malware analysis and vulnerability patching. However, existing detection tools vary wildly in their techniques and effectiveness. This paper presents the first large-scale, systematic evaluation of 12 state-of-the-art TPL detection tools against new, challenging benchmarks, revealing significant performance gaps and providing a roadmap for more robust detection frameworks.
The TPL Detection Pipeline
To provide a unified comparison, the authors define a standard four-step process common to most TPL detection tools:
- Preprocessing: Decompiling APKs into intermediate representations.
- Library Instance Construction: Decoupling the TPL code from the host app's code.
- Feature Extraction: Generating unique "fingerprints" (e.g., control flow graphs, API calls, or method signatures).
- Library Identification: Matching fingerprints against a known database.
Methodology and Datasets
The study evaluates five publicly available tools—LibID, LibRadar, LibScout, LibPecker, and ORLIS—across six criteria: construction accuracy, effectiveness (precision/recall), efficiency, version identification, obfuscation resilience, and ease of use. To push these tools to their limits, the authors introduced four new evaluation datasets designed to reflect the complexities of the modern Android ecosystem, including challenges like package flattening, multi-dex files, and advanced obfuscation from tools like Proguard, Allatori, and DashO.
Key Insights and Challenges
The "Package Structure" Trap
A major finding is that most existing tools rely on package names or hierarchies to identify library boundaries. The authors prove this is a "fragile and unreliable" feature because obfuscators can easily flatten or rename packages. Tools that use class-level dependencies for module decoupling (like ORLIS) are far more resilient to these mutations.
Semantic vs. Syntactic Features
Features that capture rich semantic information, such as class dependencies or control flow graphs, achieve much better resiliency against code obfuscation than simple syntactic features like API lists. Additionally, many older tools suffer from a "Multi-dex Blind Spot," only analyzing the primary classes.dex file and missing a significant portion of TPL code in modern, large applications.
Comparative Results
The systematic assessment highlights the diverse landscape of techniques used across the industry and their varying success rates.
- Effectiveness: While LibRadar boasted the highest precision (97.9%), LibScout achieved the highest overall F1-score (65.2%). However, all tools suffered from surprisingly low recall, often missing more than 50% of the TPLs present in test apps.
- Efficiency: LibRadar is the clear winner for large-scale analysis, taking only ~5.5 seconds per app, whereas LibID can take hours or even a full day for a single app due to its complex matching algorithms.
- Obfuscation Resilience: Advanced obfuscation caused performance to plummet for most tools. ORLIS proved to be the most resilient overall due to its focus on class-level dependencies.
Future Directions
The study identifies several critical areas for future research. Over 15% of in-app TPLs are now developed in Kotlin, which has different grammar rules that can break current Java-centric detection tools. Furthermore, current tools rely almost exclusively on static analysis and struggle with TPLs that are dynamically loaded at runtime or hidden via reflection. Finally, mapping identified libraries to specific entries in vulnerability databases (like NVD) remains difficult due to missing version-specific metadata.
Summary updated