Add command for dump_power to create thismeal.txt
from thismeal.bin.
Support BatteryMitigationService to monitor
brownout event and generate thismeal.bin.
Test: /vendor/bin/hw/battery_mitigation -d
Bug: 293899466
Change-Id: I3fcbd62af25204a7469dd3952a91cd6d281bccd7
Signed-off-by: samou <samou@google.com>
As part of Treble, enforce that vendor's seapp_contexts can't label apps
using coredomains. Apps installed to system/system_ext/product should be
labeled with platform side sepolicy.
This change marks violating domains that need to be fixed.
Bug: 296512192
Test: build and see build log
Change-Id: Iba8dbfe1260b481b2981e62d740552bf84c8004f
battery_mitigation may be kept in forever loop to read sysfs node. This
makes sure that the loop is exited after 10 tries.
Bug: 275028861
Test: Local boot up and ensure battery_mitigation comes up
Change-Id: I02936f4426519b2c9fbc776cdb2614fdeba872c0
Signed-off-by: George Lee <geolee@google.com>
vendor.brownout_reason did not get triggered as battery_mitigation.rc
looked for reboot,ocp,buck3m and not reboot,ocp,BUCK3M.
Bug: 268700448
Test: Confirm triggering of bugreport
Change-Id: Icf7dd70d1bd050616583af807fc16e8f7680f95d
Signed-off-by: George Lee <geolee@google.com>
vendor.brownout_reason was set because sys.boot.reason still contains
the reason from prior reboot. By enforcing thermal check prior to
bootreason check guarantees the sys.boot.reason will have the most
recent boot reason.
Bug: 268344942
Test: Confirm through artificial triggering of brownout
Change-Id: I69cb459f4c51f7db439d5993330691a7ad1f5dbe
Signed-off-by: George Lee <geolee@google.com>
This is to resolve the following local error when testing with Thermal
AIDL service enabled:
auditd : type=1400 audit(0.0:4): avc: denied { call } for comm="servicemanager" scontext=u:r:servicemanager:s0 tcontext=u:r:battery_mitigation:s0 tclass=binder permissive=0
Bug: b/264595820
Test: pts-tradefed run pts -m PtsSELinuxTest
Change-Id: I825ed2b644360e695081fe06489fabf3feb913bd
Bugreport cannot access lastmeal.txt due to access right.
Bug: 239709385
Test: confirm lastmeal.txt has system:system
Change-Id: Id207bf86096333710f8e55533fb806ae9f3a66c5
Signed-off-by: George Lee <geolee@google.com>
Bug: 264929465
Test: Confirm selinux error no longer
Change-Id: Iff9a81ffe6957c5510109e5698be2ea98d42bfdd
Signed-off-by: George Lee <geolee@google.com>
Ensure ro.boot.bootreason equals sys.boot.reason before filing bugreport
for Brownout.
Bug: 263274350
Test: Local testing to confirm
Change-Id: I321a7c71bb7ef8c13fa49bb356be34bf789e7bef
Signed-off-by: George Lee <geolee@google.com>
This reverts commit c414adbf32c8df53265844b51d0d75e500300527.
Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/263437450
Change-Id: I3badfa6fd35fde19c199d71894124212edaf7dc8
Ensure ro.boot.bootreason equals sys.boot.reason before filing bugreport
for Brownout.
Bug: 263274350
Test: Local testing to confirm
Change-Id: I78b7b3fa6cf4d5d46cabac516378c621dc290603
Signed-off-by: George Lee <geolee@google.com>
Bug: 237287659
Test: Confirm its only debug build only has BrownoutDetection app
Change-Id: I7810c10c66047c472e799d708eb9a6bd7ccbce20
Signed-off-by: George Lee <geolee@google.com>
Brownout Reason replaces startup_bugreport_requested. Battery
Mitigation needs to be updated.
Bug: 237287659
Test: Ensure lastmeal.txt is properly generated.
Change-Id: I33791886e0ea8fcfb3324c0f64384ffe245808d3
Signed-off-by: George Lee <geolee@google.com>
This app files bugreport for user-debug build with reboot reason = ocp
or uvlo. Removed the dependency on BetterBug.
Bug: 237287659
Test: Ensure bugreport is generated under user-debug build with reboot
reason = ocp or uvlo.
Change-Id: Ieaa4d02ea10413b3b7c0e314b5deb07d38d98a80
Signed-off-by: George Lee <geolee@google.com>
Added File Attachment sepolicy for betterbug
Bug: 237287659
Test: Attach files from local directory and confirm it can be attached.
Change-Id: I2e77894d4b12a302f0498aab3aa59be6fb95b795
Signed-off-by: George Lee <geolee@google.com>
Added mediaserver sepolicy for betterbug
Bug: 237287659
Test: Run same video capture on Betterbug to confirm video can be
captured.
Change-Id: Ifcb2bdba6f8036805f311a9d6b76227bf63e39e3
Signed-off-by: George Lee <geolee@google.com>
This is to resolve a merge conflict due to property configuration.
Bug: 256639156
Test: compile with ag/20329329
Change-Id: I6dacdb5f7342b84f880af84a477532205a7e3b9f
Signed-off-by: George Lee <geolee@google.com>
Mitigation Logger logs battery related information for 1 second when it
is triggered by under voltage or over current interrupts. Information
collected is to help debug system brownout.
Bug: 228383769
Test: Boot and Test
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I24e5075b12a9bb3f16241de268254bde38c133d0