0

I rooted my Incredible and flashed an ICS rom, and I can't seem to install an app through Eclipse for testing (or by manually pushing it through adb). I know I have to change the permissions of /data/local to write and execute others in order to allow APKs to be installed, but when I adb shell into my phone and call chmod o=wx /data/local I get a message saying Bad mode. What does this mean and how do I fix it?

Thanks!

EDIT: According to this question I need to change the permissions of /data/local in order for this to work; I'm receiving the same errors as the OP of that question.

EDIT: I decided to post the LogCat output to make it clearer what my issue is:

    03-21 19:31:37.556: W/asset(7737): Asset path /data/local/tmp/myApp.apk is neither a directory nor file (type=0).
    03-21 19:31:37.556: W/DefContainer(7737): Failed to parse package
    03-21 19:31:37.566: W/CursorWrapperInner(7702): Cursor finalized without prior close()
    03-21 19:31:37.576: W/ActivityManager(183): No content provider found for permission revoke: file:///data/local/tmp/myApp.apk
Community
  • 1
  • 1
  • nope, I still get that "Bad mode" error. Any idea what "Bad mode" means? –  Mar 22 '12 at 00:36
  • 1
    just checked on the emulator: `data/local` it is `u=rwx g=rwx o=x` and you can install via adb / eclipse. `Bad mode` means that `chmod` does not understand your request. Maybe it does not like the `?=perms` version. So try it with `o+wx` or `776` – zapl Mar 22 '12 at 00:48
  • 1
    I got it to work with chmod 003. You got me thinking about using the octal though so if you post that as an answer I'll vote it up. –  Mar 22 '12 at 00:53

2 Answers2

0

AFAIK you need not chmod anything to install APKs from adb, just enable debug mode and possibly unknown sources. Same goes for Eclipse.

Andreas Hagen
  • 2,335
  • 2
  • 19
  • 34
  • Iv'e never dealt with that problem before, but some phones have customized USB-drivers, especially if you are running your dev-environment under windows. Maybe that's your problem? That you need a specialized driver for it to work with this ROM? – Andreas Hagen Mar 21 '12 at 23:34
  • No I'm on mac, but I've only run into this problem with ICS roms. I've used plenty of Gingerbread roms and it worked fine, but as soon as I flash an ICS rom, I get this error. –  Mar 21 '12 at 23:37
  • Try a different ROM? I'm developing on ICS myself, but mine is stock-ROM that was shipped with my Transformer Prime and iv'e never encountered something like this. – Andreas Hagen Mar 21 '12 at 23:39
  • Believe me, I'd love to get my hands on a GNexus, but ok. I've used ics-deck and now I'm on Evervolv and still having the same problem. I love everything about it except that I can't develop on it which sucks. –  Mar 21 '12 at 23:44
  • Maybe you could solve it by uploading the APK to your SDcard and manually install it? Would be a pain in the ass tho – Andreas Hagen Mar 22 '12 at 08:02
0

Not sure about the custom ROM part, but you shouldn't have to change anything regarding permissions. Just go to the Developer Settings and enable USB Debugging. That's it. You don't even have to allow unknown sources, because using ADB you're skipping that part of the security checks.

Mario
  • 35,726
  • 5
  • 62
  • 78