Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install apk manually on device : error 103

I try to install an apk (build by IntelliJ) manually on my phone (GT-B5330 running Android 4.0.4).

  • Intellij generate MyApp.apk (using Build > Artifact > Rebuild...)
  • Phone setting : Security > Device Administration > Unknown sources is checked
  • I uninstall existing "debug" version of MyApp on the phone
  • I connect my phone to the pc with USB cable and transfert MyApp.apk to the phone sdcard.
  • On the phone I browse the sdcard and click MyApp.apk
  • I see the permissions required by MyApp and try to install it.
  • I receive a message "Application not installed"

Looking at logcat I found those logs:

01-25 10:55:15.668: INFO/ApplicationPolicy(1448): isApplicationInstallationEnabled
01-25 10:55:15.668: WARN/PackageManager(1448): verifying app can be installed or not
01-25 10:55:15.748: INFO/SurfaceFlinger(1216): id=3872 Removed idx=3 Map Size=4
01-25 10:55:15.748: INFO/SurfaceFlinger(1216): id=3872 Removed idx=-2 Map Size=4
01-25 10:55:16.148: DEBUG/dalvikvm(1448): GC_EXPLICIT freed 744K, 34% free 13115K/19655K, paused 5ms+11ms
01-25 10:55:16.148: DEBUG/InstallAppProgress(22326): Installation error code: -103

I tried to find the meaning of this error code -103 but I didn't find anything.

I'm wondering what can be wrong and how can I fix/investigate the issue?

Note that :

  • when I run the from my IDE : it is installed and work properly.
  • some native libs are packaged with MyApp.apk

Am I missing something obvious ? Other security setting to change ?

Any help will be greatly appreciate.

like image 465
ben75 Avatar asked Jan 25 '13 10:01

ben75


2 Answers

While running from the IDE, the apk is signed with the debug key.

I assume that you first mentioned build method might use another key or no one at all. None at all is my guess as otherwise you should have got a message that the signature differs.

Here is a screenshot to show how to sign an apk with IDEA12

enter image description here

like image 168
WarrenFaith Avatar answered Sep 28 '22 09:09

WarrenFaith


You have already installed this app in your device? Because probably you are trying to install an application already exists, signed with a different key.

like image 40
Spinettaro Avatar answered Sep 28 '22 10:09

Spinettaro