Android - App Libraries - Monitor (Pro)
The built code for your game is stored inside the Android library files. These are a common target for cheaters who manipulate the code to gain advantages. However, it is often far too difficult or costly to change the actual code, so cheaters inject their own libraries instead of modifying the existing ones.
You can detect this injection by validating the libraries found within your application.
Monitor
To monitor the library files found in the app, AntiCheat has introduced the 'AndroidPackageLibraryMonitor', which can be found in the namespace 'GUPS.AntiCheat.Monitor.Android'. The monitor reads all files located in the library directory, for example '{APK}\lib\armeabi-v7a'. As soon as the libraries have been read, it notifies the observers with the 'AndroidLibraryStatus'.
Monitor Status
The monitor reads the libraries of the app in its Start callback. After finding the app's libraries, the observers are notified with the 'AndroidLibraryStatus'. The status contains the following properties:
- FailedToRetrieveData: Represents whether the libraries could not be retrieved or an exception occurred, in which case no valid value is returned.
- Libraries: The list of libraries used by the app on the device.
Supported Platforms
The monitor is only available on Android platforms.
Requirements
Requires an Android build with at least Android 4.4 (API level 19) (December 2013).
How To Use
The usage is quite simple: attach the 'AndroidPackageLibraryMonitor' to a child GameObject of the 'AntiCheat-Monitor' and set up the 'AndroidPackageTamperingDetector'.
Add Monitor Component
Add the 'AndroidPackageLibraryMonitor' MonoBehavior from the 'GUPS.AntiCheat.Monitor.Android' namespace to your 'AntiCheat-Monitor' GameObject, or better, to a child GameObject.

Add the 'AndroidPackageLibraryMonitor' as a Component.
When running on an Android device, the library file names will be read in the 'Start' method of the 'AndroidPackageLibraryMonitor' MonoBehaviour. As soon as the libraries have been read, an 'AndroidLibraryStatus' is sent to observers (usually detectors next to the monitor). If the libraries could not be read, a status containing the error is also sent.
Detect Disallowed Libraries
To react to the sent status and thus validate the found libraries, you need a detector. To do this, use the 'AndroidPackageTamperingDetector', an aggregated detector that can react to various attempts to tamper with the Android app itself.