Skip to content

SystemManager

Jordan Samhi edited this page Aug 22, 2023 · 1 revision

SystemManager 📁

SystemManager is a singleton class designed to manage system classes by checking for system class membership of given Soot classes. It loads the list of system classes from a configuration file at startup and is part of the AndroSpecter library.

Table of Contents

Overview

SystemManager provides a way to manage and check whether specific classes are system classes in an Android application. It utilizes the Soot framework.

Singleton Access

v()

Accesses the singleton instance of the SystemManager class.

Usage:

SystemManager manager = SystemManager.v();

System Class Checking

isSystemClass(SootClass sc)

Checks whether the given SootClass is a system class.

Parameters:

  • sc (SootClass): The SootClass to check for system class membership.

Return Value:

  • boolean: true if the SootClass is a system class, false otherwise.

Example Usage

Example 1: Checking System Classes

SootClass androidClass = ... // Get or create a SootClass representing an Android class
SystemManager manager = SystemManager.v();

boolean isAndroidSystemClass = manager.isSystemClass(androidClass); // Returns true

These examples showcase how to use SystemManager to manage and inspect system classes in Android applications.