4

I am new to android. I have a application to make where in i have to restrict the application's .apk file getting shared by the user to the other phone android phone holders.

Its like if i keep my .apk file in my own website then i want that the user can download the .apk from my website the cannot share the same .apk with some other person. I want to restrict the sharing of the apk to multiple phones. Everytime a user wants to install the app he/she has to install if from the play or through my website but the .apk shared cannot to installed.

Also i wanted to ask if we can distinguish whether the app is distributed and installed or installed from the play.

So can you please tell me some way out for doing this?

Thanks in advance

android_developer
  • 663
  • 2
  • 13
  • 18
  • 1
    There is license key functionality available through the developers console, but I don't think that would be applicable to your website. – anthropomo Feb 02 '13 at 18:16

3 Answers3

4

1) You can not stop users to forward your apk if they have apk in storage, what you can do is to delete it after your app installed(you should search it via some api and if found delete it), Limitation :- apk can be shared before installing.

and there are tools/apps exist in market which claim to convert installed app into apk, and then it can be forwarded to other device.

Similar question on Forward locking of apk

2) Though you can not stop user to forwarding of your apk, But can stop other user to use it, if they receive this app from other sources then your web, as I myself did it earlier, by client server communication where a key is getting generated on Server based on mobile IMEI, so this app is going to be activated for particular mobile based on IMEI number. hence if other users try to use it you can check if this IMEI is register or not, and take action accordingly.

Community
  • 1
  • 1
AAnkit
  • 27,299
  • 12
  • 60
  • 71
  • 1
    Hi AND_DEV i guess we can do this with the help of webservices that store the IMEI number and check it every time the app is started, if its a new IMEI number it should nt get installed. – android_developer Feb 03 '13 at 05:49
  • 1
    you can not stop user to install, but yeah can stop him using ur app. that what i said in 2rd para of my post – AAnkit Feb 03 '13 at 07:36
0

Unless a user uses a USB cable/Astro file manager like utility, on a ROOTED phone, he wont be able to extract the apk out and transfer to another phone. And the percentage of users knowing how to root a device is very low. So this issue should not arise.

Even if it is assumed a user can very easily extract an apk (which a general user wont be able to), the problem whittles down to generating a unique identifier string on each apk, and then packing it within this apk. Now when it is extracted and installed on another device the app can check with identifier and close after displaying a "no-copying" message.

Note that the identifier should be tied to a unique string, say the device IMSI number, or phone number, or a combination of both. And this string needs to be written to a file that is transferred over when apk is copied, I would recommend a properties file in assets folder within the apk for this. Hope this helps

omermuhammed
  • 7,365
  • 4
  • 27
  • 40
  • Hello @Omermuhammed i was thinking the same but will i have to make 2 apk? one for the installation and one to check the unique number of the device or so? – android_developer Feb 02 '13 at 18:20
  • You are mistaken. Neither ADB nor root are required to read APKs. Their storage location is not *browsable* but the files themselves are readable, and their is readable information on the device which gives their exact location. – Chris Stratton Aug 01 '16 at 03:38
-1

if somehow we manage to attach the app data folder with that APK.file of that app, then our problem will rectified easily. like if you send the folder of the app to someone then app will automatically loads your data to the other user. if he can't separate that two things (apk. file of APP and data folder of the APP). Hope it will help you...and me too..