-3

How can I install some apps to android without copying the .apk file? I can do the same in iOS. that must be a possible thing, but I couldnt find it neither here nor Google.

EDIT:

Imagine you want to install your own app to someone's device without letting them have the apk file.

Izzy
  • 91,166
  • 73
  • 343
  • 943
shervin4030
  • 11
  • 1
  • 3
  • 3
    It's not clear to me what you mean by "without copying the apk file". The APK is the app, and it needs to be on the phone to install it, even temporarily. – Dan Hulme Mar 04 '14 at 16:25
  • What are you actually trying to solve here? Is there anything that prevents you from installing the APK file normally? – Chahk Mar 04 '14 at 16:46
  • 3
    Do you have physical access to the phone? If so, you can use adb install app_name_here.apk in terminal/command prompt, provided you have Android SDK tools installed. However, all this does is copy the APK to the target phone, and register it with the Package Manager. A user with enough knowledge (and root access) can always find and copy the APK from the phone. – Chahk Mar 04 '14 at 16:55
  • @chahk your answer is what im looking for,correct. please provide it as an answer so that I can accept it. thanks – shervin4030 Mar 05 '14 at 09:57
  • 2
    I still don't see what advantage that should give. Once installed, anybody with physical access to the device could simply use apps like AppMonster to grab the .apk of any installed app. See Dan's answer. – Izzy Mar 05 '14 at 10:34

3 Answers3

5

Provided you have physical access to the device, you can manually install your app by doing the following:

  1. Install Android SDK tools from this page (Download for other platforms → SDK Tools Only.)
  2. Install USB drivers for the phone (usually from manufacturer's site.)
  3. Turn on USB debugging on the phone (in SettingsDeveloper options)
  4. Connect the phone via USB (you can also do this over Wi-Fi with a number of apps if the phone is rooted.)
  5. Open Command Prompt or Terminal and navigate to the "platform-tools" sub-directory of where you installed the SDK tools.
  6. Issue the following command: adb install path_to_apk\your_app.apk

Keep in mind though that you are still essentially "letting them have" the apk, since the installation simply copies the APK file to the appropriate directory on the phone (usually /data/app or /data/app-private) and registers it with Android's Package Manager. A knowledgeable enough user can still retrieve the APK.

Dan Hulme
  • 35,000
  • 17
  • 90
  • 155
Chahk
  • 19,505
  • 3
  • 56
  • 80
4

The APK is the app. Installing an app on someone's phone is itself giving them the APK, so it's a nonsense to talk about installing the app without giving them the APK. It's analogous to asking if you can run a program on a Windows machine without giving them the EXE file.

If you instead want to install an app on someone's phone without them being able to copy the app to a different phone, the author of the app needs to use an anti-piracy library (a.k.a. "licensing service") to stop the app when it's run on an unauthorized phone. As programming questions are off-topic on this site, I won't discuss that further.

Dan Hulme
  • 35,000
  • 17
  • 90
  • 155
  • I agree with Dan and @Izzy. If you are worried about giving the user source code, you can stop worrying for the most part. APK files contain compiled bytecode (along with resources like images and icons.) It can still be reverse-engineered but again, requires some technical knowledge. Your best bet to "protect" your intellectual property is indeed licensing. – Chahk Mar 05 '14 at 14:09
0

The way most developers do it is through an application distribution service (google play, Amazon appstore...). But if you are not ready to publish those options may not seem like good ones. So your alternate option would be to install over ADB, done either over a cable or network.

Colin
  • 639
  • 3
  • 7