Add op-fp command to debug op6t fingerprint

This commit is contained in:
Pierre-Hugues Husson 2018-12-27 14:44:44 +01:00
parent 97c4452e48
commit 5fd62bb4e7
2 changed files with 28 additions and 0 deletions

View File

@ -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 { cc_binary {
name: "uevent", name: "uevent",
srcs: [ srcs: [

16
cmds/op-fp.cpp Normal file
View 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;
}