perkeep/clients
Tilman Dilo 1c14d2d219 clients/android: improve robustness of camput deployment
When reinstalling the app, using shell commands to set executable
permissions on the camput binary sometimes fails for unknown reasons.
The camput binary keeps 0660 permissions even though no error is
reported. The frequency of failed deployments seems to increase when
more recent build tools are used in the build process. On a Nexus 5X,
observed failure rates are in the order of one in twenty up to one in
six.

This commit removes all use of shell commands for deploying camput and
utilizes native java methods instead. While the resulting permissions of
camput change from 0700 to 0760, this is acceptable as the group is
app-specific and not shared.

A call to fsync is added to ensure that all file data (not just
metadata) is committed to disk before the file is renamed. This should
be safer in the event of a power loss as we're most likely writing to an
ext4 file system (the noauto_da_alloc mount option is used on modern
devices, see [1]).

With these changes, no failures to set executable permission bits could
be observed, regardless of build tool version used (v19.1 and v26.0,
n=30 each).

Fixes #932

[1] https://www.kernel.org/doc/Documentation/filesystems/ext4.txt

Change-Id: I290b4ce896aa449afef89ac87cdd0431752ceb93
2017-06-24 10:29:51 +02:00
..
android clients/android: improve robustness of camput deployment 2017-06-24 10:29:51 +02:00
chrome/clip-it-good Fix permissions for files 2016-04-28 21:15:09 +02:00
curl client: fix blobserver path in curl and python clients 2013-01-01 00:27:11 +05:30
ios-objc Fixed an issue where checking for files was slow 2014-02-26 12:46:52 -08:00
js commit js client sketch 2010-11-04 23:05:20 -07:00
osx website: update doc URLs 2016-04-27 08:48:50 -07:00
python client: fix blobserver path in curl and python clients 2013-01-01 00:27:11 +05:30