diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2021-08-18 17:42:32 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2021-08-18 17:47:47 +0800 |
commit | 4b5a0f8e11d175f0e83c1c3475f271321e74f07b (patch) | |
tree | 3de99f48a4bcf852cdae65f0b0b3d6340161abe0 /sepolicy | |
parent | 03c11dfce22a389404b492ed9475adc3441774dc (diff) | |
download | hikey-4b5a0f8e11d175f0e83c1c3475f271321e74f07b.tar.gz |
suspend_blocker: Use Cuttlefish's workaround to avoid suspending the device
Reuse Cuttlefish's suspend blocker service to avoid
suspending the device while running CTS tests.
This is actuallly a cherry-pick of Amit's change on db845c here:
https://android-review.googlesource.com/c/device/linaro/dragonboard/+/1723130
The problem is that "adb shell stop" is causing a PM suspend and
subsequent loss of adb connectivity. The problem could also be reproduced by
the vts ltp test.
Test: booted to homescreen with hikey and hikey960 board,
and adb shell stop does not cause suspend any more
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: I290faa5182135a619c4053d12a88a2d534641d7f
Diffstat (limited to 'sepolicy')
-rw-r--r-- | sepolicy/file_contexts | 1 | ||||
-rw-r--r-- | sepolicy/suspend_blocker.te | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 1e712113..9592d82e 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -20,6 +20,7 @@ /(vendor|system/vendor)/bin/uim u:object_r:hci_attach_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth@1\.0-service\.hikey u:object_r:hal_bluetooth_hikey_exec:s0 /(vendor|system/vendor)/bin/nanoapp_cmd u:object_r:nanoapp_cmd_exec:s0 +/(vendor|system/vendor)/bin/suspend_blocker u:object_r:suspend_blocker_exec:s0 /(vendor|system/vendor)/lib(64)?/hw/gralloc\.hikey960\.so u:object_r:same_process_hal_file:s0 /(vendor|system/vendor)/lib(64)?/hw/gralloc\.hikey\.so u:object_r:same_process_hal_file:s0 diff --git a/sepolicy/suspend_blocker.te b/sepolicy/suspend_blocker.te new file mode 100644 index 00000000..fa6e02a8 --- /dev/null +++ b/sepolicy/suspend_blocker.te @@ -0,0 +1,6 @@ +type suspend_blocker, domain; +type suspend_blocker_exec, exec_type, vendor_file_type, file_type; + +init_daemon_domain(suspend_blocker); + +wakelock_use(suspend_blocker); |