summaryrefslogtreecommitdiff
path: root/dumpstate
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2020-03-24 11:52:24 -0700
committerRoman Kiryanov <rkir@google.com>2020-03-24 11:52:24 -0700
commit58c23a6832d9664c8e1828db24ef893e2e5d104d (patch)
treef56ace49bb60913f2a0ee72001684d4a1d701d63 /dumpstate
parent23e3c29369f6a7068688b318ebbad4363460ff12 (diff)
Fix file paths for DumpstateUtil calls in 1.0
selinux prevents access to /vendor/bin/date and /system/etc/hosts. Bug: 152067221 Test: presubmit Signed-off-by: Roman Kiryanov <rkir@google.com> Change-Id: I6202878427718bc825063941377c3e91b798677f
Diffstat (limited to 'dumpstate')
-rw-r--r--dumpstate/1.0/default/DumpstateDevice.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/dumpstate/1.0/default/DumpstateDevice.cpp b/dumpstate/1.0/default/DumpstateDevice.cpp
index c57bf43dbf..e3c2e0ba55 100644
--- a/dumpstate/1.0/default/DumpstateDevice.cpp
+++ b/dumpstate/1.0/default/DumpstateDevice.cpp
@@ -51,9 +51,8 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
ALOGI("Dumpstate HIDL not provided by device\n");
dprintf(fd, "Dumpstate HIDL not provided by device; providing bogus data.\n");
- // Shows some examples on how to use the libdumpstateutil API.
- RunCommandToFd(fd, "DATE", {"/vendor/bin/date"});
- DumpFileToFd(fd, "HOSTS", "/system/etc/hosts");
+ // Shows an example on how to use the libdumpstateutil API.
+ DumpFileToFd(fd, "cmdline", "/proc/self/cmdline");
return Void();
}