Merge lp://qastaging/~doanac/phablet-tools/rndis into lp://qastaging/phablet-tools

Proposed by Andy Doan
Status: Needs review
Proposed branch: lp://qastaging/~doanac/phablet-tools/rndis
Merge into: lp://qastaging/phablet-tools
Diff against target: 258 lines (+149/-28)
6 files modified
debian/control (+1/-0)
debian/phablet-tools.udev (+3/-0)
debian/phablet-tools.upstart (+62/-0)
phablet-network-bridge-addif (+21/-0)
phablet-network-setup (+59/-28)
setup.py (+3/-0)
To merge this branch: bzr merge lp://qastaging/~doanac/phablet-tools/rndis
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Sergio Schvezov Needs Fixing
Review via email: mp+177435@code.qastaging.launchpad.net

Commit message

add rndis networking support

This sets up 2 things:

1) an upstart entry to ensure we have the proper bridged interface
in place. This interace will serve as DHCP server to all clients.

2) a udev rule that will detect when an rndis device is connected
and automatically provide that device an address

Inspired By: Jean-Baptiste Lallement and Oliver Grawert

Description of the change

add rndis networking support

This sets up 2 things:

1) an upstart entry to ensure we have the proper bridged interface
in place. This interace will serve as DHCP server to all clients.

2) a udev rule that will detect when an rndis device is connected
and automatically provide that device an address

Inspired By: Jean-Baptiste Lallement and Oliver Grawert

Tested On: mako and grouper

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

21 +# make sure we have proper permission when the device shows up as rndis
22 +SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"

can you add this to android-tools-adb ?

I can do it, but it needs to be removed from here (doesn't belong)

review: Needs Fixing
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

187 + adb $ADBOPTS push $tfile /var/lib/lxc/android/pre-start.sh
188 + adb $ADBOPTS shell chmod 755 /var/lib/lxc/android/pre-start.sh

failed to copy '/tmp/tmp.KSqkeJWenb' to '/var/lib/lxc/android/pre-start.sh': Read-only file system
chmod: changing permissions of '/var/lib/lxc/android/pre-start.sh': Read-only file system

This should be read from a flag in lxc-android-config

review: Needs Fixing
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

257 + 'phablet-network-bridge-addif',

This would be better installed in libexec or something, not a stopper though

review: Needs Fixing
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

> 21 +# make sure we have proper permission when the device shows up as
> rndis
> 22 +SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", RUN+="udev-acl
> --action=$env{ACTION} --device=$env{DEVNAME}"
>
> can you add this to android-tools-adb ?
>
> I can do it, but it needs to be removed from here (doesn't belong)

This udev rule also only works on precise.

Revision history for this message
Andy Doan (doanac) wrote :

On 07/30/2013 12:52 PM, Sergio Schvezov wrote:
> Review: Needs Fixing
>
> 187 + adb $ADBOPTS push $tfile /var/lib/lxc/android/pre-start.sh
> 188 + adb $ADBOPTS shell chmod 755 /var/lib/lxc/android/pre-start.sh
>
> failed to copy '/tmp/tmp.KSqkeJWenb' to '/var/lib/lxc/android/pre-start.sh': Read-only file system
> chmod: changing permissions of '/var/lib/lxc/android/pre-start.sh': Read-only file system
>
> This should be read from a flag in lxc-android-config

Not sure I follow? If this is a read-only file, we're dead in the water.
Or are you saying check so that we can give a better error message?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

> > 21 +# make sure we have proper permission when the device shows up as
> > rndis
> > 22 +SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", RUN+="udev-acl
> > --action=$env{ACTION} --device=$env{DEVNAME}"
> >
> > can you add this to android-tools-adb ?
> >
> > I can do it, but it needs to be removed from here (doesn't belong)
>
> This udev rule also only works on precise.

Added https://code.launchpad.net/~sergiusens/ubuntu/saucy/android-tools/lax_udev/+merge/177661

148. By Andy Doan

remove adb permission hack

Sergio is moving this to android-tools-adbd

149. By Andy Doan

move phablet-network-bridge-addif to /lib/udev

as per sergio's review. this is where other udev scripts get located

Revision history for this message
Andy Doan (doanac) wrote :

> > 21 +# make sure we have proper permission when the device shows up as
> > rndis
> > 22 +SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", RUN+="udev-acl
> > --action=$env{ACTION} --device=$env{DEVNAME}"
> >
> > can you add this to android-tools-adb ?
> >
> > I can do it, but it needs to be removed from here (doesn't belong)
>
> This udev rule also only works on precise.

It works on raring for me.

Revision history for this message
Andy Doan (doanac) wrote :

I think I've fixed all but the lxc-android-config/read-only thing you mentioned. One question:

do we need to update the packaging so that this now depends on a specific version of android-adb-tools so we don't get adb permission issues?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Tue, Jul 30, 2013 at 3:39 PM, Andy Doan <email address hidden> wrote:
> I think I've fixed all but the lxc-android-config/read-only thing you mentioned. One question:
>
> do we need to update the packaging so that this now depends on a specific version of android-adb-tools so we don't get adb permission issues?

The saucy versions use something like the MR I linked

-ACTION=="add|change", SUBSYSTEM=="usb", \
- ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d001|d002", \
- TAG+="uaccess"
+ACTION=="add|change", SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="uaccess"

Tool version is the same on all environments as long as you have
ppa:phablet-team/tools added.

Revision history for this message
Andy Doan (doanac) wrote :

On 07/30/2013 02:43 PM, Sergio Schvezov wrote:
> On Tue, Jul 30, 2013 at 3:39 PM, Andy Doan <email address hidden> wrote:
>> I think I've fixed all but the lxc-android-config/read-only thing you mentioned. One question:
>>
>> do we need to update the packaging so that this now depends on a specific version of android-adb-tools so we don't get adb permission issues?
>
> The saucy versions use something like the MR I linked
>
> -ACTION=="add|change", SUBSYSTEM=="usb", \
> - ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d001|d002", \
> - TAG+="uaccess"
> +ACTION=="add|change", SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="uaccess"
>
> Tool version is the same on all environments as long as you have
> ppa:phablet-team/tools added.
>

What I was trying to say is phablet-tools now requires a specific
version android-adb-tools in order for rndis to work. ie - we merged
this today, and you ran:

  apt-get update; apt-get install phablet-tools

you'd have an outdated version of android-adb-tools, right?

Unmerged revisions

149. By Andy Doan

move phablet-network-bridge-addif to /lib/udev

as per sergio's review. this is where other udev scripts get located

148. By Andy Doan

remove adb permission hack

Sergio is moving this to android-tools-adbd

147. By Andy Doan

add rndis networking support

This sets up 2 things:

1) an upstart entry to ensure we have the proper bridged interface
in place. This interace will serve as DHCP server to all clients.

2) a udev rule that will detect when an rndis device is connected
and automatically provide that device an address

Inspired By: Jean-Baptiste Lallement and Oliver Grawert

146. By Andy Doan

break out wifi setup into its own function

This is just to help make things cleaner for adding rndis support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches