菜鸟一枚 发表于 2019-3-26 10:53:42

IMX6Q的Android6.0系统中添加fingerprint模块

你好,
    有两个问题请教:
1、在/work/forlinx/hardware/libhardware/modules/fingerprint中添加了fingerprint代码之后(如图1),在/work/forlinx下使用mmm/work/forlinx/hardware/libhardware/modules/fingerprint,可以生成fingerprint.default.so(如图2);
    在/work/forlinx/下使用make -j8不能生成fingerprint.default.so,请问怎么修改。

图1


图2

2、默认的源码中编译不能生成fingerprintd服务,在Android studio使用adb调试的时候提醒:
    1)FingerprintService: fingerprint service not available
    2)FingerprintService: startAuthentication: no fingeprintd!
请问怎么添加fingeprintd。

谢谢!

菜鸟一枚 发表于 2019-3-26 11:16:17

补充一点,关于第二个问题。具体到代码是android_6.0.1_2.1.0\frameworks\base\services\core\java\com\android\server\fingerprint\FingerprintService.java:

public IFingerprintDaemon getFingerprintDaemon() {
      if (mDaemon == null) {
            mDaemon = IFingerprintDaemon.Stub.asInte**ce(ServiceManager.getService(FINGERPRINTD));
            if (mDaemon != null) {
                try {
                  mDaemon.asBinder().linkToDeath(this, 0);
                  mDaemon.init(mDaemonCallback);
                  mHalDeviceId = mDaemon.openHal();
                  if (mHalDeviceId != 0) {
                        updateActiveGroup(ActivityManager.getCurrentUser());
                  } else {
                        Slog.w(TAG, "Failed to open Fingerprint HAL!");
                        mDaemon = null;
                  }
                } catch (RemoteException e) {
                  Slog.e(TAG, "Failed to open fingeprintd HAL", e);
                  mDaemon = null; // try again later!
                }
            } else {
                Slog.w(TAG, "fingerprint service not available");
            }
      }
      return mDaemon;
    }
页: [1]
查看完整版本: IMX6Q的Android6.0系统中添加fingerprint模块