fingerprint: Add fps extension script
Bug: 208400345 Test: build Pass Change-Id: If9334ac3a837c9bf85709335075f3a666eeef06d
This commit is contained in:
parent
2dfaabef7a
commit
6dbcdf4f3b
4 changed files with 99 additions and 0 deletions
6
fingerprint/extension/Android.bp
Normal file
6
fingerprint/extension/Android.bp
Normal file
|
@ -0,0 +1,6 @@
|
|||
sh_binary {
|
||||
name: "fingerprint.extension.sh",
|
||||
init_rc: ["init.fingerprint.extension.rc"],
|
||||
src: "fingerprint.extension.sh",
|
||||
system_ext_specific: true,
|
||||
}
|
11
fingerprint/extension/fingerprint.extension.mk
Normal file
11
fingerprint/extension/fingerprint.extension.mk
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Fingerprint extension feature
|
||||
ifneq (,$(filter userdebug, $(TARGET_BUILD_VARIANT)))
|
||||
SOONG_CONFIG_fp_hal_feature += report_bug_support
|
||||
SOONG_CONFIG_fp_hal_feature_report_bug_support := true
|
||||
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/fingerprint-extension/vendor/
|
||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/fingerprint-extension/system_ext/public/
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/fingerprint-extension/system_ext/private/
|
||||
PRODUCT_PACKAGES += \
|
||||
fps_ext_bug_lib \
|
||||
fingerprint.extension.sh
|
||||
endif
|
63
fingerprint/extension/fingerprint.extension.sh
Normal file
63
fingerprint/extension/fingerprint.extension.sh
Normal file
|
@ -0,0 +1,63 @@
|
|||
#!/system/bin/sh
|
||||
|
||||
# BetterBug required fields
|
||||
am='am start -a com.google.android.apps.betterbug.intent.FILE_BUG_DEEPLINK --ez EXTRA_DEEPLINK true '
|
||||
issueTitle=' --es EXTRA_ISSUE_TITLE '
|
||||
additionalComment=' --es EXTRA_ADDITIONAL_COMMENT '
|
||||
componentId=' --el EXTRA_COMPONENT_ID '
|
||||
requireBugReport=' --ez EXTRA_REQUIRE_BUGREPORT '
|
||||
bugAssign=' --es EXTRA_BUG_ASSIGNEE '
|
||||
ccGroup=' --es EXTRA_CC '
|
||||
|
||||
# BetterBug title
|
||||
kAuthTitle="UDFPS Fingerprint authentication has high failed rate"
|
||||
kLockoutTitle="UDFPS Fingerprint has too many lockout counts"
|
||||
kLatencyTitle="UDFPS Fingerprint took long to unlock device"
|
||||
|
||||
# BetterBug context comment
|
||||
kAuthComment="This bug is auto created by fingerprint HAL to track fingerprint authentication"
|
||||
kLockoutComment="This bug is auto created by fingerprint HAL to track fingerprint lockout"
|
||||
kLatencyComment="This bug is auto created by fingerprint HAL to track fingerprint latency"
|
||||
|
||||
# BetterBug assign & CC owner
|
||||
kBugAssign='fps-triage@google.com'
|
||||
kCcGroup='eddielan@google.com'
|
||||
kComponentId='817555'
|
||||
|
||||
# Command to send intent to BetterBug
|
||||
commonCommand="$componentId ${kComponentId//\ /\\ }
|
||||
$requireBugReport true
|
||||
$bugAssign ${kBugAssign//\ /\\ }
|
||||
$ccGroup ${kCcGroup//\ /\\ }"
|
||||
authCommand="$am $issueTitle ${kAuthTitle//\ /\\ }
|
||||
$additionalComment ${kAuthComment//\ /\\ }"
|
||||
lockoutCommand="$am $issueTitle ${kLockoutTitle//\ /\\ }
|
||||
$additionalComment ${kLockoutComment//\ /\\ }"
|
||||
latencyCommand="$am $issueTitle ${kLatencyTitle//\ /\\ }
|
||||
$additionalComment ${kLatencyComment//\ /\\ }"
|
||||
|
||||
# Type of bug being triggered
|
||||
# 1. Latency
|
||||
# 2. Lockout
|
||||
# 3. Finerprint authentication(FRR)
|
||||
bug_type="$1"
|
||||
|
||||
send=1
|
||||
if [ "$bug_type" == "latency" ]; then
|
||||
intentCommand="$latencyCommand $commonCommand"
|
||||
elif [ "$bug_type" == "lockout" ]; then
|
||||
intentCommand="$lockoutCommand $commonCommand"
|
||||
elif [ "$bug_type" == "auth" ]; then
|
||||
intentCommand="$authCommand $commonCommand"
|
||||
else
|
||||
send=0
|
||||
echo "Unknown bug_type $bug_type"
|
||||
fi
|
||||
|
||||
if [ $send -eq 1 ]
|
||||
then
|
||||
eval $intentCommand
|
||||
fi
|
||||
|
||||
# Exit
|
||||
exit 0
|
19
fingerprint/extension/init.fingerprint.extension.rc
Normal file
19
fingerprint/extension/init.fingerprint.extension.rc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# init-fingerprint-extension-sh is to send intent command to app
|
||||
# for tracking fingerprint issue.
|
||||
service fingerprint-extension-bug-latency /system_ext/bin/fingerprint.extension.sh latency
|
||||
group shell
|
||||
user shell
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service fingerprint-extension-bug-lockout /system_ext/bin/fingerprint.extension.sh lockout
|
||||
group shell
|
||||
user shell
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service fingerprint-extension-bug-auth /system_ext/bin/fingerprint.extension.sh auth
|
||||
group shell
|
||||
user shell
|
||||
disabled
|
||||
oneshot
|
Loading…
Add table
Add a link
Reference in a new issue