Protect an app via IMEI, bluethoot or hardware?

Hi guys,

I'm asking for this need / problem.

Given that I intend to make an app executable on a single device, a tablet for example placed in a pub where I offer a particular service; so I want guarantees that the app runs only on that device, and cannot be recompiled and transported elsewhere.

I ask for advice on:

  1. it would be enough to first deliver the IMEI of the device, and use for example the Telephony Manager Extension of https://puravidaapps.com/telephonymanager.php?

  2. it is possible to implement something like bluethoot; like a second phone that sends and receives a specific code to verify that the app is genuine (but then you have to encrypt the values via bluethoot or as better to do)?

  3. but this solution would be something great: there would be the possibility, and how to do it, to insert a kind of hardware key via the OTG port and therefore there is a kind of "IMEI" for a USB pen (Which I grant to the user of the app) ?

I hope the questions will be valid for others, and thanks for the advice.

Greetings, Nicolino.

I also found this information (on the web) ... but then I stop because I don't know how to do anything else:

"You can get the unique ID of an android connected USB device using UsbDevice.getDeviceId() method."

I tell you: with some changes could the Telephony Manager Extension of https://puravidaapps.com/telephonymanager.php work for USB drive pen?

If it is your app, that you put on this tablet, and nowhere else, how would it be possible to copy the apk and use it somewhere else?
It think you make it more difficult than it should be. As long as you do not put the app on the playstore or anything like that.

You can make an app that doesn't work without a key. When you install the app, you enter the secret key yourself and the app works. The idea with IMEI will not work from android 10+.

I use myself "APK Extractor" to extract my applications from the mobile phone in which they are installed, to install them in other devices. I have an android TV and I also happened to use "APK Extractor"to extract an APK and install it on the TV. So "stealing / taking" an installed APK is very simple.

Does that USB pen have any storage?
You could find it our using the file extension and it's method AvailableStorageDirectories

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.