[Q] Can't install APK from Eclipse or ADB

Search This thread

mrlanrat

Senior Member
May 12, 2010
93
4
San Diego
lanrat.com
I recently upgraded my HTC incredible from CM 7.1 to AOKP. Ever since the upgrade I cannot install any of my APKs from Eclipse or ADB. In Eclipse I get the error:
[2012-02-20 16:17:40 - ABC] Android Launch!
[2012-02-20 16:17:40 - ABC] adb is running normally.
[2012-02-20 16:17:40 - ABC] Performing com.vorsk.ABC.ABCActivity activity launch
[2012-02-20 16:17:40 - ABC] Automatic Target Mode: using device 'HT06YHJ01492'
[2012-02-20 16:17:40 - ABC] Uploading ABC.apk onto device 'HT06YHJ01492'
[2012-02-20 16:17:40 - ABC] Installing ABC.apk...
[2012-02-20 16:17:41 - ABC] Installation failed due to invalid URI!
[2012-02-20 16:17:41 - ABC] Please check logcat output for more details.
[2012-02-20 16:17:41 - ABC] Launch canceled!

In ADB I get:
C:\Users\lanrat\workspace\ABC\bin>adb install ABC.apk
1044 KB/s (23523 bytes in 0.022s)
pkg: /data/local/tmp/ABK.apk
Failure [INSTALL_FAILED_INVALID_URI]

Any ideas on why this is happening? If I move the apk to my SD card first it installs just fine.
I really don't want to go back to CS 7.1 just to get the ability to develop apps back
 
Last edited:
Sep 27, 2010
19
17
Had this problem on the Incredible as well. As a new user I can't post links, but there's a StackOverflow post that details the fix. First Google hit for INSTALL_FAILED_INVALID_URI.

Basically /data/local doesn't have the right permissions, so a simple

Code:
adb shell
cd /data
chmod 777 local

should fix you up. Not sure if the new permissions are overbroad, but I'm not too worried.
 

mdaa83

Member
Mar 31, 2011
49
7
Had this problem on the Incredible as well. As a new user I can't post links, but there's a StackOverflow post that details the fix. First Google hit for INSTALL_FAILED_INVALID_URI.

Basically /data/local doesn't have the right permissions, so a simple

Code:
adb shell
cd /data
chmod 777 local

should fix you up. Not sure if the new permissions are overbroad, but I'm not too worried.

Thanks, this helped.

I had to chmod 777 both /data and /data/local on ics rom for htc incredible. This really surprised me.
 

VipSaran

Senior Member
Dec 11, 2007
85
16
Same thing happened to me since I upgraded my phone to Jelly bean.

I'm on SGS 3 (I9300) with freshly installed I9300XXDLIH_I9300VFGDLJ1_VIP and rooted afterwards.

Eclipse still displays this:
Installation failed due to invalid APK file!
Please check logcat output for more details.
Launch canceled!

Even though I have done: chmod 777 /data /data/local /data/local/tmp
Code:
[email protected]:/ # ls -ld data data/local data/local/tmp
ls -ld data data/local data/local/tmp
drwxrwxrwx system   system            2012-10-23 15:40 data
drwxrwxrwx root     root              2012-08-25 10:40 local
drwxrwxrwx shell    shell             2012-10-23 16:36 tmp
Eclipse still refuses to install (any) APK.
If I copy the Eclipse-generated APK to the phone, I can install it manually.

What can I do to fix this?

FYI, I've the the 20.0.3 Android SDK on fully updated Eclipse 4.2.1

My system properties:
attachment.php




Update:
Installed SiyahKernel S3-v1.6.8 and w/o any tampering with the settings (e.g. through ExTweak) the problem is solved.

Root cause seems to be UMASK.
- on stock kernel I had 0077
- now on SiyahKernel I have 0000

Still, as can be seen from numerous other threads on the same issue out there, it's very wrong for the stock kernel to cause that problem.
 

Attachments

  • Screenshot_2012-10-23-16-53-53.jpg
    Screenshot_2012-10-23-16-53-53.jpg
    26.9 KB · Views: 16,730
Last edited:
  • Like
Reactions: GreYFoXGTi

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Had this problem on the Incredible as well. As a new user I can't post links, but there's a StackOverflow post that details the fix. First Google hit for INSTALL_FAILED_INVALID_URI.

    Basically /data/local doesn't have the right permissions, so a simple

    Code:
    adb shell
    cd /data
    chmod 777 local

    should fix you up. Not sure if the new permissions are overbroad, but I'm not too worried.
    1
    That fixed it.

    I tried chmod 777 /data/local/tmp but that did not work.
    I wonder what caused this issue in the first case, its relatively fresh install of the rom.
    1
    Same thing happened to me since I upgraded my phone to Jelly bean.

    I'm on SGS 3 (I9300) with freshly installed I9300XXDLIH_I9300VFGDLJ1_VIP and rooted afterwards.

    Eclipse still displays this:
    Installation failed due to invalid APK file!
    Please check logcat output for more details.
    Launch canceled!

    Even though I have done: chmod 777 /data /data/local /data/local/tmp
    Code:
    [email protected]:/ # ls -ld data data/local data/local/tmp
    ls -ld data data/local data/local/tmp
    drwxrwxrwx system   system            2012-10-23 15:40 data
    drwxrwxrwx root     root              2012-08-25 10:40 local
    drwxrwxrwx shell    shell             2012-10-23 16:36 tmp
    Eclipse still refuses to install (any) APK.
    If I copy the Eclipse-generated APK to the phone, I can install it manually.

    What can I do to fix this?

    FYI, I've the the 20.0.3 Android SDK on fully updated Eclipse 4.2.1

    My system properties:
    attachment.php




    Update:
    Installed SiyahKernel S3-v1.6.8 and w/o any tampering with the settings (e.g. through ExTweak) the problem is solved.

    Root cause seems to be UMASK.
    - on stock kernel I had 0077
    - now on SiyahKernel I have 0000

    Still, as can be seen from numerous other threads on the same issue out there, it's very wrong for the stock kernel to cause that problem.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone