title: Android network bridge between USB tethering & WiFi hotspot interfaces
body: <p>I have following hw environment:
  - dev board;
  - Android device;
  - Ubuntu laptop;</p>
  
  <p>Android connected to the board by USB cable.
  Laptop connected to Android dev by wifi hotspot.</p>
  
  <p>From Android I able to ping a board throw USB tethering (and vise versa).
  Also from Android I able to ping a laptop throw wifi hotspot (vise versa).</p>
  
  <p>|Dev board| &lt;--- usb tether ---> |Android| &lt;--- wifi ---> |laptop|</p>
  
  <p>On Android device, I have usb0 and wlan0 interfaces.
  I want to ping dev board from the laptop.</p>
  
  <p>How to setup bridge? And this bridge should work with ADB throw wifi.</p>
  
  <p>Android details:</p>
  
  <h1>ifconfig</h1>
  
  <blockquote>
    <p>bridge0   Link encap:Ethernet  HWaddr 58:A2:B5:7F:7B:21<br>
              inet6 addr: fe80::7824:93ff:fe96:c19f/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:399 errors:0 dropped:21 overruns:0 frame:0
              TX packets:358 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:46412 (45.3 KiB)  TX bytes:26128 (25.5 KiB)</p>
    
    <p>lo        Link encap:Local Loopback<br>
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:227 errors:0 dropped:0 overruns:0 frame:0
              TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:22816 (22.2 KiB)  TX bytes:22816 (22.2 KiB)</p>
    
    <p>usb0      Link encap:Ethernet  HWaddr DE:46:31:73:06:7E<br>
              inet addr:192.168.42.129  Bcast:192.168.42.255  Mask:255.255.255.0
              inet6 addr: fe80::dc46:31ff:fe73:67e/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:449 errors:0 dropped:0 overruns:0 frame:0
              TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:33485 (32.7 KiB)  TX bytes:26750 (26.1 KiB)</p>
    
    <p>wlan0     Link encap:Ethernet  HWaddr 58:A2:B5:7F:7B:21<br>
              inet addr:192.168.43.1  Bcast:192.168.43.255  Mask:255.255.255.0
              inet6 addr: fe80::5aa2:b5ff:fe7f:7b21/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:674 errors:0 dropped:3 overruns:0 frame:0
              TX packets:398 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:47625 (46.5 KiB)  TX bytes:35994 (35.1 KiB)</p>
  </blockquote>
  
  <p>Interface bridge0 Android setup automatically when USB tether or wifi hotspot enabled.</p>
  
  <p>Thank you!</p>