diff options
Diffstat (limited to 'fakeadbserver/src/main/java/com/android/fakeadbserver/shellv2commandhandlers/GetPropV2CommandHandler.kt')
-rw-r--r-- | fakeadbserver/src/main/java/com/android/fakeadbserver/shellv2commandhandlers/GetPropV2CommandHandler.kt | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/fakeadbserver/src/main/java/com/android/fakeadbserver/shellv2commandhandlers/GetPropV2CommandHandler.kt b/fakeadbserver/src/main/java/com/android/fakeadbserver/shellv2commandhandlers/GetPropV2CommandHandler.kt index 477e3652c9..2e092a44fa 100644 --- a/fakeadbserver/src/main/java/com/android/fakeadbserver/shellv2commandhandlers/GetPropV2CommandHandler.kt +++ b/fakeadbserver/src/main/java/com/android/fakeadbserver/shellv2commandhandlers/GetPropV2CommandHandler.kt @@ -34,17 +34,14 @@ class GetPropV2CommandHandler : SimpleShellV2Handler("getprop") { ) { protocol.writeOkay() - val builder = """ - # This is some build info - # This is more build info - - [ro.product.manufacturer]: [${device.manufacturer}] - [ro.product.model]: [${device.model}] - [ro.build.version.release]: [${device.buildVersionRelease}] - [ro.build.version.sdk]: [${device.buildVersionSdk}] - - """.trimIndent() - protocol.writeStdout(builder.toByteArray(Charsets.UTF_8)) + val buf = StringBuilder() + buf.append("# This is some build info\n") + buf.append("# This is more build info\n") + buf.append("\n") + for (entry in device.properties) { + buf.append("[${entry.key}]: [${entry.value}]\n") + } + protocol.writeStdout(buf.toString().toByteArray(Charsets.UTF_8)) protocol.writeExitCode(0) } } |