Closed
Bug 1016041
Opened 10 years ago
Closed 10 years ago
Eideticker should work on unrooted devices
Categories
(Testing Graveyard :: Eideticker, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wlach, Assigned: wlach)
References
Details
Attachments
(2 files, 1 obsolete file)
3.34 KB,
patch
|
bc
:
review+
|
Details | Diff | Splinter Review |
2.89 KB,
patch
|
bc
:
review+
|
Details | Diff | Splinter Review |
Right now Eideticker depends on using a rooted devices for really no good reason. It would be nice to fix this as keeping devices up to date with rooted software is a bit of a hassle. Also, I really don't want to root my Nexus 5.
Assignee | ||
Comment 1•10 years ago
|
||
One aspect of this is using am force-stop to stop applications instead of killing them (because the adb user doesn't have permission to do that). We need a new version of mozdevice incorporating bug 907427 for that.
Depends on: 1016042
Assignee | ||
Comment 2•10 years ago
|
||
So one aspect of this is allowing the executables that eideticker uses (orangutan, ntpclient) to be in /data/local/tmp/, as that's the only place that some devices (e.g. the Nexus 5) can write to when unrooted.
Assignee: nobody → wlachance
Attachment #8428875 -
Flags: review?(bclary)
Assignee | ||
Comment 3•10 years ago
|
||
Actually it looks like the stopApplication logic in mozdevice isn't quite adequate as-is, since it doesn't support old versions of Android. Filed bug 1016073 to try to get that addressed.
Comment 4•10 years ago
|
||
Comment on attachment 8428875 [details] [diff] [review]
Search for orangutan, ntpclient in /data/local/tmp as well
Review of attachment 8428875 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with the KeyError fixed. The other comments I leave to your discretion.
::: src/eideticker/eideticker/device.py
@@ +118,5 @@
> self.model, self.type))
> self.deviceProperties = DEVICE_PROPERTIES[self.type][self.model]
>
> + for (name, execname) in [("orangutan", "orng"),
> + ("ntpdate", "ntpclient")]:
Since we use 'orangutan' and 'ntpdate' as keys in several places, do you think it would be worthwhile to define them as constants and then when using them as keys use the constant variable name instead of the literal string? Mark has suggested this to me in the past.
@@ +125,5 @@
> + if self.fileExists(fullpath):
> + self.exec_locations[name] = fullpath
> +
> + if not self.exec_locations[name]:
> + raise mozdevice.DMError("%s not on device! Please "
the self.exec_locations[name] will raise a KeyError if it is not set and you will never raise the corresponding DMError.
@@ +132,1 @@
>
Do you think it would be worth while to check both files before raising the DMError and report on them both if neither is installed?
Attachment #8428875 -
Flags: review?(bclary) → review+
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Bob Clary [:bc:] from comment #4)
> ::: src/eideticker/eideticker/device.py
> @@ +118,5 @@
> > self.model, self.type))
> > self.deviceProperties = DEVICE_PROPERTIES[self.type][self.model]
> >
> > + for (name, execname) in [("orangutan", "orng"),
> > + ("ntpdate", "ntpclient")]:
>
> Since we use 'orangutan' and 'ntpdate' as keys in several places, do you
> think it would be worthwhile to define them as constants and then when using
> them as keys use the constant variable name instead of the literal string?
> Mark has suggested this to me in the past.
Sure, good idea.
> @@ +125,5 @@
> > + if self.fileExists(fullpath):
> > + self.exec_locations[name] = fullpath
> > +
> > + if not self.exec_locations[name]:
> > + raise mozdevice.DMError("%s not on device! Please "
>
> the self.exec_locations[name] will raise a KeyError if it is not set and you
> will never raise the corresponding DMError.
Oops. Will fix.
> Do you think it would be worth while to check both files before raising the
> DMError and report on them both if neither is installed?
I don't think it's really necessary. We already tell people to build + install both in the documentation.
Assignee | ||
Comment 6•10 years ago
|
||
Pushed with suggested fixes and a minor doc update:
https://github.com/mozilla/eideticker/commit/2d1e5796ffd878a7c88ae099d17a8527dcfeee7b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•10 years ago
|
||
Oops, this is actually not quite fixed, since we still have problems with the stop/start behaviour.
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8431069 -
Flags: review?(bclary)
Assignee | ||
Comment 9•10 years ago
|
||
First take of the patch had some problems, oops.
Attachment #8431069 -
Attachment is obsolete: true
Attachment #8431069 -
Flags: review?(bclary)
Attachment #8431075 -
Flags: review?(bclary)
Comment 10•10 years ago
|
||
Comment on attachment 8431075 [details] [diff] [review]
Use stopApplication, take 2
Review of attachment 8431075 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good.
Attachment #8431075 -
Flags: review?(bclary) → review+
Assignee | ||
Comment 11•10 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•