4

I started working on a small Android app using Phonegap and Eclipse a while ago with the Android 2.3.3 SDK. I ran my builds on my stock HTC Sensation and all was well. Today I decided to root my phone and install an ICS rom, which works fine (Android Revolution 5.0.2 if it matters). I downloaded the 4.0 and 4.0.3 SDKs as well as updated ADT but I cannot seem to be able to build for my device anymore. LogCat gives me the following warnings:

12-26 18:12:24.251: W/asset(17419): Asset path /data/local/tmp/myapp.apk is neither a directory nor file (type=0).
12-26 18:12:24.251: W/DefContainer(17419): Failed to parse package
12-26 18:12:24.251: W/ActivityManager(11546): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk

In fact, I can see /data on the device but not /data/local/. Has anyone ever encountered a similar situation?

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
sebotron
  • 291
  • 1
  • 2
  • 5

4 Answers4

8

The problem was with the install directory permissions. /data/local needs to have write and execute rights to others in order for adb packages to install correctly.

sebotron
  • 291
  • 1
  • 2
  • 5
  • Thanks for finding this, been bugging me for days now! – Josh Feb 21 '12 at 18:13
  • 2
    I don't mean to revive an old question, but can you post what you did to fix this if you remember? I'm having the same exact difficulties that you had, except when I run a chmod o=wx data/local all I get is a message saying "Bad mode." What is this? Again, sorry for bringing up an old question. –  Mar 21 '12 at 23:39
  • @roboguy12 `Bad mode.` means the permissions on the file are not set correctly, some versions of `chmod` don't understand the `o+rw` notation. All chmods understand octal notation, try running `chmod 777 /data/local` – lambda Feb 13 '13 at 21:17
  • 3
    /data/local , from what i gather is only accessible on rooted devices. I am facing the same issue on a non rooted device – Thuita Wachira Jun 23 '13 at 12:02
5

Mundane, but be sure to check for Android tools updates in Eclipse. That was my problem.

Mark Rosenberg
  • 153
  • 1
  • 7
4

Do an:

adb uninstall <package name>

and then reinstall your application as normal.

Simon MacDonald
  • 23,253
  • 5
  • 58
  • 74
  • Thank you for your answer. After having installed my apk manually, i uninstalled using adb as you suggested. The uninstallation worked but adb install still gives me: Failure [INSTALL_FAILED_INVALID_URI] – sebotron Dec 27 '11 at 15:23
  • Ok I seem to have fixed it but i'm not sure if this was the right way. The /data/local/tmp folder did exist but perms were set at 660 for both. I gave "others" write access and voilà. adb now installs fine and i can run my applications straight from eclipse after compiling again. – sebotron Dec 27 '11 at 15:35
0

It seems that the apk name cannot contain some symbols such as "$" or "{}". As soon as I deleted those characters from the apk name, the apk was installed fine on the device.

omega
  • 630
  • 1
  • 6
  • 16