Closed
Bug 790041
Opened 14 years ago
Closed 14 years ago
Add mdns broadcast from SUTAgent for easier device discovery
Categories
(Testing Graveyard :: SUTAgent, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla18
People
(Reporter: vlad, Unassigned)
Details
Attachments
(1 file)
|
11.75 KB,
patch
|
cmtalbert
:
review+
|
Details | Diff | Splinter Review |
This patch adds support for mdns broadcasts from SUTAgent, making it easier to discover devices. This is done using the jmdns library. Unfortunately, multicast reception on Android is a bit flaky, so we can't do full mdns resolution -- instead, we put all the relevant info in the broadcast from the device and will just parse it that way.
We use an app tag of "_sutagent._tcp"; doing a query using something like mzclient on Linux:
*** Found name = 'SUTAgent [hwid:015d2bc2825ff206] [ip:10_242_29_221]', type = '_sutagent._tcp', domain = 'local'
("." is magic, so the ip has .s replaced with _). I plan on adding support to mozdevice/devicemanager to be able to find devices by hwid -- looking for it on the network, or if not found, looking at the currently connected adb devices.
Note that this patch doesn't include jmdns.jar -- if you want to try it out, you'll have to download the .jar from https://github.com/twitwi/AndroidDnssdDemo/blob/master/AndroidDnssdDiscovery/bundled-libs/jmdns.jar and put it in sutagent/android/network-libs.
Attachment #659830 -
Flags: review?(ctalbert)
Comment on attachment 659830 [details] [diff] [review]
add mdns broadcasts to sutagent
Thanks for the patch. This all looks great. Does adding the FORCE_STOP_PACKAGES permission allow the agent to kill any other process without the phone being rooted? I thought that was a permission you could only obtain if your app was signed with the same cert as the system, but perhaps I was wrong?
Of course, you'll need to add in the jmdns.jar file before you land this or you'll break the build, so consider this your nagging reminder to hg add that file. :)
Thanks again. r+
Attachment #659830 -
Flags: review?(ctalbert) → review+
| Reporter | ||
Comment 2•14 years ago
|
||
(In reply to Clint Talbert ( :ctalbert ) from comment #1)
> Comment on attachment 659830 [details] [diff] [review]
> add mdns broadcasts to sutagent
>
> Thanks for the patch. This all looks great. Does adding the
> FORCE_STOP_PACKAGES permission allow the agent to kill any other process
> without the phone being rooted? I thought that was a permission you could
> only obtain if your app was signed with the same cert as the system, but
> perhaps I was wrong?
Whoops, it doesn't. I added that as a test; I removed it from the final push. There's actually a bunch of permissions that the agent requests that are denied by the device.
> Of course, you'll need to add in the jmdns.jar file before you land this or
> you'll break the build, so consider this your nagging reminder to hg add
> that file. :)
>
> Thanks again. r+
Pushed to inbound -- https://hg.mozilla.org/integration/mozilla-inbound/rev/6ab7b7ab6684
Patch for mozbase/mozdevice (via pull request coming soon)
Comment 3•14 years ago
|
||
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #2)
> (In reply to Clint Talbert ( :ctalbert ) from comment #1)
> Patch for mozbase/mozdevice (via pull request coming soon)
Just FYI, patches against mozbase should be filed as normal bugzilla bugs with a patch attached. ;)
https://wiki.mozilla.org/Auto-tools/Projects/MozBase#Working_on_Mozbase_and_Contributing_Patches
Comment 4•14 years ago
|
||
(In reply to William Lachance (:wlach) from comment #3)
> (In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #2)
> > (In reply to Clint Talbert ( :ctalbert ) from comment #1)
>
> > Patch for mozbase/mozdevice (via pull request coming soon)
>
> Just FYI, patches against mozbase should be filed as normal bugzilla bugs
> with a patch attached. ;)
>
> https://wiki.mozilla.org/Auto-tools/Projects/
> MozBase#Working_on_Mozbase_and_Contributing_Patches
(in this case of course, attaching another patch to this bug would be fine)
Comment 5•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•