Android - Installation Source - Monitor (Pro)
A common method to cheat in Android games is to download the target app, manipulate it and then upload it to other stores and make it available there or to side load it. Prevent this by validating the app installation source.
Monitor
To monitor the installation source, AntiCheat has introduced the 'AndroidPackageSourceMonitor', which can be found in the 'GUPS.AntiCheat.Monitor.Android' namespace. As soon as the monitor detects an installation source, an 'AndroidSourceStatus' is sent to the listening observers. This status contains the detected store and its package name. If the store could not be identified, 'Unknown' is used as the detected store leaving the decision to the user based on the package name.
Monitor Status
The monitor locates the installation source of the app in its Start callback. After finding the app's source the observers will be notified with the 'AndroidSourceStatus'. The status contains the following properties:
- FailedToRetrieveData: Represents if the installation source could not be retrieved or an exception occurred. And no valid value is returned.
- AppStoreSource: The app store source, this app was downloaded and installed from.
- AppStoreSourcePackage: Tthe app store source package name, this app was downloaded and installed from.
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 'AndroidPackageSourceMonitor' to a child GameObject of the 'AntiCheat-Monitor' and setup the 'AndroidPackageTamperingDetector'.
Add Monitor Component
Add the 'AndroidPackageSourceMonitor' MonoBehavior from the 'GUPS.AntiCheat.Monitor.Android' namespace to your 'AntiCheat-Monitor' GameObject or better to a child GameObject.
Add the 'AndroidPackageSourceMonitor' as Component.
When running on an Android device, the installation source is recognized in the 'Start' method of the 'AndroidPackageSourceMonitor' MonoBehaviour. As soon as the installation source has been identified, an 'AndroidSourceStatus' is sent to observers (usually detectors next to the monitor). If the installation source could not be identified, a status containing the error is also sent.
Monitored Installation Sources
The following app stores or installation sources are supported by default as they are common sources. If the source could not be recognized or parsed, "Unknown" is used as the default.
Appstore | Description |
---|---|
Android Package Installer | Package Installer. The installation of apps outside of stores is done by a system app that is integrated into every Android device. This system app, known as the package installer, is responsible for installing applications that originate from apk files downloaded from various locations. |
Amazon Appstore | Amazon's digital application distribution platform. |
Aptoide | An open-source independent Android app store. |
Cafe Bazaar | An Iranian Android marketplace. |
F-Droid | An open-source software repository for Android. |
Google Play Store | Google's official app store. |
Huawei AppGallery | Huawei's official app distribution platform. |
Myket | A popular Android app store. |
Oppo App Market | Oppo's official app store. |
Samsung Galaxy Store | Samsung's official app store. |
TapTap | A Chinese app store for mobile games. |
Vivo App Store | Vivo's official app distribution platform. |
Xiaomi Mi GetApps | Xiaomi's official app store. |
XDA Labs | A platform for mobile development projects. |
Unknown | Unknown installation source. If it is neither of the above sources. |
Detect Unallowed Installation Source
To react to the sent status and so validate the installation source, 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.