unknownSourcesEnabled
🚧 BETA - Determine if the user has installed applications from unknown sources.
⚠ Depending on phone models and system configurations, some system applications or applications pushed via ADB do not report any installer information. To avoid false positives, we do not report them as coming from unknown sources.
🛠 @ExperimentalStdlibApi UPCOMING CHANGES 🛠
📝 Permissions needed in the manifest
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
Content copied to clipboard
🔑 Minimum required license level: Core.
Sample usage
try {
val systemDiagnostic = rasp.diagnostic.system
val unknownSourcesEnabled = systemDiagnostic.unknownSourcesEnabled()
Log.d("RASP-DEMO", "unknownSourcesEnabled: $unknownSourcesEnabled")
} catch (e: Exception) {
Log.e("RASP-DEMO", "[systemDiagnostic] unknownSourcesEnabled error: ${e.message}")
}
Content copied to clipboard
To observe changes of this function. You can use the observe() method.
val systemNetwork = rasp.watcher.system.observe()
launch {
systemModel.unknownSourcesEnabled.collect { detected ->
if (detected != null && detected) {
Log.d("RASP-DEMO", "[unknownSourcesEnabled] $detected")
}
}
Content copied to clipboard
Return
Pair<Boolean, ArrayList<ApplicationMetadata>>
— Boolean
true if the user has installed application from unknown sources, — ArrayList<ApplicationMetadata>
application metadata.
Since
v1.5.0