readProperty

fun readProperty(key: String, default: String = ""): String

Safely reads a system property via reflection, returning default when unavailable.

Return

The property value, or default.

Parameters

key

ro.*/system property key.

default

Value returned if the property is missing or reflection failed.