mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-27 17:09:46 +00:00
Make dumpstate HAL lazy.
Bug: 78509314
Test: HAL isn't running
Test: adb bugreport HAL runs
Test: HAL isn't running after bugreport finishes
Test: can adb bugreport again
Test: HAL isn't running after 2nd bugreport finishes
Test: manually inspect state using `lshal` and logs
using `adb logcat | grep android.hardware.dump`
Change-Id: Ib4917807aea9b8359094bc83e972d559546f649b
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include <android-base/properties.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/properties.h>
|
||||
#include <hidl/HidlBinderSupport.h>
|
||||
|
||||
#include <log/log.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -210,6 +212,11 @@ static void DumpTouch(int fd) {
|
||||
|
||||
// Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
|
||||
Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
|
||||
// Exit when dump is completed since this is a lazy HAL.
|
||||
addPostCommandTask([]() {
|
||||
exit(0);
|
||||
});
|
||||
|
||||
if (handle == nullptr || handle->numFds < 1) {
|
||||
ALOGE("no FDs\n");
|
||||
return Void();
|
||||
|
||||
@@ -3,6 +3,8 @@ service vendor.dumpstate-1-0 /vendor/bin/hw/android.hardware.dumpstate@1.0-servi
|
||||
user system
|
||||
group system
|
||||
interface android.hardware.dumpstate@1.0::IDumpstateDevice default
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
on boot
|
||||
chmod 0444 /sys/kernel/debug/tzdbg/qsee_log
|
||||
|
||||
Reference in New Issue
Block a user