Lollipop 5.1.1 platform enabling ethernet as a network option

3,360 views
Skip to the first unread message

robinGadams .

unread,
25 Sept 2015, 2:39:52 pm25/9/15
to android-...@googlegroups.com
Hi
I am working on a HW platform that provides Mobile/Cellular , WIFI and Ethernet as options to access the data network. 
The WIFI/Mobile features all work as expected, but I am struggling to see how I enable ethernet as another data network option.

I can connect ethernet via adb IE using netcfg , route add, ndc resolver  commands etc
Once I have done this I can browse using the ethernet link

However I dont see any logs from ConnectivityManager and any of the ethernet java code , I of course enabled all of the logs in the code and added extra

So how do I get the ethernet connection integrated such that the ConnectivityManager sees it as an option as it comes available and applications can use it



Robin

Gary Bisson

unread,
2 Oct 2015, 9:55:10 am2/10/15
to android-platform
Hi Robin,

Did you make sure to add the Ethernet feature under /etc/permissions?

Also don't forget to add a dhcpcd init service for this interface:

Regards,
Gary

Uy Van Duc

unread,
27 Oct 2015, 10:12:28 am27/10/15
to android-platform
Hi Robin

I got the same problem and I already add PRODUCT_COPY_FILES +=   frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml

to device.mk. already checked on running system and have system/etc/permissions/android.hardware.ethernet.xml existed.

I also have 
service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
    class main
    group dhcp
    oneshot

service iprenew_eth0 /system/bin/dhcpcd -n
     class late_start
     disabled
     oneshot
in my init.board.rc. 
after booted from console i can see dhcp work fine. but no DNS setting. and from Android UI there is no Ethernet configuration in system setting.

My system just used framebuffer, so i enabled  
setprop ro.kernel.qemu 1
setprop ro.kernel.qemu.gles 0

can it be the reason?

Thanks
Uy

robinGadams

unread,
12 Jan 2016, 7:35:00 pm12/1/16
to android-platform
Gary 
Thanks for the response , I only just realized my question had been answered, I was expecting an automated email notification
I will look at the links you provided as i am now looking at this feature
Will let yu know if and when i get success
Robin

robinGadams

unread,
13 Jan 2016, 2:47:00 pm13/1/16
to android-platform
Hi 
The suggested links worked for me , I added this 
1.  PRODUCT_COPY_FILES += \
    frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml
  To my <product>.mk file 

2. Added this to my init.xxxx.rc 
service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
    class late_start
    disabled
    oneshot

service iprenew_eth0 /system/bin/dhcpcd -n
    class late_start
    disabled
    oneshot

I now get ethernet access automatically. I dont see any options in the UI though.

I now have a 2nd problem to solve
My hardware supports a dedicated ethernet device eth0 and ethernet over USB eth1
I need to add support for the ethernet over USB eth1 some how and thats not clear to me how I would add that 

Robin

Nicolas Ribero

unread,
26 May 2016, 12:36:51 pm26/5/16
to android-platform

Hello, i'm pretty new at this, but not new at programming and stuff.  My mobile has android 5.1 and doesnt connect to ethernet with an usb device and otg cable. Can you tell me where are device.mk and init.xxxx.rc files located? i already created the ethernet xml file. I have root permitions.

Thanks in advance

Nick from Argentina
Reply all
Reply to author
Forward
0 new messages