Fingerprint and Storage permission when using Android LexActivator

Hello Cryptlex team,

Currently, I am evaluating LexActivator for Android.
Here is an environment I used for the evaluation:

  • LexActivator version: v3.15.1
  • The Android OS version: 10
  • compileSdkVersion: 29
  • ndkVersion: 21.0.6113669
  • license type: node lock

I have 3 questions regarding to LexActivator on Android platform.

  1. Is there any way to get fingerprint on the device side? Then, I can identify a device and correctly deactivate a license key via Web GUI.
  2. Found a weird behavior when LA_USER is used as a product flag. I found that the first SetProductId() fails due to Insufficient system permissions (status = 44 LA_E_SYSTEM_PERMISSION) but the second calling returns a successful status and following key activation works fine. Is there some kind of fallback mechanism? and Is it a normal behavior?
  3. When android.permission.WRITE_EXTERNAL_STORAGE is set in app/src/main/AndroidManifest.xml and LA_USER mode isset as a product flag, SetProductId() still fails. Though, I manually allow write storage permission for the app after I installed it. How should I make this mode works on an Android device?

Hi,

  1. Is there any way to get fingerprint on the device side? Then, I can identify a device and correctly deactivate a license key via Web GUI.

Even if we expose the fingerprint it won’t help you in the identification of the device as it contains system details. If license key allows only single activation, then you can easily identify the activation, i case of license allowing multiple activations you can identify them using device name or use activation metadata to add your own identifier.

  1. Found a weird behavior when LA_USER is used as a product flag. I found that the first SetProductId() fails due to Insufficient system permissions (status = 44 LA_E_SYSTEM_PERMISSION) but the second calling returns a successful status and following key activation works fine. Is there some kind of fallback mechanism? and Is it a normal behavior?

You have to almost always use LA_USER flag and it should work in the first attempt.

  1. When android.permission.WRITE_EXTERNAL_STORAGE is set in app/src/main/AndroidManifest.xml and LA_USER mode isset as a product flag, SetProductId() still fails. Though, I manually allow write storage permission for the app after I installed it. How should I make this mode works on an Android device?

LexActivator doesn’t write to external storage, hence no permission is needed. Is the issue replicable in the sample we have provided on Github.

Hi Adnan,

Thank you for your reply.

  1. That’s a great idea. I will add my own ID to metadata field of activation to solve this issue.
  2. It’s https://github.com/cryptlex/lexactivator-android, right? At first, I didn’t investigate this repo since I am focusing on C++ LexActivator for Android. But I’ll try that.

Hi Pawid,

In case of C/C++ on Android you have to have to first call the SetJniEnv(JNIEnv* env) function. This will allow LexActivator to get access to the internal data directory of the Android app and other functionality needed by LexActivator on Android.