Either with the help of Android's PackageManager/PackageInfo.
For example with a `packageManager` command in module-misc