commit | 29e781361a83ac9ece05e92192eb829275975a9b | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Fri Jan 17 16:16:42 2014 -0800 |
committer | Nick Kralevich <nnk@google.com> | Fri Jan 17 16:16:42 2014 -0800 |
tree | 78a4c5606ff34212528a7cbd3431e9eb1ebfa180 | |
parent | 9c0d94064a11c7bd4a22f8cd03e56963e188bf49 [diff] |
Fix "adb push /sdcard/filename" Don't assume that calling chown(filename, getuid(), getgid()) will always succeed. In the case of /sdcard, a file you create will be owned by root, so the chown call will fail. Instead, use uid=gid=-1 so that the chown call is truly a no-op. Ignore the results of calling chmod. Again, for /sdcard, the chmod call will never succeed, because the file isn't owned by the shell user. Bug: 12441485 Change-Id: I11eaf1d6f6049c1158afc29754fbb7af2baf2c78