Add op-fp command to debug op6t fingerprint
This commit is contained in:
parent
97c4452e48
commit
5fd62bb4e7
@ -10,6 +10,18 @@ cc_binary {
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "op-fp",
|
||||
srcs: [
|
||||
"op-fp.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"vendor.oneplus.fingerprint.extension@1.0",
|
||||
"libutils",
|
||||
"libhidlbase",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "uevent",
|
||||
srcs: [
|
||||
|
16
cmds/op-fp.cpp
Normal file
16
cmds/op-fp.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include <vendor/oneplus/fingerprint/extension/1.0/IVendorFingerprintExtensions.h>
|
||||
|
||||
using ::vendor::oneplus::fingerprint::extension::V1_0::IVendorFingerprintExtensions;
|
||||
using ::android::sp;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
auto svc = IVendorFingerprintExtensions::getService();
|
||||
if(argc!=2) return 1;
|
||||
int v = atoi(argv[0]);
|
||||
auto ret = svc->updateStatus(v);
|
||||
if(!ret.isOk()) {
|
||||
std::cerr << "HWBinder call failed" << std::endl;
|
||||
}
|
||||
std::cout << "updateStatus returned " << ret << std::endl;
|
||||
}
|
Loading…
Reference in New Issue
Block a user