You guys make it sound complicated.My idea is simple.First when users open app,the app run as usual but behind the scene the app get device imei with deviceinfo.imei
Second,the imei will be match with database
Third,if the database match the imei,the app run as usual if not then do as you want,close app,a warning whatever.
All this can be done in qml with no c++ involve. This method is effective to me.I just cannot get the second step done on how to match.Changing imei is useless as users didn't know which imei is in database and qml is compressed to binary so no qml code is visible.