Skip to content

SystemManager

Jordan Samhi edited this page Oct 23, 2026 · 2 revisions

SystemManager

com.jordansamhi.androspecter.files.SystemManager checks class names against package prefixes in the bundled systems.txt resource. This is a name-based classification, not proof that a class is platform code.

Inside an open AndroidAnalysis analysis, use this method-body snippet (place imports at the top of the source file):

import com.jordansamhi.androspecter.files.SystemManager;
import com.jordansamhi.androspecter.inspection.Inspection;

SystemManager systems = SystemManager.v();
analysis.inspect(Inspection.builder()
    .classes(clazz -> !systems.isSystemClass(clazz))
    .onClass(clazz -> System.out.println(clazz.getName()))
    .build());

The singleton loads its resource on first use. Missing or unreadable resources fail explicitly. isSystemClass accepts a live Soot class; do not keep that class across a reset. The returned boolean is ordinary detached data.

Use Inspection predicates when your research question requires a different definition of application, library, or platform code.

Clone this wiki locally